[9808] Simplify TaxiPathNodes data use, specially for transport case.

This commit is contained in:
VladimirMangos 2010-04-29 19:41:30 +04:00
parent de3192b2f5
commit 4910add486
8 changed files with 29 additions and 92 deletions

View file

@ -5231,31 +5231,11 @@ void ObjectMgr::GetTaxiPathNodes( uint32 path, Path &pathnodes, std::vector<uint
for(size_t i = 0; i < nodeList.size(); ++i)
{
pathnodes[ i ].x = nodeList[i].x;
pathnodes[ i ].y = nodeList[i].y;
pathnodes[ i ].z = nodeList[i].z;
pathnodes[ i ].x = nodeList[i]->x;
pathnodes[ i ].y = nodeList[i]->y;
pathnodes[ i ].z = nodeList[i]->z;
mapIds[i] = nodeList[i].mapid;
}
}
void ObjectMgr::GetTransportPathNodes( uint32 path, TransportPath &pathnodes )
{
if(path >= sTaxiPathNodesByPath.size())
return;
TaxiPathNodeList& nodeList = sTaxiPathNodesByPath[path];
pathnodes.Resize(nodeList.size());
for(size_t i = 0; i < nodeList.size(); ++i)
{
pathnodes[ i ].mapid = nodeList[i].mapid;
pathnodes[ i ].x = nodeList[i].x;
pathnodes[ i ].y = nodeList[i].y;
pathnodes[ i ].z = nodeList[i].z;
pathnodes[ i ].actionFlag = nodeList[i].actionFlag;
pathnodes[ i ].delay = nodeList[i].delay;
mapIds[i] = nodeList[i]->mapid;
}
}