Skip to content

Commit

Permalink
Fix DK APL breakage
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Jan 7, 2024
1 parent 94a51c5 commit d5c3a7a
Show file tree
Hide file tree
Showing 6 changed files with 1,504 additions and 1,497 deletions.
9 changes: 8 additions & 1 deletion sim/core/apl_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,19 @@ func (rot *APLRotation) GetAPLSpell(spellId *proto.ActionID) *Spell {
}
}
} else {
// Prefer spells marked with APL, but fallback to unmarked spells.
var aplSpell *Spell
for _, s := range rot.unit.Spellbook {
if s.ActionID.SameAction(actionID) && s.Flags.Matches(SpellFlagAPL) {
spell = s
aplSpell = s
break
}
}
if aplSpell == nil {
spell = rot.unit.GetSpell(actionID)
} else {
spell = aplSpell
}
}

if spell == nil {
Expand Down
Loading

0 comments on commit d5c3a7a

Please sign in to comment.