From 410cf0dd05e2765cf7806a9165f976a2bcc199d2 Mon Sep 17 00:00:00 2001 From: Naios Date: Tue, 12 Apr 2016 15:42:16 +0200 Subject: Core/Scripting: Fix loading of spell/aurascripts * Broken since 9cc97f226d * There is still a crash when using lazy unloading which I will fix in a later commit (this commit should fix at least the static build and normal usage of the dynamic build). * Closes #16948 --- src/server/game/Globals/ObjectMgr.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/server/game/Globals/ObjectMgr.cpp') diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 3513b5d97b8..3efeb1ca273 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -5222,7 +5222,10 @@ void ObjectMgr::ValidateSpellScripts() spellScript->_Register(); if (!spellScript->_Validate(spellEntry)) + { itr->second.second = false; + continue; + } } if (auraScript) @@ -5231,9 +5234,17 @@ void ObjectMgr::ValidateSpellScripts() auraScript->_Register(); if (!auraScript->_Validate(spellEntry)) + { itr->second.second = false; + continue; + } } + + // Enable the script when all checks passed + itr->second.second = true; } + else + itr->second.second = false; } } -- cgit v1.2.3