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:43:27 +0200
commit89a3fc21677f4c253e9ba09bab29e98a77bc875e (patch)
tree274041873ee04b024fb02547423d0badb0985e47 /src/server/game/Globals/ObjectMgr.cpp
parentfa74fa1f4db379b24dfd3366860e15dd6ed28e5a (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 (cherry picked from commit 410cf0dd05e2765cf7806a9165f976a2bcc199d2)
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 2c3f0545318..8b12f60cbb8 100644
--- a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -5104,7 +5104,10 @@ void ObjectMgr::ValidateSpellScripts()
spellScript->_Register();
if (!spellScript->_Validate(spellEntry))
+ {
itr->second.second = false;
+ continue;
+ }
}
if (auraScript)
@@ -5113,9 +5116,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;
}
}