mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
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:
@@ -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())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user