add .debug bg to allow starting a battleground with just one player

it's implemented like .debug arena - so you toggle debug bg
on or off
This commit is contained in:
balrok 2009-01-24 18:38:05 +01:00 committed by VladimirMangos
parent 3c38b4d3e6
commit 78a6d084bc
5 changed files with 22 additions and 1 deletions

View file

@ -721,7 +721,7 @@ void BattleGroundQueue::Update(BattleGroundTypeId bgTypeId, uint32 queue_id, uin
sLog.outDebug("Battleground: horde pool wasn't created");
// if selection pools are ready, create the new bg
if (bAllyOK && bHordeOK)
if ((bAllyOK && bHordeOK) || ( sBattleGroundMgr.isTesting() && (bAllyOK || bHordeOK)))
{
BattleGround * bg2 = 0;
// special handling for arenas
@ -1077,6 +1077,7 @@ BattleGroundMgr::BattleGroundMgr() : m_AutoDistributionTimeChecker(0), m_ArenaTe
{
m_BattleGrounds.clear();
m_NextRatingDiscardUpdate = sWorld.getConfig(CONFIG_ARENA_RATING_DISCARD_TIMER);
m_Testing=false;
}
BattleGroundMgr::~BattleGroundMgr()
@ -1894,6 +1895,15 @@ uint8 BattleGroundMgr::BGArenaType(uint32 bgQueueTypeId)
}
}
void BattleGroundMgr::ToggleTesting()
{
m_Testing = !m_Testing;
if(m_Testing)
sWorld.SendGlobalText("Battlegrounds are set to 1v0 for debugging.", NULL);
else
sWorld.SendGlobalText("Battlegrounds are set to normal playercount.", NULL);
}
void BattleGroundMgr::ToggleArenaTesting()
{
m_ArenaTesting = !m_ArenaTesting;