mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
*Do not check for charminfo->petnumber when responding to Pet name query
*Send Unknown if pet is not found by object accessor --HG-- branch : trunk
This commit is contained in:
@@ -358,8 +358,16 @@ void WorldSession::HandlePetNameQuery( WorldPacket & recv_data )
|
||||
void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
|
||||
{
|
||||
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, petguid);
|
||||
if(!pet || !pet->GetCharmInfo() || pet->GetCharmInfo()->GetPetNumber() != petnumber)
|
||||
if(!pet)
|
||||
{
|
||||
WorldPacket data(SMSG_PET_NAME_QUERY_RESPONSE, (4+4+name.size()+1));
|
||||
data << uint32(petnumber);
|
||||
data << "Unknown";
|
||||
data << uint32(0);
|
||||
data << uint8(0);
|
||||
_player->GetSession()->SendPacket(&data);
|
||||
return;
|
||||
}
|
||||
|
||||
std::string name = pet->GetName();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user