diff --git a/src/ElunaLuaEngine_SC.cpp b/src/ElunaLuaEngine_SC.cpp index 78a2539..9b45732 100644 --- a/src/ElunaLuaEngine_SC.cpp +++ b/src/ElunaLuaEngine_SC.cpp @@ -1219,6 +1219,9 @@ public: void OnHeal(Unit* healer, Unit* receiver, uint32& gain) override { + if (!receiver) return; + if (!healer) return; + if (healer->IsPlayer()) sEluna->OnPlayerHeal(healer->ToPlayer(), receiver, gain); @@ -1228,6 +1231,9 @@ public: void OnDamage(Unit* attacker, Unit* receiver, uint32& damage) override { + if (!receiver) return; + if (!attacker) return; + if (attacker->IsPlayer()) sEluna->OnPlayerDamage(attacker->ToPlayer(), receiver, damage);