[8056] Move SMSG_CLEAR_COOLDOWN into function and use it. Other cleanups.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
XTZGZoReX 2009-06-21 03:06:08 +04:00 committed by VladimirMangos
parent d97f2bb92f
commit 9b9fe55981
6 changed files with 28 additions and 77 deletions

View file

@ -11017,33 +11017,6 @@ void Unit::SendPetTalk (uint32 pettalk)
((Player*)owner)->GetSession()->SendPacket(&data);
}
void Unit::SendPetSpellCooldown (uint32 spellid, time_t cooltime)
{
Unit* owner = GetOwner();
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
return;
WorldPacket data(SMSG_SPELL_COOLDOWN, 8+1+4+4);
data << uint64(GetGUID());
data << uint8(0x0); // flags (0x1, 0x2)
data << uint32(spellid);
data << uint32(cooltime);
((Player*)owner)->GetSession()->SendPacket(&data);
}
void Unit::SendPetClearCooldown (uint32 spellid)
{
Unit* owner = GetOwner();
if(!owner || owner->GetTypeId() != TYPEID_PLAYER)
return;
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4+8);
data << uint32(spellid);
data << uint64(GetGUID());
((Player*)owner)->GetSession()->SendPacket(&data);
}
void Unit::SendPetAIReaction(uint64 guid)
{
Unit* owner = GetOwner();