Core/AI: Implemented OnSpellCastInterrupt and OnSuccessfulSpellCast hooks

Ported from: 020825902c and 1aa42e97a8

(cherry picked from commit f1e4ee21f8da41c71f4cbafaa85e89c6275c1db2)
This commit is contained in:
Ovah
2022-01-01 20:17:45 +01:00
committed by Shauren
parent 63e5092f14
commit a6a6a15973
+6 -6
View File
@@ -141,6 +141,12 @@ class TC_GAME_API CreatureAI : public UnitAI
virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spellInfo*/) { }
virtual void SpellHitTargetGameObject(GameObject* /*target*/, SpellInfo const* /*spellInfo*/) { }
// Called when a spell cast gets interrupted
virtual void OnSpellCastInterrupt(SpellInfo const* /*spell*/) { }
// Called when a spell cast has been successfully finished
virtual void OnSuccessfulSpellCast(SpellInfo const* /*spell*/) { }
// Should return true if the NPC is currently being escorted
virtual bool IsEscorted() const { return false; }
@@ -152,12 +158,6 @@ class TC_GAME_API CreatureAI : public UnitAI
void OnCharmed(bool isNew) override;
// Called when a spell cast gets interrupted
virtual void OnSpellCastInterrupt(SpellInfo const* /*spell*/) { }
// Called when a spell cast has been successfully finished
virtual void OnSuccessfulSpellCast(SpellInfo const* /*spell*/) { }
// Called at reaching home after evade
virtual void JustReachedHome() { }