mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[7688] Move Get*IfCanInteractWith to Player including renamed IsGameObjectOfTypeInRange.
This commit is contained in:
parent
82b0ff8b5d
commit
f4adf83cd7
16 changed files with 134 additions and 116 deletions
|
|
@ -78,7 +78,7 @@ void WorldSession::HandleTaxiQueryAvailableNodes( WorldPacket & recv_data )
|
|||
recv_data >> guid;
|
||||
|
||||
// cheating checks
|
||||
Creature *unit = ObjectAccessor::GetNPCIfCanInteractWith(*_player, guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
Creature *unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
if (!unit)
|
||||
{
|
||||
sLog.outDebug( "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
|
||||
|
|
@ -165,7 +165,7 @@ void WorldSession::HandleActivateTaxiFarOpcode ( WorldPacket & recv_data )
|
|||
|
||||
recv_data >> guid >> _totalcost >> node_count;
|
||||
|
||||
Creature *npc = ObjectAccessor::GetNPCIfCanInteractWith(*_player, guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
if (!npc)
|
||||
{
|
||||
sLog.outDebug( "WORLD: HandleActivateTaxiFarOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
|
||||
|
|
@ -266,7 +266,7 @@ void WorldSession::HandleActivateTaxiOpcode( WorldPacket & recv_data )
|
|||
|
||||
recv_data >> guid >> nodes[0] >> nodes[1];
|
||||
sLog.outDebug( "WORLD: Received CMSG_ACTIVATETAXI from %d to %d" ,nodes[0],nodes[1]);
|
||||
Creature *npc = ObjectAccessor::GetNPCIfCanInteractWith(*_player, guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
Creature *npc = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_FLIGHTMASTER);
|
||||
if (!npc)
|
||||
{
|
||||
sLog.outDebug( "WORLD: HandleActivateTaxiOpcode - Unit (GUID: %u) not found or you can't interact with it.", uint32(GUID_LOPART(guid)) );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue