Core/AI: implemented AI hook for interrupting spells (#20610)
This commit is contained in:
1 parent
361c4fd04d
commit
87bb6d04f5
2 files changed
+6
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user