feat(Core/LFG): Implement Debug.LFG config option (#24854)

This commit is contained in:
dataCenter430
2026-02-24 21:39:24 -05:00
committed by GitHub
parent e17df40a57
commit f88fda4f19
6 changed files with 27 additions and 4 deletions

View File

@@ -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.');

View File

@@ -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
#
###################################################################################################

View File

@@ -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);
}
}
/**

View File

@@ -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

View File

@@ -644,6 +644,7 @@ void WorldConfig::BuildConfigCache()
//Debug
SetConfigValue<bool>(CONFIG_DEBUG_BATTLEGROUND, "Debug.Battleground", false);
SetConfigValue<bool>(CONFIG_DEBUG_ARENA, "Debug.Arena", false);
SetConfigValue<bool>(CONFIG_DEBUG_LFG, "Debug.LFG", false);
SetConfigValue<uint32>(CONFIG_GM_LEVEL_CHANNEL_MODERATION, "Channel.ModerationGMLevel", 1);

View File

@@ -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,