mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[10402] Use ObjectGuid in packets and fix some uint32 guids cases.
This commit is contained in:
parent
c545392f2e
commit
09b03b470e
24 changed files with 77 additions and 82 deletions
|
|
@ -297,7 +297,7 @@ void WorldSession::HandleGroupUninviteOpcode(WorldPacket & recv_data)
|
|||
if (!grp)
|
||||
return;
|
||||
|
||||
ObjectGuid guid = grp->GetMemberGUID(membername);
|
||||
ObjectGuid guid = grp->GetMemberGuid(membername);
|
||||
if (!guid.IsEmpty())
|
||||
{
|
||||
Player::RemoveFromGroup(grp, guid);
|
||||
|
|
@ -426,7 +426,7 @@ void WorldSession::HandleMinimapPingOpcode(WorldPacket& recv_data)
|
|||
|
||||
// everything is fine, do it
|
||||
WorldPacket data(MSG_MINIMAP_PING, (8+4+4));
|
||||
data << uint64(GetPlayer()->GetGUID());
|
||||
data << GetPlayer()->GetObjectGuid();
|
||||
data << float(x);
|
||||
data << float(y);
|
||||
GetPlayer()->GetGroup()->BroadcastPacket(&data, true, -1, GetPlayer()->GetObjectGuid());
|
||||
|
|
@ -452,7 +452,7 @@ void WorldSession::HandleRandomRollOpcode(WorldPacket& recv_data)
|
|||
data << uint32(minimum);
|
||||
data << uint32(maximum);
|
||||
data << uint32(roll);
|
||||
data << uint64(GetPlayer()->GetGUID());
|
||||
data << GetPlayer()->GetObjectGuid();
|
||||
if(GetPlayer()->GetGroup())
|
||||
GetPlayer()->GetGroup()->BroadcastPacket(&data, false);
|
||||
else
|
||||
|
|
@ -630,7 +630,7 @@ void WorldSession::HandleRaidReadyCheckOpcode( WorldPacket & recv_data )
|
|||
|
||||
// everything is fine, do it
|
||||
WorldPacket data(MSG_RAID_READY_CHECK_CONFIRM, 9);
|
||||
data << uint64(GetPlayer()->GetGUID());
|
||||
data << GetPlayer()->GetObjectGuid();
|
||||
data << uint8(state);
|
||||
group->BroadcastReadyCheck(&data);
|
||||
}
|
||||
|
|
@ -721,12 +721,7 @@ void WorldSession::BuildPartyMemberStatsChangedPacket(Player *player, WorldPacke
|
|||
|
||||
Pet *pet = player->GetPet();
|
||||
if (mask & GROUP_UPDATE_FLAG_PET_GUID)
|
||||
{
|
||||
if(pet)
|
||||
*data << uint64(pet->GetGUID());
|
||||
else
|
||||
*data << uint64(0);
|
||||
}
|
||||
*data << (pet ? pet->GetObjectGuid() : ObjectGuid());
|
||||
|
||||
if (mask & GROUP_UPDATE_FLAG_PET_NAME)
|
||||
{
|
||||
|
|
@ -863,7 +858,7 @@ void WorldSession::HandleRequestPartyMemberStatsOpcode( WorldPacket &recv_data )
|
|||
if(pet)
|
||||
{
|
||||
Powers petpowertype = pet->getPowerType();
|
||||
data << uint64(pet->GetGUID()); // GROUP_UPDATE_FLAG_PET_GUID
|
||||
data << pet->GetObjectGuid(); // GROUP_UPDATE_FLAG_PET_GUID
|
||||
data << pet->GetName(); // GROUP_UPDATE_FLAG_PET_NAME
|
||||
data << uint16(pet->GetDisplayId()); // GROUP_UPDATE_FLAG_PET_MODEL_ID
|
||||
data << uint32(pet->GetHealth()); // GROUP_UPDATE_FLAG_PET_CUR_HP
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue