[10912] Move scripting related functions from ObjectMgr to ScriptMgr

This commit is contained in:
zergtmn 2010-12-24 00:23:31 +05:00
parent f61166c2bf
commit 0d6f990e4e
23 changed files with 1297 additions and 1185 deletions

View file

@ -45,6 +45,7 @@
#include "ItemEnchantmentMgr.h"
#include "MapManager.h"
#include "ScriptCalls.h"
#include "ScriptMgr.h"
#include "CreatureAIRegistry.h"
#include "Policies/SingletonImp.h"
#include "BattleGroundMgr.h"
@ -922,7 +923,7 @@ void World::SetInitialWorldSettings()
sObjectMgr.SetDBCLocaleIndex(GetDefaultDbcLocale()); // Get once for all the locale index of DBC language (console/broadcasts)
sLog.outString( "Loading Script Names...");
sObjectMgr.LoadScriptNames();
sScriptMgr.LoadScriptNames();
sLog.outString( "Loading InstanceTemplate..." );
sObjectMgr.LoadInstanceTemplate();
@ -1080,10 +1081,10 @@ void World::SetInitialWorldSettings()
sObjectMgr.LoadTavernAreaTriggers();
sLog.outString( "Loading AreaTrigger script names..." );
sObjectMgr.LoadAreaTriggerScripts();
sScriptMgr.LoadAreaTriggerScripts();
sLog.outString( "Loading event id script names..." );
sObjectMgr.LoadEventIdScripts();
sScriptMgr.LoadEventIdScripts();
sLog.outString( "Loading Graveyard-zone links...");
sObjectMgr.LoadGraveyardZones();
@ -1150,7 +1151,7 @@ void World::SetInitialWorldSettings()
sObjectMgr.LoadNpcTextId(); // must be after load Creature and LoadGossipText
sLog.outString( "Loading Gossip scripts..." );
sObjectMgr.LoadGossipScripts(); // must be before gossip menu options
sScriptMgr.LoadGossipScripts(); // must be before gossip menu options
sLog.outString( "Loading Gossip menus..." );
sObjectMgr.LoadGossipMenu();
@ -1167,7 +1168,7 @@ void World::SetInitialWorldSettings()
sObjectMgr.LoadTrainers(); // must be after load CreatureTemplate, TrainerTemplate
sLog.outString( "Loading Waypoint scripts..." ); // before loading from creature_movement
sObjectMgr.LoadCreatureMovementScripts();
sScriptMgr.LoadCreatureMovementScripts();
sLog.outString( "Loading Waypoints..." );
sLog.outString();
@ -1228,16 +1229,16 @@ void World::SetInitialWorldSettings()
///- Load and initialize scripts
sLog.outString( "Loading Scripts..." );
sLog.outString();
sObjectMgr.LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
sObjectMgr.LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
sObjectMgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr.LoadGameObjectScripts(); // must be after load Creature/Gameobject(Template/Data)
sObjectMgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
sScriptMgr.LoadQuestStartScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
sScriptMgr.LoadQuestEndScripts(); // must be after load Creature/Gameobject(Template/Data) and QuestTemplate
sScriptMgr.LoadSpellScripts(); // must be after load Creature/Gameobject(Template/Data)
sScriptMgr.LoadGameObjectScripts(); // must be after load Creature/Gameobject(Template/Data)
sScriptMgr.LoadEventScripts(); // must be after load Creature/Gameobject(Template/Data)
sLog.outString( ">>> Scripts loaded" );
sLog.outString();
sLog.outString( "Loading Scripts text locales..." ); // must be after Load*Scripts calls
sObjectMgr.LoadDbScriptStrings();
sScriptMgr.LoadDbScriptStrings();
sLog.outString( "Loading CreatureEventAI Texts...");
sEventAIMgr.LoadCreatureEventAI_Texts(false); // false, will checked in LoadCreatureEventAI_Scripts