diff options
author | ModoX <moardox@gmail.com> | 2023-11-24 21:08:00 +0100 |
---|---|---|
committer | funjoker <funjoker109@gmail.com> | 2023-12-01 23:29:27 +0100 |
commit | 477bd4b0d7b37aa53289ad53652875831d66b885 (patch) | |
tree | 33eee6ea4caa28c1080761020ae182e9a089182e /src/server/game/Globals/ObjectMgr.cpp | |
parent | 543d7d5001d7070415bdd649faf9691bf014970e (diff) |
Core/Waypoints: Drop waypoint_scripts table (#29437)
(cherry picked from commit 3f6f683ce4b5f4a95a2d70921de2c80de6b3a8fe)
Diffstat (limited to 'src/server/game/Globals/ObjectMgr.cpp')
-rw-r--r-- | src/server/game/Globals/ObjectMgr.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 09694f457eb..38c78fcc17a 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -74,7 +74,6 @@ ScriptMapMap sSpellScripts; ScriptMapMap sEventScripts; -ScriptMapMap sWaypointScripts; std::string GetScriptsTableNameByType(ScriptsType type) { @@ -83,7 +82,6 @@ std::string GetScriptsTableNameByType(ScriptsType type) { case SCRIPTS_SPELL: res = "spell_scripts"; break; case SCRIPTS_EVENT: res = "event_scripts"; break; - case SCRIPTS_WAYPOINT: res = "waypoint_scripts"; break; default: break; } return res; @@ -96,7 +94,6 @@ ScriptMapMap* GetScriptsMapByType(ScriptsType type) { case SCRIPTS_SPELL: res = &sSpellScripts; break; case SCRIPTS_EVENT: res = &sEventScripts; break; - case SCRIPTS_WAYPOINT: res = &sWaypointScripts; break; default: break; } return res; @@ -5946,35 +5943,6 @@ void ObjectMgr::LoadEventScripts() TC_LOG_INFO("server.loading", ">> Loaded {} event scripts in {} ms", _eventScriptStore.size(), GetMSTimeDiffToNow(oldMSTime)); } -//Load WP Scripts -void ObjectMgr::LoadWaypointScripts() -{ - LoadScripts(SCRIPTS_WAYPOINT); - - std::set<uint32> actionSet; - - for (ScriptMapMap::const_iterator itr = sWaypointScripts.begin(); itr != sWaypointScripts.end(); ++itr) - actionSet.insert(itr->first); - - WorldDatabasePreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_SEL_WAYPOINT_DATA_ACTION); - PreparedQueryResult result = WorldDatabase.Query(stmt); - - if (result) - { - do - { - Field* fields = result->Fetch(); - uint32 action = fields[0].GetUInt32(); - - actionSet.erase(action); - } - while (result->NextRow()); - } - - for (std::set<uint32>::iterator itr = actionSet.begin(); itr != actionSet.end(); ++itr) - TC_LOG_ERROR("sql.sql", "There is no waypoint which links to the waypoint script {}", *itr); -} - void ObjectMgr::LoadSpellScriptNames() { uint32 oldMSTime = getMSTime(); |