[10651] Fixed combat log being bugged by pets without name

Signed-off-by: SilverIce <slifeleaf@gmail.com>
This commit is contained in:
nos4r2zod 2010-10-26 20:35:25 +03:00 committed by SilverIce
parent 38e4a4936d
commit f483b41242
2 changed files with 9 additions and 1 deletions

View file

@ -315,7 +315,15 @@ void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
{
Creature* pet = _player->GetMap()->GetAnyTypeCreature(petguid);
if(!pet || !pet->GetCharmInfo() || pet->GetCharmInfo()->GetPetNumber() != petnumber)
{
WorldPacket data(SMSG_PET_NAME_QUERY_RESPONSE, (4+1+4+1));
data << uint32(petnumber);
data << uint8(0);
data << uint32(0);
data << uint8(0);
_player->GetSession()->SendPacket(&data);
return;
}
std::string name = pet->GetName();