mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[10371] More wide use ObjectGuid in group code.
Also drop some unused functions. And fix some uint32 -> uint6 guid assigns.
This commit is contained in:
parent
acdaac3587
commit
dbe9c6f190
19 changed files with 354 additions and 346 deletions
|
|
@ -254,12 +254,12 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
return;
|
||||
}
|
||||
|
||||
if((type == CHAT_MSG_PARTY_LEADER) && !group->IsLeader(_player->GetGUID()))
|
||||
if ((type == CHAT_MSG_PARTY_LEADER) && !group->IsLeader(_player->GetObjectGuid()))
|
||||
return;
|
||||
|
||||
WorldPacket data;
|
||||
ChatHandler::FillMessageData(&data, this, type, lang, NULL, 0, msg.c_str(), NULL);
|
||||
group->BroadcastPacket(&data, false, group->GetMemberGroup(GetPlayer()->GetGUID()));
|
||||
group->BroadcastPacket(&data, false, group->GetMemberGroup(GetPlayer()->GetObjectGuid()));
|
||||
} break;
|
||||
|
||||
case CHAT_MSG_GUILD:
|
||||
|
|
@ -355,10 +355,10 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
|
||||
// if player is in battleground, he cannot say to battleground members by /ra
|
||||
Group *group = GetPlayer()->GetOriginalGroup();
|
||||
if(!group)
|
||||
if (!group)
|
||||
{
|
||||
group = GetPlayer()->GetGroup();
|
||||
if(!group || group->isBGGroup() || !group->isRaidGroup() || !group->IsLeader(_player->GetGUID()))
|
||||
if (!group || group->isBGGroup() || !group->isRaidGroup() || !group->IsLeader(_player->GetObjectGuid()))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -379,7 +379,8 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
break;
|
||||
|
||||
Group *group = GetPlayer()->GetGroup();
|
||||
if(!group || !group->isRaidGroup() || !(group->IsLeader(GetPlayer()->GetGUID()) || group->IsAssistant(GetPlayer()->GetGUID())))
|
||||
if (!group || !group->isRaidGroup() ||
|
||||
!(group->IsLeader(GetPlayer()->GetObjectGuid()) || group->IsAssistant(GetPlayer()->GetObjectGuid())))
|
||||
return;
|
||||
|
||||
WorldPacket data;
|
||||
|
|
@ -422,7 +423,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
|
|||
|
||||
// battleground raid is always in Player->GetGroup(), never in GetOriginalGroup()
|
||||
Group *group = GetPlayer()->GetGroup();
|
||||
if(!group || !group->isBGGroup() || !group->IsLeader(GetPlayer()->GetGUID()))
|
||||
if (!group || !group->isBGGroup() || !group->IsLeader(GetPlayer()->GetObjectGuid()))
|
||||
return;
|
||||
|
||||
WorldPacket data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue