diff options
author | n0n4m3 <none@none> | 2010-02-15 15:31:27 +0100 |
---|---|---|
committer | n0n4m3 <none@none> | 2010-02-15 15:31:27 +0100 |
commit | 3dd6fdedf739ac87fa9da9a294bdc9ffdca28441 (patch) | |
tree | ed560ee6b3d45e18487abf73d17475b6cac16101 /src/game/MapInstanced.cpp | |
parent | 535068d7401720e6f36410a4e953a94ac4da84ec (diff) |
Use PVPDificulty.dbc for bg/arena bracket selection (levels and difficulty). Rename BG/arena queue_id to bracket_id and related functions/etc. Author: VladimirMangos.
--HG--
branch : trunk
Diffstat (limited to 'src/game/MapInstanced.cpp')
-rw-r--r-- | src/game/MapInstanced.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/MapInstanced.cpp b/src/game/MapInstanced.cpp index f6429d40892..e7d7187d0b5 100644 --- a/src/game/MapInstanced.cpp +++ b/src/game/MapInstanced.cpp @@ -219,10 +219,10 @@ BattleGroundMap* MapInstanced::CreateBattleGround(uint32 InstanceId, BattleGroun sLog.outDebug("MapInstanced::CreateBattleGround: map bg %d for %d created.", InstanceId, GetId()); - // 0-59 normal spawn 60-69 difficulty_1, 70-79 difficulty_2, 80 dufficulty_3 - uint8 spawnMode = (bg->GetQueueId() > QUEUE_ID_MAX_LEVEL_59) ? (bg->GetQueueId() - QUEUE_ID_MAX_LEVEL_59) : 0; - while (!GetMapDifficultyData(GetId(), Difficulty(spawnMode))) - spawnMode--; + PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),bg->GetMinLevel()); + + uint8 spawnMode = bracketEntry ? bracketEntry->difficulty : REGULAR_DIFFICULTY; + BattleGroundMap *map = new BattleGroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); ASSERT(map->IsBattleGroundOrArena()); map->SetBG(bg); |