mirror of
https://github.com/mangosfour/server.git
synced 2025-12-28 22:37:04 +00:00
Use PVPDificulty.dbc for bg/arena bracket selection (levels and difficulty)
This commit is contained in:
parent
75c81894b2
commit
63709fdc49
15 changed files with 167 additions and 98 deletions
|
|
@ -216,11 +216,10 @@ BattleGroundMap* MapInstanced::CreateBattleGroundMap(uint32 InstanceId, BattleGr
|
|||
|
||||
sLog.outDebug("MapInstanced::CreateBattleGroundMap: instance:%d for map:%d and bgType:%d created.", InstanceId, GetId(), bg->GetTypeID());
|
||||
|
||||
// 0-59 normal spawn 60-69 difficulty_1, 70-79 difficulty_2, 80 dufficulty_3
|
||||
uint8 spawnMode = (bg->GetBracketId() > BG_BRACKET_ID_MAX_LEVEL_59) ? (bg->GetBracketId() - BG_BRACKET_ID_MAX_LEVEL_59) : 0;
|
||||
// some bgs don't have different spawnmodes, with this we can stay close to dbc-data
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue