Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hunter - T3 Melee strike reset updates #1211

Merged
merged 5 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))
}
ncberman marked this conversation as resolved.
Show resolved Hide resolved

func (timer *Timer) Reset() {
*timer = Timer(startingCDTime)
}
Expand Down
12 changes: 6 additions & 6 deletions sim/hunter/item_sets_pve_phase_7.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
},
}))
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
Loading