[10402] Use ObjectGuid in packets and fix some uint32 guids cases.

This commit is contained in:
VladimirMangos 2010-08-23 12:28:06 +04:00
parent c545392f2e
commit 09b03b470e
24 changed files with 77 additions and 82 deletions

View file

@ -1712,8 +1712,8 @@ void Unit::DealMeleeDamage(CalcDamageInfo *damageInfo, bool durabilityLoss)
pVictim->DealDamageMods(this,damage,NULL);
WorldPacket data(SMSG_SPELLDAMAGESHIELD,(8+8+4+4+4+4));
data << uint64(pVictim->GetGUID());
data << uint64(GetGUID());
data << pVictim->GetObjectGuid();
data << GetObjectGuid();
data << uint32(i_spellProto->Id);
data << uint32(damage); // Damage
data << uint32(0); // Overkill
@ -1735,7 +1735,7 @@ void Unit::HandleEmoteCommand(uint32 emote_id)
{
WorldPacket data( SMSG_EMOTE, 4 + 8 );
data << uint32(emote_id);
data << uint64(GetGUID());
data << GetObjectGuid();
SendMessageToSet(&data, true);
}
@ -2671,8 +2671,8 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
void Unit::SendMeleeAttackStart(Unit* pVictim)
{
WorldPacket data( SMSG_ATTACKSTART, 8 + 8 );
data << uint64(GetGUID());
data << uint64(pVictim->GetGUID());
data << GetObjectGuid();
data << pVictim->GetObjectGuid();
SendMessageToSet(&data, true);
DEBUG_LOG( "WORLD: Sent SMSG_ATTACKSTART" );
@ -5025,11 +5025,11 @@ void Unit::SendSpellMiss(Unit *target, uint32 spellID, SpellMissInfo missInfo)
{
WorldPacket data(SMSG_SPELLLOGMISS, (4+8+1+4+8+1));
data << uint32(spellID);
data << uint64(GetGUID());
data << GetObjectGuid();
data << uint8(0); // can be 0 or 1
data << uint32(1); // target count
// for(i = 0; i < target count; ++i)
data << uint64(target->GetGUID()); // target GUID
data << target->GetObjectGuid(); // target GUID
data << uint8(missInfo);
// end loop
SendMessageToSet(&data, true);
@ -9638,7 +9638,7 @@ void Unit::SendPetTalk (uint32 pettalk)
return;
WorldPacket data(SMSG_PET_ACTION_SOUND, 8 + 4);
data << uint64(GetGUID());
data << GetObjectGuid();
data << uint32(pettalk);
((Player*)owner)->GetSession()->SendPacket(&data);
}