Skip to content

Commit

Permalink
Merge pull request #3452 from wowsims/apl
Browse files Browse the repository at this point in the history
Fix warrior panic
  • Loading branch information
jimmyt857 authored Aug 13, 2023
2 parents f8e9945 + 57c35fd commit 6b0230d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions sim/warrior/heroic_strike_cleave.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ func (warrior *Warrior) registerHeroicStrikeSpell() *core.Spell {
}

spell.DealDamage(sim, result)
warrior.curQueueAura.Deactivate(sim)
if warrior.curQueueAura != nil {
warrior.curQueueAura.Deactivate(sim)
}
},
})
}
Expand Down Expand Up @@ -87,7 +89,9 @@ func (warrior *Warrior) registerCleaveSpell() *core.Spell {
spell.DealDamage(sim, results[hitIndex])
curTarget = sim.Environment.NextTargetUnit(curTarget)
}
warrior.curQueueAura.Deactivate(sim)
if warrior.curQueueAura != nil {
warrior.curQueueAura.Deactivate(sim)
}
},
})
}
Expand Down
4 changes: 3 additions & 1 deletion sim/warrior/warrior.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (warrior *Warrior) Initialize() {

warrior.registerBloodrageCD()

if warrior.Shout != nil && warrior.PrecastShout {
if !warrior.IsUsingAPL && warrior.Shout != nil && warrior.PrecastShout {
warrior.RegisterPrepullAction(-10*time.Second, func(sim *core.Simulation) {
warrior.Shout.SkipCastAndApplyEffects(sim, nil)
})
Expand All @@ -154,6 +154,8 @@ func (warrior *Warrior) Initialize() {

func (warrior *Warrior) Reset(_ *core.Simulation) {
warrior.RendValidUntil = 0
warrior.curQueueAura = nil
warrior.curQueuedAutoSpell = nil
}

func NewWarrior(character core.Character, talents string, inputs WarriorInputs) *Warrior {
Expand Down

0 comments on commit 6b0230d

Please sign in to comment.