mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
feat(Core/LFG): Implement Debug.LFG config option (#24854)
This commit is contained in:
@@ -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.');
|
||||||
@@ -4666,6 +4666,14 @@ Debug.Battleground = 0
|
|||||||
|
|
||||||
Debug.Arena = 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
|
||||||
|
|
||||||
#
|
#
|
||||||
###################################################################################################
|
###################################################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
namespace lfg
|
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)
|
for (uint8 team = 0; team < 2; ++team)
|
||||||
{
|
{
|
||||||
@@ -805,8 +805,16 @@ namespace lfg
|
|||||||
|
|
||||||
void LFGMgr::ToggleTesting()
|
void LFGMgr::ToggleTesting()
|
||||||
{
|
{
|
||||||
m_Testing = !m_Testing;
|
if (sWorld->getBoolConfig(CONFIG_DEBUG_LFG))
|
||||||
ChatHandler(nullptr).SendWorldText(m_Testing ? LANG_DEBUG_LFG_ON : LANG_DEBUG_LFG_OFF);
|
{
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1368,6 +1368,7 @@ enum AcoreStrings
|
|||||||
// 30087-30095 reserved for passive anticheat
|
// 30087-30095 reserved for passive anticheat
|
||||||
|
|
||||||
LANG_DEBUG_LFG_ON = 30096,
|
LANG_DEBUG_LFG_ON = 30096,
|
||||||
LANG_DEBUG_LFG_OFF = 30097
|
LANG_DEBUG_LFG_OFF = 30097,
|
||||||
|
LANG_DEBUG_LFG_CONF = 30098
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -644,6 +644,7 @@ void WorldConfig::BuildConfigCache()
|
|||||||
//Debug
|
//Debug
|
||||||
SetConfigValue<bool>(CONFIG_DEBUG_BATTLEGROUND, "Debug.Battleground", false);
|
SetConfigValue<bool>(CONFIG_DEBUG_BATTLEGROUND, "Debug.Battleground", false);
|
||||||
SetConfigValue<bool>(CONFIG_DEBUG_ARENA, "Debug.Arena", 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);
|
SetConfigValue<uint32>(CONFIG_GM_LEVEL_CHANNEL_MODERATION, "Channel.ModerationGMLevel", 1);
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ enum ServerConfigs
|
|||||||
CONFIG_ITEMDELETE_VENDOR,
|
CONFIG_ITEMDELETE_VENDOR,
|
||||||
CONFIG_DEBUG_BATTLEGROUND,
|
CONFIG_DEBUG_BATTLEGROUND,
|
||||||
CONFIG_DEBUG_ARENA,
|
CONFIG_DEBUG_ARENA,
|
||||||
|
CONFIG_DEBUG_LFG,
|
||||||
CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PORTAL_CHECK_ILVL,
|
CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PORTAL_CHECK_ILVL,
|
||||||
CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE,
|
CONFIG_DUNGEON_ACCESS_REQUIREMENTS_LFG_DBC_LEVEL_OVERRIDE,
|
||||||
CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID,
|
CONFIG_REGEN_HP_CANNOT_REACH_TARGET_IN_RAID,
|
||||||
|
|||||||
Reference in New Issue
Block a user