mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
feat(Core/Instance): Add instance validation for creature scripts (#4596)
This commit is contained in:
@@ -5288,7 +5288,7 @@ void ObjectMgr::ValidateSpellScripts()
|
||||
bool valid = true;
|
||||
if (!spellScript && !auraScript)
|
||||
{
|
||||
sLog->outError("TSCR: Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second));
|
||||
sLog->outError("TSCR: Functions GetSpellScript() and GetAuraScript() of script `%s` do not return objects - script skipped", GetScriptName(sitr->second->second).c_str());
|
||||
valid = false;
|
||||
}
|
||||
if (spellScript)
|
||||
@@ -8849,6 +8849,12 @@ void ObjectMgr::LoadScriptNames()
|
||||
sLog->outString();
|
||||
}
|
||||
|
||||
std::string const& ObjectMgr::GetScriptName(uint32 id) const
|
||||
{
|
||||
static std::string const empty = "";
|
||||
return (id < _scriptNamesStore.size()) ? _scriptNamesStore[id] : empty;
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::GetScriptId(const char* name)
|
||||
{
|
||||
// use binary search to find the script name in the sorted vector
|
||||
|
||||
Reference in New Issue
Block a user