[7399] Rewrited BattleGround starting code - moved it to battleground class.

Fixed message color for premature finish warnings.
Fixed .debug bg command won't allow 1v0 arenas now, only battlegrounds 1v0.
Added battleground announcer message removed in [7384].
Patch is tested, everything worked for me. You must execute attached sql file!

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-03-07 11:03:56 +01:00
parent 67f307d5f7
commit 1ee2320484
29 changed files with 469 additions and 425 deletions

View file

@ -622,7 +622,7 @@ bool BattleGroundQueue::CheckNormalMatch(BattleGround* bg_template, BGQueueIdBas
return false;
}
//allow 1v0 if debug bg
if( sBattleGroundMgr.isTesting() && (m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() || m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount()) )
if( sBattleGroundMgr.isTesting() && bg_template->isBattleGround() && (m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() || m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount()) )
return true;
//return true if there are enough players in selection pools - enable to work .debug bg command correctly
return m_SelectionPools[BG_TEAM_ALLIANCE].GetPlayerCount() >= minPlayers && m_SelectionPools[BG_TEAM_HORDE].GetPlayerCount() >= minPlayers;