mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Merge pull request #11499 from Dehravor/taxi-node
Core/Taxi: Fix exploit related to unexplored nodes
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user