feat(Core/Spells): Implement OnSpellCastFinished hook (#22941)

Co-authored-by: Ovahlord <dreadkiller@gmx.de>
This commit is contained in:
Andrew
2025-09-19 04:52:22 -03:00
committed by GitHub
parent d58d8692b1
commit b09609e47d
4 changed files with 24 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ class Unit;
class Creature;
class Player;
class SpellInfo;
enum SpellFinishReason : uint8;
typedef std::vector<AreaBoundary const*> CreatureBoundary;
@@ -146,6 +147,9 @@ public:
// Called when spell hits a target
virtual void SpellHitTarget(Unit* /*target*/, SpellInfo const* /*spell*/) {}
// Called when a spell either finishes, interrupts or cancels a spell cast
virtual void OnSpellCastFinished(SpellInfo const* /*spell*/, SpellFinishReason /*reason*/) {}
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
virtual void AttackedBy(Unit* /*attacker*/) {}
virtual bool IsEscorted() { return false; }