mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-25 03:12:09 +01:00
Core/Chat: Control CHAT_MSG_PARTY_LEADER serverside
Closes #14868 Closes #29689
This commit is contained in:
@@ -381,8 +381,10 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == CHAT_MSG_PARTY_LEADER && !group->IsLeader(sender->GetGUID()))
|
||||
return;
|
||||
// control LEADER messages on the server
|
||||
// in a scenario where player has both Group and OriginalGroup,
|
||||
// client will incorrectly send LEADER type when sending message to OriginalGroup while being a leader in regular group
|
||||
type = group->IsLeader(sender->GetGUID()) ? CHAT_MSG_PARTY_LEADER : CHAT_MSG_PARTY;
|
||||
|
||||
sScriptMgr->OnPlayerChat(GetPlayer(), type, lang, msg, group);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user