From 9b227c8cf2da684c39e888ac7966449ce46914b8 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Thu, 7 May 2026 06:36:46 -0500 Subject: [PATCH] chore(Core/RBAC): Drop redundant AllowTwoSide configs (#25741) Co-authored-by: blinkysc --- .../apps/worldserver/worldserver.conf.dist | 32 ------------------- src/server/game/Handlers/MailHandler.cpp | 2 +- src/server/game/Handlers/Socialhandler.cpp | 2 +- src/server/game/Handlers/TradeHandler.cpp | 1 - src/server/game/World/WorldConfig.cpp | 4 --- src/server/game/World/WorldConfig.h | 4 --- 6 files changed, 2 insertions(+), 43 deletions(-) diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 62448419a..f0d4ff84b 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -4358,14 +4358,6 @@ AllowTwoSide.Interaction.Calendar = 0 AllowTwoSide.Interaction.Chat = 0 -# -# AllowTwoSide.Interaction.Emote -# Description: Allow emote messages between factions (e.g. "/e looks into the sky") -# Default: 0 - (Disabled) -# 1 - (Enabled) - -AllowTwoSide.Interaction.Emote = 0 - # # AllowTwoSide.Interaction.Channel # Description: Allow channel chat between factions. @@ -4407,30 +4399,6 @@ AllowTwoSide.Interaction.Arena = 0 AllowTwoSide.Interaction.Auction = 0 -# -# AllowTwoSide.Interaction.Mail -# Description: Allow sending mails between factions. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -AllowTwoSide.Interaction.Mail = 0 - -# -# AllowTwoSide.AddFriend -# Description: Allow adding friends from other faction the friends list. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -AllowTwoSide.AddFriend = 0 - -# -# AllowTwoSide.Trade -# Description: Allow trading between factions. -# Default: 0 - (Disabled) -# 1 - (Enabled) - -AllowTwoSide.Trade = 0 - # # TalentsInspecting # Description: Allow inspecting characters from the opposing faction. diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp index b7083c0fa..90e04a0ea 100644 --- a/src/server/game/Handlers/MailHandler.cpp +++ b/src/server/game/Handlers/MailHandler.cpp @@ -214,7 +214,7 @@ void WorldSession::HandleSendMail(WorldPacket& recvData) uint32 rc_account = receive ? receive->GetSession()->GetAccountId() : sCharacterCache->GetCharacterAccountIdByGuid(receiverGuid); - if (/*!accountBound*/ GetAccountId() != rc_account && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL) && player->GetTeamId() != rc_teamId && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_INTERACTION_MAIL)) + if (/*!accountBound*/ GetAccountId() != rc_account && player->GetTeamId() != rc_teamId && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_INTERACTION_MAIL)) { player->SendMailResult(0, MAIL_SEND, MAIL_ERR_NOT_YOUR_TEAM); return; diff --git a/src/server/game/Handlers/Socialhandler.cpp b/src/server/game/Handlers/Socialhandler.cpp index 23038746e..ba2ebeae5 100644 --- a/src/server/game/Handlers/Socialhandler.cpp +++ b/src/server/game/Handlers/Socialhandler.cpp @@ -64,7 +64,7 @@ void WorldSession::HandleAddFriendOpcode(WorldPacket& recv_data) { if (friendGuid == GetPlayer()->GetGUID()) friendResult = FRIEND_SELF; - else if (GetPlayer()->GetTeamId() != teamId && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND) && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_ADD_FRIEND)) + else if (GetPlayer()->GetTeamId() != teamId && !HasPermission(rbac::RBAC_PERM_TWO_SIDE_ADD_FRIEND)) friendResult = FRIEND_ENEMY; else if (GetPlayer()->GetSocial()->HasFriend(friendGuid)) friendResult = FRIEND_ALREADY; diff --git a/src/server/game/Handlers/TradeHandler.cpp b/src/server/game/Handlers/TradeHandler.cpp index 1cd6066d7..a6951df67 100644 --- a/src/server/game/Handlers/TradeHandler.cpp +++ b/src/server/game/Handlers/TradeHandler.cpp @@ -723,7 +723,6 @@ void WorldSession::HandleInitiateTradeOpcode(WorldPacket& recvPacket) } if (pOther->GetTeamId() != _player->GetTeamId() && - !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_TRADE) && !GetPlayer()->GetSession()->HasPermission(rbac::RBAC_PERM_ALLOW_TWO_SIDE_TRADE)) { info.Status = TRADE_STATUS_WRONG_FACTION; diff --git a/src/server/game/World/WorldConfig.cpp b/src/server/game/World/WorldConfig.cpp index 0ffd94a4e..b9a9fb473 100644 --- a/src/server/game/World/WorldConfig.cpp +++ b/src/server/game/World/WorldConfig.cpp @@ -204,10 +204,6 @@ void WorldConfig::BuildConfigCache() SetConfigValue(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD, "AllowTwoSide.Interaction.Guild", false); SetConfigValue(CONFIG_ALLOW_TWO_SIDE_INTERACTION_ARENA, "AllowTwoSide.Interaction.Arena", false); SetConfigValue(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION, "AllowTwoSide.Interaction.Auction", false); - SetConfigValue(CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, "AllowTwoSide.Interaction.Mail", false); - SetConfigValue(CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, "AllowTwoSide.AddFriend", false); - SetConfigValue(CONFIG_ALLOW_TWO_SIDE_TRADE, "AllowTwoSide.Trade", false); - SetConfigValue(CONFIG_ALLOW_TWO_SIDE_INTERACTION_EMOTE, "AllowTwoSide.Interaction.Emote", false); SetConfigValue(CONFIG_MIN_PLAYER_NAME, "MinPlayerName", 2, ConfigValueCache::Reloadable::Yes, [](uint32 const& value) { return value > 0 && value <= MAX_PLAYER_NAME; }, "> 0 && <= MAX_PLAYER_NAME"); SetConfigValue(CONFIG_MIN_CHARTER_NAME, "MinCharterName", 2, ConfigValueCache::Reloadable::Yes, [](uint32 const& value) { return value > 0 && value <= MAX_CHARTER_NAME; }, "> 0 && <= MAX_CHARTER_NAME"); diff --git a/src/server/game/World/WorldConfig.h b/src/server/game/World/WorldConfig.h index 8e62a1ee5..20c5fa6e8 100644 --- a/src/server/game/World/WorldConfig.h +++ b/src/server/game/World/WorldConfig.h @@ -35,9 +35,6 @@ enum ServerConfigs CONFIG_ALLOW_TWO_SIDE_INTERACTION_GUILD, CONFIG_ALLOW_TWO_SIDE_INTERACTION_ARENA, CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION, - CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, - CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, - CONFIG_ALLOW_TWO_SIDE_TRADE, CONFIG_ALL_TAXI_PATHS, CONFIG_INSTANCE_IGNORE_LEVEL, CONFIG_INSTANCE_IGNORE_RAID, @@ -118,7 +115,6 @@ enum ServerConfigs CONFIG_CLOSE_IDLE_CONNECTIONS, CONFIG_LFG_LOCATION_ALL, CONFIG_PRELOAD_ALL_NON_INSTANCED_MAP_GRIDS, - CONFIG_ALLOW_TWO_SIDE_INTERACTION_EMOTE, CONFIG_ITEMDELETE_METHOD, CONFIG_ITEMDELETE_VENDOR, CONFIG_DEBUG_BATTLEGROUND,