From 29793b32a36bb4386d32dd0ca1c0647f0b25c36f Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 15 Mar 2021 01:21:23 -0400 Subject: [PATCH] Core/Scripts: Fixes a crash, was not removing script when it failed the Validate check. --- Source/Game/Globals/ObjectManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Game/Globals/ObjectManager.cs b/Source/Game/Globals/ObjectManager.cs index 0eda283be..956d84662 100644 --- a/Source/Game/Globals/ObjectManager.cs +++ b/Source/Game/Globals/ObjectManager.cs @@ -1679,7 +1679,7 @@ namespace Game } if (!valid) - spellScriptsStorage.Remove(pair.Value); + spellScriptsStorage.Remove(script); } Dictionary AuraScriptLoaders = Global.ScriptMgr.CreateAuraScriptLoaders(script.Key); @@ -1703,7 +1703,7 @@ namespace Game } if (!valid) - spellScriptsStorage.Remove(pair.Value); + spellScriptsStorage.Remove(script); } ++count; }