mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
Merge branch '6.x' of https://github.com/TrinityCore/TrinityCore into legion
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user