Adapt to TC changes

This commit is contained in:
Rochet2
2016-01-14 19:43:03 +02:00
parent 5a18a49535
commit a316e1cdbe

View File

@@ -124,12 +124,21 @@ struct ElunaCreatureAI : ScriptedAI
ScriptedAI::AttackStart(target); 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 // Called for reaction at stopping attack at no attackers or targets
void EnterEvadeMode() override void EnterEvadeMode() override
{ {
if (!sEluna->EnterEvadeMode(me)) if (!sEluna->EnterEvadeMode(me))
ScriptedAI::EnterEvadeMode(); ScriptedAI::EnterEvadeMode();
} }
#endif
// Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc) // Called when the creature is target of hostile action: swing, hostile spell landed, fear/etc)
void AttackedBy(Unit* attacker) override void AttackedBy(Unit* attacker) override