From a316e1cdbee12d175087228b7fbc6fa6706103d7 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Thu, 14 Jan 2016 19:43:03 +0200 Subject: [PATCH] Adapt to TC changes --- ElunaCreatureAI.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ElunaCreatureAI.h b/ElunaCreatureAI.h index 0e0b0b0..4d4ac61 100644 --- a/ElunaCreatureAI.h +++ b/ElunaCreatureAI.h @@ -124,12 +124,21 @@ struct ElunaCreatureAI : ScriptedAI ScriptedAI::AttackStart(target); } +#ifdef TRINITY + // Called for reaction at stopping attack at no attackers or targets + void EnterEvadeMode(EvadeReason /*why*/) override + { + if (!sEluna->EnterEvadeMode(me)) + ScriptedAI::EnterEvadeMode(); + } +#else // Called for reaction at stopping attack at no attackers or targets void EnterEvadeMode() override { if (!sEluna->EnterEvadeMode(me)) ScriptedAI::EnterEvadeMode(); } +#endif // Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc) void AttackedBy(Unit* attacker) override