mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 13:37:13 +00:00
[11586] Small cleanup and add missing arenas to IsArenaType
This commit is contained in:
parent
4c81559800
commit
96cad8d771
2 changed files with 15 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue