From 3117a7e229fc7c00fa80fcd72265dd830d4b7afd Mon Sep 17 00:00:00 2001 From: Nathan Berman Date: Sun, 12 Jan 2025 18:26:33 +0000 Subject: [PATCH 1/3] fixed strikes resetting all strikes naxx set: --- sim/core/cooldown.go | 5 +++++ sim/hunter/item_sets_pve_phase_7.go | 6 ++++-- sim/hunter/items.go | 6 +++++- sim/hunter/raptor_strike.go | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sim/core/cooldown.go b/sim/core/cooldown.go index 62e529edf8..6db6955a6d 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 855993bd96..f6d224656e 100644 --- a/sim/hunter/item_sets_pve_phase_7.go +++ b/sim/hunter/item_sets_pve_phase_7.go @@ -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() } } diff --git a/sim/hunter/items.go b/sim/hunter/items.go index a9dd0f9c33..9c47996d68 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) } }, diff --git a/sim/hunter/raptor_strike.go b/sim/hunter/raptor_strike.go index 000509d16a..70e9dabe39 100644 --- a/sim/hunter/raptor_strike.go +++ b/sim/hunter/raptor_strike.go @@ -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() } From b59ff6b004a0358f817ffa35d7c7ebed1d0d2259 Mon Sep 17 00:00:00 2001 From: Nathan Berman Date: Sun, 12 Jan 2025 19:10:23 +0000 Subject: [PATCH 2/3] Melee specialist reset is not a queue --- sim/hunter/raptor_strike.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sim/hunter/raptor_strike.go b/sim/hunter/raptor_strike.go index 70e9dabe39..000509d16a 100644 --- a/sim/hunter/raptor_strike.go +++ b/sim/hunter/raptor_strike.go @@ -70,7 +70,7 @@ func (hunter *Hunter) getRaptorStrikeConfig(rank int) core.SpellConfig { } if hasMeleeSpecialist && sim.Proc(0.3, "Raptor Strike Reset") { - spell.CD.QueueReset(sim.CurrentTime) + spell.CD.Reset() hunter.MongooseBite.CD.Reset() } From 09f5270a795fda07138f8678c6b39269fea432b5 Mon Sep 17 00:00:00 2001 From: Nathan Berman Date: Sun, 12 Jan 2025 19:48:04 +0000 Subject: [PATCH 3/3] cleaned up t3 melee boolean conditions, commented out unused spell slice --- sim/hunter/item_sets_pve_phase_7.go | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sim/hunter/item_sets_pve_phase_7.go b/sim/hunter/item_sets_pve_phase_7.go index f6d224656e..0889f86b39 100644 --- a/sim/hunter/item_sets_pve_phase_7.go +++ b/sim/hunter/item_sets_pve_phase_7.go @@ -54,21 +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 || spell.SpellCode == SpellCode_HunterRaptorStrikeHit) && result.DidCrit() { - if spell.SpellCode == SpellCode_HunterRaptorStrikeHit { - hunter.RaptorStrike.CD.QueueReset(sim.CurrentTime) - } else { - spell.CD.Reset() - } + if (spell.Flags.Matches(SpellFlagStrike) || spell.SpellCode == SpellCode_HunterMongooseBite) && result.DidCrit() { + spell.CD.Reset() + } else if spell.SpellCode == SpellCode_HunterRaptorStrikeHit && result.DidCrit() { + hunter.RaptorStrike.CD.QueueReset(sim.CurrentTime) } }, }))