mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Entities: Use ObjectGuid class in game project
This commit is contained in:
@@ -87,8 +87,8 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
|
||||
void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
uint64 gguid = group ? group->GetGUID() : guid;
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid gguid = group ? group->GetGUID() : guid;
|
||||
|
||||
TC_LOG_DEBUG("lfg", "CMSG_LFG_LEAVE %s in group: %u",
|
||||
GetPlayerInfo().c_str(), group ? 1 : 0);
|
||||
@@ -114,7 +114,7 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint8 roles;
|
||||
recvData >> roles; // Player Group Roles
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
if (!group)
|
||||
{
|
||||
@@ -122,9 +122,9 @@ void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
|
||||
GetPlayerInfo().c_str());
|
||||
return;
|
||||
}
|
||||
uint64 gguid = group->GetGUID();
|
||||
ObjectGuid gguid = group->GetGUID();
|
||||
TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
|
||||
GUID_LOPART(gguid), GetPlayerInfo().c_str(), roles);
|
||||
gguid.GetCounter(), GetPlayerInfo().c_str(), roles);
|
||||
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
|
||||
bool agree; // Agree to kick player
|
||||
recvData >> agree;
|
||||
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
TC_LOG_DEBUG("lfg", "CMSG_LFG_SET_BOOT_VOTE %s agree: %u",
|
||||
GetPlayerInfo().c_str(), agree ? 1 : 0);
|
||||
sLFGMgr->UpdateBoot(guid, agree);
|
||||
@@ -162,7 +162,7 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
TC_LOG_DEBUG("lfg", "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST %s",
|
||||
GetPlayerInfo().c_str());
|
||||
|
||||
@@ -233,7 +233,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
|
||||
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
TC_LOG_DEBUG("lfg", "CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", GetPlayerInfo().c_str());
|
||||
|
||||
Group* group = GetPlayer()->GetGroup();
|
||||
@@ -248,7 +248,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
if (!plrg)
|
||||
continue;
|
||||
|
||||
uint64 pguid = plrg->GetGUID();
|
||||
ObjectGuid pguid = plrg->GetGUID();
|
||||
if (pguid == guid)
|
||||
continue;
|
||||
|
||||
@@ -287,7 +287,7 @@ void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
|
||||
{
|
||||
TC_LOG_DEBUG("lfg", "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
|
||||
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
lfg::LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
|
||||
|
||||
if (GetPlayer()->GetGroup())
|
||||
@@ -385,10 +385,10 @@ void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
|
||||
void WorldSession::SendLfgRoleChosen(ObjectGuid guid, uint8 roles)
|
||||
{
|
||||
TC_LOG_DEBUG("lfg", "SMSG_LFG_ROLE_CHOSEN %s guid: %u roles: %u",
|
||||
GetPlayerInfo().c_str(), GUID_LOPART(guid), roles);
|
||||
GetPlayerInfo().c_str(), guid.GetCounter(), roles);
|
||||
|
||||
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
|
||||
data << uint64(guid); // Guid
|
||||
@@ -419,7 +419,7 @@ void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
|
||||
if (!roleCheck.roles.empty())
|
||||
{
|
||||
// Leader info MUST be sent 1st :S
|
||||
uint64 guid = roleCheck.leader;
|
||||
ObjectGuid guid = roleCheck.leader;
|
||||
uint8 roles = roleCheck.roles.find(guid)->second;
|
||||
data << uint64(guid); // Guid
|
||||
data << uint8(roles > 0); // Ready
|
||||
@@ -520,7 +520,7 @@ void WorldSession::SendLfgPlayerReward(lfg::LfgPlayerRewardData const& rewardDat
|
||||
|
||||
void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
lfg::LfgAnswer playerVote = boot.votes.find(guid)->second;
|
||||
uint8 votesNum = 0;
|
||||
uint8 agreeNum = 0;
|
||||
@@ -538,7 +538,7 @@ void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
|
||||
"didVote: %u - agree: %u - victim: %u votes: %u - agrees: %u - left: %u - "
|
||||
"needed: %u - reason %s",
|
||||
GetPlayerInfo().c_str(), uint8(boot.inProgress), uint8(playerVote != lfg::LFG_ANSWER_PENDING),
|
||||
uint8(playerVote == lfg::LFG_ANSWER_AGREE), GUID_LOPART(boot.victim), votesNum, agreeNum,
|
||||
uint8(playerVote == lfg::LFG_ANSWER_AGREE), boot.victim.GetCounter(), votesNum, agreeNum,
|
||||
secsleft, lfg::LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
|
||||
WorldPacket data(SMSG_LFG_BOOT_PROPOSAL_UPDATE, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + boot.reason.length());
|
||||
data << uint8(boot.inProgress); // Vote in progress
|
||||
@@ -555,8 +555,8 @@ void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
|
||||
|
||||
void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
uint64 gguid = proposal.players.find(guid)->second.group;
|
||||
ObjectGuid guid = GetPlayer()->GetGUID();
|
||||
ObjectGuid gguid = proposal.players.find(guid)->second.group;
|
||||
bool silent = !proposal.isNew && gguid == proposal.group;
|
||||
uint32 dungeonEntry = proposal.dungeonId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user