Core/AI: OnSpellCast, OnSpellFailed, OnSpellStart hooks

Port From (https://github.com/TrinityCore/TrinityCore/commit/050f55b62fded4cc73b76e42d56d98ea950cc26a)
This commit is contained in:
hondacrx
2022-05-30 15:44:21 -04:00
parent 5575703997
commit 306b0cb227
8 changed files with 80 additions and 14 deletions
+11 -2
View File
@@ -491,8 +491,17 @@ namespace Game.AI
// Called when spell hits a target
public virtual void SpellHitTarget(WorldObject target, SpellInfo spellInfo) { }
// Called when a spell either finishes, interrupts or cancels a spell cast
public virtual void OnSpellCastFinished(SpellInfo spell, SpellFinishReason reason) { }
// Called when a spell finishes
public virtual void OnSpellCast(SpellInfo spell) { }
// Called when a spell fails
public virtual void OnSpellFailed(SpellInfo spell) { }
// Called when a spell starts
public virtual void OnSpellStart(SpellInfo spell) { }
// Called when a channeled spell finishes
public virtual void OnChannelFinished(SpellInfo spell) { }
// Should return true if the NPC is currently being escorted
public virtual bool IsEscorted() { return false; }