From 204160b121a40a7cda92eec94f518079b6204d3c Mon Sep 17 00:00:00 2001 From: WiZZy Date: Sat, 8 Jun 2019 00:39:09 +0300 Subject: [PATCH] feat(Core/Eluna): PLAYER_EVENT_ON_SPELL_CAST (#1624) --- src/server/game/Spells/Spell.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 8440bce4a..a295174eb 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -4,6 +4,11 @@ * Copyright (C) 2005-2009 MaNGOS */ +#ifdef ELUNA +#include "LuaEngine.h" +#include "ElunaUtility.h" +#endif + #include "Common.h" #include "DatabaseEnv.h" #include "WorldPacket.h" @@ -3653,7 +3658,9 @@ void Spell::_cast(bool skipCheck) { // now that we've done the basic check, now run the scripts // should be done before the spell is actually executed - //sScriptMgr->OnPlayerSpellCast(playerCaster, this, skipCheck); // pussywizard: optimization +#ifdef ELUNA + sEluna->OnSpellCast(playerCaster, this, skipCheck); +#endif // As of 3.0.2 pets begin attacking their owner's target immediately // Let any pets know we've attacked something. Check DmgClass for harmful spells only