Core/Scripting: Don't force event cancellation when swapping creatures.

* EventProcessor::KillAllEvents(force = false) should only be used
  by the EventProcessor.
This commit is contained in:
Naios authored and Aokromes committed 2016-08-10 09:04:38 +02:00
1 parent b64cddabaf
commit 4065ba87c6
1 file changed
+3 -1
+3 -1
View File
@@ -368,7 +368,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);