mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11985] Implement support for go_template_scripts
Add a new table `gameobject_template_scripts` to start scripts for any type gameobject. Scripts in this table are triggered for all gameobjects on GameObject::Use Note: The table `gameobject_scripts` is expected to not be required very much longer, and will most likely be removed someday
This commit is contained in:
parent
4e6fbf5e9e
commit
010d29d1ed
9 changed files with 94 additions and 5 deletions
|
|
@ -34,6 +34,7 @@ ScriptMapMapName sQuestEndScripts;
|
|||
ScriptMapMapName sQuestStartScripts;
|
||||
ScriptMapMapName sSpellScripts;
|
||||
ScriptMapMapName sGameObjectScripts;
|
||||
ScriptMapMapName sGameObjectTemplateScripts;
|
||||
ScriptMapMapName sEventScripts;
|
||||
ScriptMapMapName sGossipScripts;
|
||||
ScriptMapMapName sCreatureMovementScripts;
|
||||
|
|
@ -598,6 +599,18 @@ void ScriptMgr::LoadGameObjectScripts()
|
|||
}
|
||||
}
|
||||
|
||||
void ScriptMgr::LoadGameObjectTemplateScripts()
|
||||
{
|
||||
LoadScripts(sGameObjectTemplateScripts, "gameobject_template_scripts");
|
||||
|
||||
// check ids
|
||||
for (ScriptMapMap::const_iterator itr = sGameObjectTemplateScripts.second.begin(); itr != sGameObjectTemplateScripts.second.end(); ++itr)
|
||||
{
|
||||
if (!sObjectMgr.GetGameObjectInfo(itr->first))
|
||||
sLog.outErrorDb("Table `gameobject_template_scripts` has not existing gameobject (Entry: %u) as script id", itr->first);
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptMgr::LoadQuestEndScripts()
|
||||
{
|
||||
LoadScripts(sQuestEndScripts, "quest_end_scripts");
|
||||
|
|
@ -754,6 +767,7 @@ void ScriptMgr::LoadDbScriptStrings()
|
|||
CheckScriptTexts(sQuestStartScripts, ids);
|
||||
CheckScriptTexts(sSpellScripts, ids);
|
||||
CheckScriptTexts(sGameObjectScripts, ids);
|
||||
CheckScriptTexts(sGameObjectTemplateScripts, ids);
|
||||
CheckScriptTexts(sEventScripts, ids);
|
||||
CheckScriptTexts(sGossipScripts, ids);
|
||||
CheckScriptTexts(sCreatureMovementScripts, ids);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue