Core/AI: implemented AI hook for interrupting spells (#20610)

This commit is contained in:
Ovah authored and Aokromes committed 2017-10-13 22:19:39 +02:00
1 parent 361c4fd04d
commit 87bb6d04f5
2 files changed
+6

No files matched your search

+3
View File
@@ -2993,6 +2993,9 @@ void Unit::InterruptSpell(CurrentSpellTypes spellType, bool withDelayed, bool wi
if (spell->getState() != SPELL_STATE_FINISHED)
spell->cancel();
if (GetTypeId() == TYPEID_UNIT && IsAIEnabled)
ToCreature()->AI()->OnSpellCastInterrupt(spell->GetSpellInfo());
m_currentSpells[spellType] = NULL;
spell->SetReferencedFromCurrent(false);
}