mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9912] Partly revert [9911] :/
This commit is contained in:
parent
112afc260c
commit
6d5d8778fa
4 changed files with 2 additions and 35 deletions
|
|
@ -4584,15 +4584,7 @@ void ObjectMgr::LoadCreatureMovementScripts()
|
||||||
{
|
{
|
||||||
LoadScripts(sCreatureMovementScripts, "creature_movement_scripts");
|
LoadScripts(sCreatureMovementScripts, "creature_movement_scripts");
|
||||||
|
|
||||||
std::set<uint32> ids;
|
// checks are done in WaypointManager::Load
|
||||||
|
|
||||||
for(ScriptMapMap::const_iterator itr = sCreatureMovementScripts.begin(); itr != sEventScripts.end(); ++itr)
|
|
||||||
ids.insert(itr->first);
|
|
||||||
|
|
||||||
sWaypointMgr.CheckScriptExistance(ids);
|
|
||||||
|
|
||||||
for(std::set<uint32>::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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ObjectMgr::LoadPageTexts()
|
void ObjectMgr::LoadPageTexts()
|
||||||
|
|
|
||||||
|
|
@ -394,27 +394,3 @@ void WaypointManager::CheckTextsExistance(std::set<int32>& ids)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WaypointManager::CheckScriptExistance(std::set<uint32>& 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ class WaypointManager
|
||||||
void SetNodePosition(uint32 id, uint32 point, float x, float y, float z);
|
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 SetNodeText(uint32 id, uint32 point, const char *text_field, const char *text);
|
||||||
void CheckTextsExistance(std::set<int32>& ids);
|
void CheckTextsExistance(std::set<int32>& ids);
|
||||||
void CheckScriptExistance(std::set<uint32>& ids);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid);
|
void _addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9911"
|
#define REVISION_NR "9912"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue