Skip to content

Commit

Permalink
fixed strikes resetting all strikes naxx set:
Browse files Browse the repository at this point in the history
  • Loading branch information
ncberman committed Jan 12, 2025
1 parent f07dd38 commit 3117a7e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions sim/core/cooldown.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ func (timer *Timer) Set(t time.Duration) {
*timer = Timer(t)
}

// Niche reset meant to be used for attack queued abilities that can be reset. Avoids a queued ability going off twice during thrashes like Wild Strikes.
func (timer *Timer) QueueReset(t time.Duration) {
*timer = Timer(t + (time.Millisecond * 50))
}

func (timer *Timer) Reset() {
*timer = Timer(startingCDTime)
}
Expand Down
6 changes: 4 additions & 2 deletions sim/hunter/item_sets_pve_phase_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ func (hunter *Hunter) applyNaxxramasMelee4PBonus() {
spellsToReset = append(spellsToReset, hunter.MongooseBite)
},
OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
if (spell.Flags.Matches(SpellFlagStrike) || spell.SpellCode == SpellCode_HunterMongooseBite) && result.DidCrit() {
for _, spell := range spellsToReset {
if (spell.Flags.Matches(SpellFlagStrike) || spell.SpellCode == SpellCode_HunterMongooseBite || spell.SpellCode == SpellCode_HunterRaptorStrikeHit) && result.DidCrit() {
if spell.SpellCode == SpellCode_HunterRaptorStrikeHit {
hunter.RaptorStrike.CD.QueueReset(sim.CurrentTime)
} else {
spell.CD.Reset()
}
}
Expand Down
6 changes: 5 additions & 1 deletion sim/hunter/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ func init() {
MaxStacks: 2,
OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
if spell.Flags.Matches(SpellFlagShot) || spell.ProcMask.Matches(core.ProcMaskMeleeSpecial) && spell.CD.Timer != nil {
spell.CD.Reset()
if spell.SpellCode == SpellCode_HunterRaptorStrike {
spell.CD.QueueReset(sim.CurrentTime)
} else {
spell.CD.Reset()
}
aura.RemoveStack(sim)
}
},
Expand Down
2 changes: 1 addition & 1 deletion sim/hunter/raptor_strike.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func (hunter *Hunter) getRaptorStrikeConfig(rank int) core.SpellConfig {
}

if hasMeleeSpecialist && sim.Proc(0.3, "Raptor Strike Reset") {
spell.CD.Reset()
spell.CD.QueueReset(sim.CurrentTime)
hunter.MongooseBite.CD.Reset()
}

Expand Down

0 comments on commit 3117a7e

Please sign in to comment.