Core/Scripting: Kill pending unit events when swapping AI's
This commit is contained in:
1 parent
2cd46f6f05
commit
c4e7dcc04d
1 file changed
+2
@@ -368,6 +368,8 @@ class CreatureGameObjectScriptRegistrySwapHooks
|
||||
// Hook which is called before a creature is swapped
|
||||
static void UnloadStage1(Creature* creature)
|
||||
{
|
||||
creature->m_Events.KillAllEvents(true);
|
||||
|
||||
if (creature->IsCharmed())
|
||||
creature->RemoveCharmedBy(nullptr);
|
||||
|
||||
|
||||
Reference in new issue
Block a user