Core/Unit: fixed Global cooldown cancelation on spell interrupt
This commit is contained in:
1 parent
974f3163bc
commit
5c882e8788
1 file changed
+5
-4
@@ -3052,15 +3052,16 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
ToPlayer()->SendAutoRepeatCancel(this);
|
||||
|
||||
m_currentSpells[spellType] = nullptr;
|
||||
|
||||
if (spell->getState() != SPELL_STATE_FINISHED)
|
||||
spell->cancel(interruptingSpell);
|
||||
else
|
||||
{
|
||||
m_currentSpells[spellType] = nullptr;
|
||||
spell->SetReferencedFromCurrent(false);
|
||||
}
|
||||
|
||||
if (GetTypeId() == TYPEID_UNIT && IsAIEnabled)
|
||||
ToCreature()->AI()->OnSpellCastFinished(spell->GetSpellInfo(), SPELL_FINISHED_CANCELED);
|
||||
|
||||
spell->SetReferencedFromCurrent(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user