mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/RBAC: Fix players not being able to reply GMs from the other faction (Partial revert of 377cfdb)
This commit is contained in:
@@ -271,14 +271,15 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
|
||||
Player* receiver = sObjectAccessor->FindPlayerByName(to);
|
||||
if (!receiver || (!HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) &&
|
||||
receiver->GetSession()->HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) &&
|
||||
!receiver->isAcceptWhispers() && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
|
||||
{
|
||||
SendPlayerNotFoundNotice(to);
|
||||
return;
|
||||
}
|
||||
|
||||
if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT))
|
||||
// @todo: check only sender permission and add receiver to whiteList if receiver does not have the permission
|
||||
if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT) &&
|
||||
!receiver->GetSession()->HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT))
|
||||
{
|
||||
SendWrongFactionNotice();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user