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:
1 parent
b64cddabaf
commit
4065ba87c6
1 file changed
+3
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user