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)