feat(Core/Config): Enable/Disable Debug BG/Arena (#3001)

This commit is contained in:
Kitzunu
2020-06-21 13:17:07 +02:00
committed by GitHub
parent 139743004b
commit 0b4af00ab7
6 changed files with 59 additions and 7 deletions

View File

@@ -793,14 +793,30 @@ uint8 BattlegroundMgr::BGArenaType(BattlegroundQueueTypeId bgQueueTypeId)
void BattlegroundMgr::ToggleTesting()
{
m_Testing = !m_Testing;
sWorld->SendWorldText(m_Testing ? LANG_DEBUG_BG_ON : LANG_DEBUG_BG_OFF);
if (sWorld->getBoolConfig(CONFIG_DEBUG_BATTLEGROUND))
{
m_Testing = true;
sWorld->SendWorldText(LANG_DEBUG_BG_CONF);
}
else
{
m_Testing = !m_Testing;
sWorld->SendWorldText(m_Testing ? LANG_DEBUG_BG_ON : LANG_DEBUG_BG_OFF);
}
}
void BattlegroundMgr::ToggleArenaTesting()
{
m_ArenaTesting = !m_ArenaTesting;
sWorld->SendWorldText(m_ArenaTesting ? LANG_DEBUG_ARENA_ON : LANG_DEBUG_ARENA_OFF);
if (sWorld->getBoolConfig(CONFIG_DEBUG_ARENA))
{
m_ArenaTesting = true;
sWorld->SendWorldText(LANG_DEBUG_ARENA_CONF);
}
else
{
m_ArenaTesting = !m_ArenaTesting;
sWorld->SendWorldText(m_ArenaTesting ? LANG_DEBUG_ARENA_ON : LANG_DEBUG_ARENA_OFF);
}
}
void BattlegroundMgr::SetHolidayWeekends(uint32 mask)

View File

@@ -1320,6 +1320,9 @@ enum AcoreStrings
LANG_REMOVEITEM_ERROR = 30082,
LANG_BG_SHARE_QUEST_ERROR = 30083,
LANG_BG_READY_CHECK_ERROR = 30084
LANG_BG_READY_CHECK_ERROR = 30084,
LANG_DEBUG_BG_CONF = 30085,
LANG_DEBUG_ARENA_CONF = 30086
};
#endif

View File

@@ -1404,6 +1404,10 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER] = sConfigMgr->GetIntDefault("WaypointMovementStopTimeForPlayer", 120);
//Debug
m_bool_configs[CONFIG_DEBUG_BATTLEGROUND] = sConfigMgr->GetBoolDefault("Debug.Battleground", false);
m_bool_configs[CONFIG_DEBUG_ARENA] = sConfigMgr->GetBoolDefault("Debug.Arena", false);
// call ScriptMgr if we're reloading the configuration
sScriptMgr->OnAfterConfigLoad(reload);
}

View File

@@ -176,6 +176,8 @@ enum WorldBoolConfigs
CONFIG_ITEMDELETE_METHOD,
CONFIG_ITEMDELETE_VENDOR,
CONFIG_SET_ALL_CREATURES_WITH_WAYPOINT_MOVEMENT_ACTIVE,
CONFIG_DEBUG_BATTLEGROUND,
CONFIG_DEBUG_ARENA,
BOOL_CONFIG_VALUE_COUNT
};

View File

@@ -27,6 +27,7 @@
# CHARACTER DELETE OPTIONS
# ITEM DELETE OPTIONS
# CUSTOM SERVER OPTIONS
# DEBUG
#
###################################################################################################
@@ -3515,7 +3516,6 @@ ICC.Buff.Alliance = 73828
###################################################################################################
###################################################################################################
#
# Packet Spoof Protection Settings
#
# These settings determine which action to take when harmful packet spoofing is detected.
@@ -3548,4 +3548,25 @@ PacketSpoof.BanMode = 0
PacketSpoof.BanDuration = 86400
#
###################################################################################################
###################################################################################################
###################################################################################################
# DEBUG
#
# Debug.Battleground
# Description: Enable or disable Battleground 1v0 mode. (If enabled, the in-game command is disabled.)
# Default: 0 - (Disabled)
# 1 - (Enabled)
Debug.Battleground = 0
#
# Debug.Arena
# Description: Enable or disable Arena 1v1 mode. (If enabled, the in-game command is disabled.)
# Default: 0 - (Disabled)
# 1 - (Enabled)
Debug.Arena = 0
#
###################################################################################################