From d1bed467b9e9180284f74ea3bcbdb91e150a54bf Mon Sep 17 00:00:00 2001 From: Oliver M Date: Mon, 13 Apr 2020 00:39:47 +0200 Subject: [PATCH] Fixed Creature_Event_On_Spawn getting called twice On Trinity, ElunaCreatureAI called JustAppeared() while the core also called JustAppeared, resulting in two events getting triggered. --- ElunaCreatureAI.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ElunaCreatureAI.h b/ElunaCreatureAI.h index 53434fc..f813c10 100644 --- a/ElunaCreatureAI.h +++ b/ElunaCreatureAI.h @@ -38,15 +38,16 @@ struct ElunaCreatureAI : ScriptedAI void UpdateAI(uint32 diff) override #endif { +#ifdef TRINITY + //Spawns are handled by Creature.cpp - in function Creature::Update() +#else if (justSpawned) { justSpawned = false; -#ifdef TRINITY - JustAppeared(); -#else + JustRespawned(); -#endif } +#endif if (!movepoints.empty()) {