Core/Scripting: Don't force event cancellation when swapping creatures.
* EventProcessor::KillAllEvents(force = false) should only be used by the EventProcessor. (cherry picked from commit d68316fcd2fc71343edfbd387249b75bd6e8a90f)
This commit is contained in:
@@ -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