aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Globals/ObjectMgr.cpp
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2016-04-12 15:42:16 +0200
committerNaios <naios-dev@live.de>2016-04-12 15:42:16 +0200
commit410cf0dd05e2765cf7806a9165f976a2bcc199d2 (patch)
tree2b73822b6accd8a91eacc19036d749504c784120 /src/server/game/Globals/ObjectMgr.cpp
parent131ef5f2d682763e301102047f2f0118c88ac42d (diff)
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
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r--src/server/game/Globals/ObjectMgr.cpp11
1 files changed, 11 insertions, 0 deletions
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;
}
}