Core/Taxi: Fix exploit related to unexplored nodes

This commit is contained in:
Dehravor committed 2014-01-23 15:29:02 +01:00
1 parent 40b9ea3eb2
commit e8e23ef03d
1 file changed
+17
+17
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);
}