mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
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:
@@ -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