[10562] Cleanup WorldSession::HandlePetAction

Also fixed attack target seelction base at packet content instead direct player selection.
Remove unneded arg for Unit::SendPetAIReaction.
This commit is contained in:
VladimirMangos 2010-09-30 20:37:32 +04:00
parent ab3de84cca
commit 98f36e4652
4 changed files with 22 additions and 22 deletions

View file

@ -9770,14 +9770,14 @@ void Unit::SendPetTalk (uint32 pettalk)
((Player*)owner)->GetSession()->SendPacket(&data);
}
void Unit::SendPetAIReaction(uint64 guid)
void Unit::SendPetAIReaction()
{
Unit* owner = GetOwner();
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
return;
WorldPacket data(SMSG_AI_REACTION, 8 + 4);
data << uint64(guid);
data << GetObjectGuid();
data << uint32(AI_REACTION_HOSTILE);
((Player*)owner)->GetSession()->SendPacket(&data);
}