From 6d5d8778fa3b9cf8392f18ccd74ea3613ed0d297 Mon Sep 17 00:00:00 2001 From: VladimirMangos Date: Sun, 16 May 2010 09:51:14 +0400 Subject: [PATCH] [9912] Partly revert [9911] :/ --- src/game/ObjectMgr.cpp | 10 +--------- src/game/WaypointManager.cpp | 24 ------------------------ src/game/WaypointManager.h | 1 - src/shared/revision_nr.h | 2 +- 4 files changed, 2 insertions(+), 35 deletions(-) diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 935d93f60..7beae97da 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -4584,15 +4584,7 @@ void ObjectMgr::LoadCreatureMovementScripts() { LoadScripts(sCreatureMovementScripts, "creature_movement_scripts"); - std::set ids; - - for(ScriptMapMap::const_iterator itr = sCreatureMovementScripts.begin(); itr != sEventScripts.end(); ++itr) - ids.insert(itr->first); - - sWaypointMgr.CheckScriptExistance(ids); - - for(std::set::const_iterator itr = ids.begin(); itr != ids.end(); ++itr) - sLog.outErrorDb("Table `creature_movement_scripts` has script (Id: %u) not referring to any waypoint.", *itr); + // checks are done in WaypointManager::Load } void ObjectMgr::LoadPageTexts() diff --git a/src/game/WaypointManager.cpp b/src/game/WaypointManager.cpp index 65f81efe4..528611dc6 100644 --- a/src/game/WaypointManager.cpp +++ b/src/game/WaypointManager.cpp @@ -394,27 +394,3 @@ void WaypointManager::CheckTextsExistance(std::set& ids) } } } - -void WaypointManager::CheckScriptExistance(std::set& ids) -{ - WaypointPathMap::iterator pmItr = m_pathMap.begin(); - for ( ; pmItr != m_pathMap.end(); ++pmItr) - { - for (size_t i = 0; i < pmItr->second.size(); ++i) - { - uint32 script_id = pmItr->second[i].script_id; - if (!script_id) - continue; - - // Now we check text existence and put all zero texts ids to the end of array - if (sCreatureMovementScripts.find(script_id)==sCreatureMovementScripts.end()) - { - sLog.outErrorDb("Some waypoint has not existing scriptid %u.", script_id); - pmItr->second[i].script_id = 0; - continue; - } - else - ids.erase(script_id); - } - } -} diff --git a/src/game/WaypointManager.h b/src/game/WaypointManager.h index edc464cbb..e0c0eb4f5 100644 --- a/src/game/WaypointManager.h +++ b/src/game/WaypointManager.h @@ -79,7 +79,6 @@ class WaypointManager void SetNodePosition(uint32 id, uint32 point, float x, float y, float z); void SetNodeText(uint32 id, uint32 point, const char *text_field, const char *text); void CheckTextsExistance(std::set& ids); - void CheckScriptExistance(std::set& ids); private: void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a2132ae1f..a7bd53363 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9911" + #define REVISION_NR "9912" #endif // __REVISION_NR_H__