diff options
author | megamage <none@none> | 2008-12-09 23:06:16 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-09 23:06:16 -0600 |
commit | ebf6469fb4347c2065da9d32992c38c812a05e08 (patch) | |
tree | 0a91e241ef2a4add4a2a44d3544844e013bca371 /src/game/ObjectMgr.cpp | |
parent | 36af87fc72594b3b6e3b91e91cd29a00e1a36480 (diff) | |
parent | cc0838459a86e45ccdbaa4977e20f4233f1ff1c1 (diff) |
*Merge to solve EOL issue.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
-rw-r--r-- | src/game/ObjectMgr.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 36d4317b3ec..1d359a2df7c 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -54,6 +54,7 @@ ScriptMapMap sQuestStartScripts; ScriptMapMap sSpellScripts; ScriptMapMap sGameObjectScripts; ScriptMapMap sEventScripts; +ScriptMapMap sWaypointScripts; bool normalizePlayerName(std::string& name) { @@ -4110,6 +4111,19 @@ void ObjectMgr::LoadEventScripts() } } +//Load WP Scripts +void ObjectMgr::LoadWaypointScripts() +{ + LoadScripts(sWaypointScripts, "waypoint_scripts"); + + for(ScriptMapMap::const_iterator itr = sWaypointScripts.begin(); itr != sWaypointScripts.end(); ++itr) + { + QueryResult *query = WorldDatabase.PQuery("SELECT * FROM `waypoint_scripts` WHERE `id` = %u", itr->first); + if(!query || !query->GetRowCount()) + sLog.outErrorDb("There is no waypoint which links to the waypoint script %u", itr->first); + } +} + void ObjectMgr::LoadItemTexts() { QueryResult *result = CharacterDatabase.Query("SELECT id, text FROM item_text"); @@ -7481,7 +7495,7 @@ void ObjectMgr::LoadDbScriptStrings() CheckScripts(sGameObjectScripts,ids); CheckScripts(sEventScripts,ids); - WaypointMgr.CheckTextsExistance(ids); + CheckScripts(sWaypointScripts,ids); for(std::set<int32>::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) sLog.outErrorDb( "Table `db_script_string` has unused string id %u", *itr); |