Partially apply f81e455e3a

This commit is contained in:
Rochet2 2017-06-18 19:12:52 +03:00 committed by Antz
parent 0c7bb068e9
commit ace7afa124
2 changed files with 4 additions and 6 deletions

View file

@ -196,8 +196,7 @@ Creature::~Creature()
void Creature::AddToWorld()
{
#ifdef ENABLE_ELUNA
if (!IsInWorld())
sEluna->OnAddToWorld(this);
bool inWorld = IsInWorld();
#endif /* ENABLE_ELUNA */
///- Register the creature for guid lookup
@ -211,7 +210,7 @@ void Creature::AddToWorld()
SetActiveObjectState(true);
#ifdef ENABLE_ELUNA
if (!IsInWorld())
if (!inWorld)
sEluna->OnAddToWorld(this);
#endif /* ENABLE_ELUNA */
}