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.
This commit is contained in:
Oliver M
2020-04-13 00:39:47 +02:00
parent f7adf33028
commit d1bed467b9

View File

@@ -38,15 +38,16 @@ struct ElunaCreatureAI : ScriptedAI
void UpdateAI(uint32 diff) override void UpdateAI(uint32 diff) override
#endif #endif
{ {
#ifdef TRINITY
//Spawns are handled by Creature.cpp - in function Creature::Update()
#else
if (justSpawned) if (justSpawned)
{ {
justSpawned = false; justSpawned = false;
#ifdef TRINITY
JustAppeared();
#else
JustRespawned(); JustRespawned();
#endif
} }
#endif
if (!movepoints.empty()) if (!movepoints.empty())
{ {