From 2a28fc81a4402a7bc5a8a62b7cf84b9e6f7a6d84 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Sun, 6 Aug 2017 21:49:14 +0300 Subject: [PATCH] Fix TC build --- ElunaCreatureAI.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ElunaCreatureAI.h b/ElunaCreatureAI.h index 0c1f66a..a02c5df 100644 --- a/ElunaCreatureAI.h +++ b/ElunaCreatureAI.h @@ -41,7 +41,11 @@ struct ElunaCreatureAI : ScriptedAI if (justSpawned) { justSpawned = false; +#ifdef TRINITY + JustAppeared(); +#else JustRespawned(); +#endif } if (!movepoints.empty()) @@ -140,12 +144,21 @@ struct ElunaCreatureAI : ScriptedAI } #endif +#ifdef TRINITY + // Called when creature appears in the world (spawn, respawn, grid load etc...) + void JustAppeared() override + { + if (!sEluna->JustRespawned(me)) + ScriptedAI::JustAppeared(); + } +#else // Called when creature is spawned or respawned (for reseting variables) void JustRespawned() override { if (!sEluna->JustRespawned(me)) ScriptedAI::JustRespawned(); } +#endif // Called at reaching home after evade void JustReachedHome() override