[11586] Small cleanup and add missing arenas to IsArenaType

This commit is contained in:
zergtmn 2011-06-01 18:30:25 +06:00
parent 4c81559800
commit 96cad8d771
2 changed files with 15 additions and 8 deletions

View file

@ -1484,9 +1484,8 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
//for arenas there is random map used
if (bg_template->isArena())
{
BattleGroundTypeId arenas[] = {BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL};
uint32 arena_num = urand(0,2);
bgTypeId = arenas[arena_num];
BattleGroundTypeId arenas[] = { BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL/*, BATTLEGROUND_DS, BATTLEGROUND_RV*/ };
bgTypeId = arenas[urand(0, countof(arenas)-1)];
bg_template = GetBattleGroundTemplate(bgTypeId);
if (!bg_template)
{
@ -1867,10 +1866,18 @@ void BattleGroundMgr::SendToBattleGround(Player *pl, uint32 instanceId, BattleGr
bool BattleGroundMgr::IsArenaType(BattleGroundTypeId bgTypeId)
{
return ( bgTypeId == BATTLEGROUND_AA ||
bgTypeId == BATTLEGROUND_BE ||
bgTypeId == BATTLEGROUND_NA ||
bgTypeId == BATTLEGROUND_RL );
switch(bgTypeId)
{
case BATTLEGROUND_NA:
case BATTLEGROUND_BE:
case BATTLEGROUND_RL:
case BATTLEGROUND_DS:
case BATTLEGROUND_RV:
case BATTLEGROUND_AA:
return true;
default:
return false;
};
}
BattleGroundQueueTypeId BattleGroundMgr::BGQueueTypeId(BattleGroundTypeId bgTypeId, ArenaType arenaType)

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11585"
#define REVISION_NR "11586"
#endif // __REVISION_NR_H__