This commit is contained in:
Shauren
2016-07-06 00:05:13 +02:00
94 changed files with 3402 additions and 571 deletions

View File

@@ -367,7 +367,9 @@ class CreatureGameObjectScriptRegistrySwapHooks
// Hook which is called before a creature is swapped
static void UnloadStage1(Creature* creature)
{
creature->m_Events.KillAllEvents(true);
// Remove deletable events only,
// otherwise it causes crashes with non-deletable spell events.
creature->m_Events.KillAllEvents(false);
if (creature->IsCharmed())
creature->RemoveCharmedBy(nullptr);