Small vehicle related code cleanup.

This commit is contained in:
VladimirMangos 2009-01-24 00:54:21 +03:00
parent 3f4821acfb
commit 0798b151cc
7 changed files with 14 additions and 12 deletions

View file

@ -285,7 +285,7 @@ void WorldSession::HandlePetNameQuery( WorldPacket & recv_data )
void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
{
Creature* pet = ObjectAccessor::GetCreatureOrPet(*_player, petguid);
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, petguid);
if(!pet || !pet->GetCharmInfo() || pet->GetCharmInfo()->GetPetNumber() != petnumber)
return;
@ -327,7 +327,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
if(ObjectAccessor::FindPlayer(petguid))
return;
Creature* pet = ObjectAccessor::GetCreatureOrPet(*_player, petguid);
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, petguid);
if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm()))
{
@ -464,7 +464,7 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
sLog.outDetail( "HandlePetAbandon. CMSG_PET_ABANDON pet guid is %u", GUID_LOPART(guid) );
// pet/charmed
Creature* pet = ObjectAccessor::GetCreatureOrPet(*_player, guid);
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if(pet)
{
if(pet->isPet())
@ -529,7 +529,7 @@ void WorldSession::HandlePetSpellAutocastOpcode( WorldPacket& recvPacket )
if(ObjectAccessor::FindPlayer(guid))
return;
Creature* pet=ObjectAccessor::GetCreatureOrPet(*_player,guid);
Creature* pet=ObjectAccessor::GetCreatureOrPetOrVehicle(*_player,guid);
if(!pet || (pet != _player->GetPet() && pet != _player->GetCharm()))
{
@ -581,7 +581,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
if (GUID_HIPART(guid) == HIGHGUID_PLAYER)
return;
Creature* pet = ObjectAccessor::GetCreatureOrPet(*_player,guid);
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player,guid);
if(!pet || (pet != _player->GetPet() && pet!= _player->GetCharm()))
{