Core/Scripting: Fixed hotswap calling evade mode for dead creatures

(cherry-picked from afa8527338)
This commit is contained in:
sirikfoll
2017-01-13 14:24:26 -03:00
committed by Shauren
parent f2950f851e
commit e64cd5669d

View File

@@ -402,7 +402,8 @@ class CreatureGameObjectAreaTriggerScriptRegistrySwapHooks
ASSERT(!creature->IsCharmed(),
"There is a disabled AI which is still loaded.");
creature->AI()->EnterEvadeMode();
if (creature->IsAlive())
creature->AI()->EnterEvadeMode();
}
static void UnloadDestroyScript(Creature* creature)