mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9808] Simplify TaxiPathNodes data use, specially for transport case.
This commit is contained in:
parent
de3192b2f5
commit
4910add486
8 changed files with 29 additions and 92 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue