Fix push and taxi crashes and add new taxi changes

This commit is contained in:
Rochet2
2015-01-24 02:29:11 +02:00
parent 9fe397aaf5
commit e6e4ecdab1
3 changed files with 34 additions and 38 deletions

View File

@@ -3027,19 +3027,7 @@ namespace LuaPlayer
{
uint32 pathId = Eluna::CHECKVAL<uint32>(L, 2);
if (pathId >= sTaxiPathNodesByPath.size())
return 0;
TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathId];
if (path.size() < 2)
return 0;
std::vector<uint32> nodes;
nodes.resize(2);
nodes[0] = path[0].index;
nodes[1] = path[path.size() - 1].index;
player->ActivateTaxiPathTo(nodes);
player->ActivateTaxiPathTo(pathId);
return 0;
}