diff --git a/src/game/Player.cpp b/src/game/Player.cpp index e0d805bf3..f123e4b1d 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -16736,11 +16736,31 @@ bool Player::ActivateTaxiPathTo(std::vector const& nodes, uint32 mount_i // starting node too far away (cheat?) TaxiNodesEntry const* node = sTaxiNodesStore.LookupEntry(sourcenode); - if( !node || node->map_id != GetMapId() || - (node->x - GetPositionX())*(node->x - GetPositionX())+ - (node->y - GetPositionY())*(node->y - GetPositionY())+ - (node->z - GetPositionZ())*(node->z - GetPositionZ()) > - (2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE) ) + if (!node) + { + WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); + data << uint32(ERR_TAXINOSUCHPATH); + GetSession()->SendPacket(&data); + return false; + } + + // check node starting pos data set case if provided + if (node->x != 0.0f || node->y != 0.0f || node->z != 0.0f) + { + if (node->map_id != GetMapId() || + (node->x - GetPositionX())*(node->x - GetPositionX())+ + (node->y - GetPositionY())*(node->y - GetPositionY())+ + (node->z - GetPositionZ())*(node->z - GetPositionZ()) > + (2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE)*(2*INTERACTION_DISTANCE)) + { + WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); + data << uint32(ERR_TAXITOOFARAWAY); + GetSession()->SendPacket(&data); + return false; + } + } + // node must have pos if not spell case (npc!=0) + else if(npc) { WorldPacket data(SMSG_ACTIVATETAXIREPLY, 4); data << uint32(ERR_TAXIUNSPECIFIEDSERVERERROR); @@ -16806,10 +16826,8 @@ bool Player::ActivateTaxiPathTo(std::vector const& nodes, uint32 mount_i uint32 money = GetMoney(); - if(npc) - { + if (npc) totalcost = (uint32)ceil(totalcost*GetReputationPriceDiscount(npc)); - } if(money < totalcost) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 2aee11595..a06c3d341 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7783" + #define REVISION_NR "7784" #endif // __REVISION_NR_H__