From f88fda4f1972d32d26140cf91432caa9ef5578da Mon Sep 17 00:00:00 2001 From: dataCenter430 <161712630+dataCenter430@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:39:24 -0500 Subject: [PATCH] feat(Core/LFG): Implement Debug.LFG config option (#24854) --- .../acore_string_debug_lfg_conf.sql | 4 ++++ src/server/apps/worldserver/worldserver.conf.dist | 8 ++++++++ src/server/game/DungeonFinding/LFGMgr.cpp | 14 +++++++++++--- src/server/game/Miscellaneous/Language.h | 3 ++- src/server/game/World/WorldConfig.cpp | 1 + src/server/game/World/WorldConfig.h | 1 + 6 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 data/sql/updates/pending_db_world/acore_string_debug_lfg_conf.sql diff --git a/data/sql/updates/pending_db_world/acore_string_debug_lfg_conf.sql b/data/sql/updates/pending_db_world/acore_string_debug_lfg_conf.sql new file mode 100644 index 000000000..b7411f9e6 --- /dev/null +++ b/data/sql/updates/pending_db_world/acore_string_debug_lfg_conf.sql @@ -0,0 +1,4 @@ +-- Add acore_string for Debug.LFG config message (same pattern as Debug.Battleground / Debug.Arena) +DELETE FROM `acore_string` WHERE `entry` = 30098; +INSERT INTO `acore_string` (`entry`, `content_default`) VALUES +(30098, 'LFG Debugging is already enabled in the config, thus you are unable to enable/disable it with command.'); diff --git a/src/server/apps/worldserver/worldserver.conf.dist b/src/server/apps/worldserver/worldserver.conf.dist index 16d333b21..3bb2c4b85 100644 --- a/src/server/apps/worldserver/worldserver.conf.dist +++ b/src/server/apps/worldserver/worldserver.conf.dist @@ -4666,6 +4666,14 @@ Debug.Battleground = 0 Debug.Arena = 0 +# +# Debug.LFG +# Description: Enable or disable LFG 1 player queue mode. (If enabled, the in-game command is disabled.) +# Default: 0 - (Disabled) +# 1 - (Enabled) + +Debug.LFG = 0 + # ################################################################################################### diff --git a/src/server/game/DungeonFinding/LFGMgr.cpp b/src/server/game/DungeonFinding/LFGMgr.cpp index fe44c400d..61724fa25 100644 --- a/src/server/game/DungeonFinding/LFGMgr.cpp +++ b/src/server/game/DungeonFinding/LFGMgr.cpp @@ -42,7 +42,7 @@ namespace lfg { - LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_Testing(false) + LFGMgr::LFGMgr(): m_lfgProposalId(1), m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK)), m_Testing(sWorld->getBoolConfig(CONFIG_DEBUG_LFG)) { for (uint8 team = 0; team < 2; ++team) { @@ -805,8 +805,16 @@ namespace lfg void LFGMgr::ToggleTesting() { - m_Testing = !m_Testing; - ChatHandler(nullptr).SendWorldText(m_Testing ? LANG_DEBUG_LFG_ON : LANG_DEBUG_LFG_OFF); + if (sWorld->getBoolConfig(CONFIG_DEBUG_LFG)) + { + m_Testing = true; + ChatHandler(nullptr).SendWorldText(LANG_DEBUG_LFG_CONF); + } + else + { + m_Testing = !m_Testing; + ChatHandler(nullptr).SendWorldText(m_Testing ? LANG_DEBUG_LFG_ON : LANG_DEBUG_LFG_OFF); + } } /** diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 31ae7965a..7d76a57cc 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1368,6 +1368,7 @@ enum AcoreStrings // 30087-30095 reserved for passive anticheat LANG_DEBUG_LFG_ON = 30096, - LANG_DEBUG_LFG_OFF = 30097 + LANG_DEBUG_LFG_OFF = 30097, + LANG_DEBUG_LFG_CONF = 30098 }; #endif diff --git a/src/server/game/World/WorldConfig.cpp b/src/server/game/World/WorldConfig.cpp index d0bdfb48c..62759608b 100644 --- a/src/server/game/World/WorldConfig.cpp +++ b/src/server/game/World/WorldConfig.cpp @@ -644,6 +644,7 @@ void WorldConfig::BuildConfigCache() //Debug SetConfigValue(CONFIG_DEBUG_BATTLEGROUND, "Debug.Battleground", false); SetConfigValue(CONFIG_DEBUG_ARENA, "Debug.Arena", false); + SetConfigValue(CONFIG_DEBUG_LFG, "Debug.LFG", false); SetConfigValue(CONFIG_GM_LEVEL_CHANNEL_MODERATION, "Channel.ModerationGMLevel", 1); diff --git a/src/server/game/World/WorldConfig.h b/src/server/game/World/WorldConfig.h index e0408c7fd..3cf19aa21 100644 --- a/src/server/game/World/WorldConfig.h +++ b/src/server/game/World/WorldConfig.h @@ -121,6 +121,7 @@ enum ServerConfigs CONFIG_ITEMDELETE_VENDOR, CONFIG_DEBUG_BATTLEGROUND, CONFIG_DEBUG_ARENA, + CONFIG_DEBUG_LFG, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PORTAL_CHECK_ILVL, CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE, CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID,