Skip to content

Commit

Permalink
Fix panic when mixing Cast and Channel for channeled spells
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyt857 committed Oct 22, 2023
1 parent b406014 commit 65a1c07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sim/core/apl.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ func (apl *APLRotation) getNextAction(sim *Simulation) *APLAction {

func (apl *APLRotation) shouldInterruptChannel(sim *Simulation) bool {
channeledDot := apl.unit.ChanneledDot
if channeledDot == nil {
// Cast was started by a different APL action (not Channel) so is non-interruptible.
return false
}

if channeledDot.MaxTicksRemaining() == 0 {
// Channel has ended, but apl.unit.ChanneledDot hasn't been cleared yet meaning the aura is still active.
return false
Expand Down

0 comments on commit 65a1c07

Please sign in to comment.