diff --git a/sim/core/cooldown.go b/sim/core/cooldown.go index 62e529edf..6db6955a6 100644 --- a/sim/core/cooldown.go +++ b/sim/core/cooldown.go @@ -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) } diff --git a/sim/hunter/item_sets_pve_phase_7.go b/sim/hunter/item_sets_pve_phase_7.go index 855993bd9..0889f86b3 100644 --- a/sim/hunter/item_sets_pve_phase_7.go +++ b/sim/hunter/item_sets_pve_phase_7.go @@ -54,19 +54,19 @@ func (hunter *Hunter) applyNaxxramasMelee4PBonus() { // Not entirely sure how this will work so taking some liberties // Assume that it resets all of them when one crits - var spellsToReset []*core.Spell + //var spellsToReset []*core.Spell core.MakePermanent(hunter.RegisterAura(core.Aura{ Label: label, OnInit: func(aura *core.Aura, sim *core.Simulation) { - spellsToReset = hunter.Strikes - spellsToReset = append(spellsToReset, hunter.MongooseBite) + //spellsToReset = hunter.Strikes + //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 { - spell.CD.Reset() - } + spell.CD.Reset() + } else if spell.SpellCode == SpellCode_HunterRaptorStrikeHit && result.DidCrit() { + hunter.RaptorStrike.CD.QueueReset(sim.CurrentTime) } }, })) diff --git a/sim/hunter/items.go b/sim/hunter/items.go index a9dd0f9c3..9c47996d6 100644 --- a/sim/hunter/items.go +++ b/sim/hunter/items.go @@ -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) } },