Merge pull request #11499 from Dehravor/taxi-node

Core/Taxi: Fix exploit related to unexplored nodes
This commit is contained in:
Discover-
2014-01-24 02:15:14 -08:00

View File

@@ -184,6 +184,14 @@ void WorldSession::HandleActivateTaxiExpressOpcode (WorldPacket& recvData)
{
uint32 node;
recvData >> node;
if (!GetPlayer()->m_taxi.IsTaximaskNodeKnown(node) && !GetPlayer()->isTaxiCheater())
{
SendActivateTaxiReply(ERR_TAXINOTVISITED);
recvData.rfinish();
return;
}
nodes.push_back(node);
}
@@ -290,6 +298,15 @@ void WorldSession::HandleActivateTaxiOpcode(WorldPacket& recvData)
return;
}
if (!GetPlayer()->isTaxiCheater())
{
if (!GetPlayer()->m_taxi.IsTaximaskNodeKnown(nodes[0]) || !GetPlayer()->m_taxi.IsTaximaskNodeKnown(nodes[1]))
{
SendActivateTaxiReply(ERR_TAXINOTVISITED);
return;
}
}
GetPlayer()->ActivateTaxiPathTo(nodes, npc);
}