fix(Core/Spells): Fix crash (#20179)

Co-authored-by: Ariel Silva <ariel-@users.noreply.github.com>
This commit is contained in:
Angelo Venturini
2024-10-11 08:15:02 -03:00
committed by GitHub
parent c3ee737c80
commit fede17f782
3 changed files with 13 additions and 9 deletions

View File

@@ -4076,9 +4076,11 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi
if (spell->getState() != SPELL_STATE_FINISHED)
spell->cancel(bySelf);
m_currentSpells[spellType] = nullptr;
spell->SetReferencedFromCurrent(false);
else
{
m_currentSpells[spellType] = nullptr;
spell->SetReferencedFromCurrent(false);
}
}
}