From a6d245058d8b3af5692ea8d5b7fd9c951a66eeef Mon Sep 17 00:00:00 2001 From: balrok Date: Thu, 5 Nov 2009 13:24:44 +0100 Subject: [PATCH] [8778] corrected bg-spawnmodes based on dbc-data so it seems, that the difficulty-level isn't implemented for all battlegrounds (in fact only for alterac valley) we now set the difficulty level based on queue-id and then go down to the highest difficulty-level possible for this map big thx to vladimir for information and help with code :) --- src/game/MapInstanced.cpp | 3 +++ src/shared/revision_nr.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/game/MapInstanced.cpp b/src/game/MapInstanced.cpp index b308e63a8..d59a0b3cc 100644 --- a/src/game/MapInstanced.cpp +++ b/src/game/MapInstanced.cpp @@ -218,6 +218,9 @@ BattleGroundMap* MapInstanced::CreateBattleGroundMap(uint32 InstanceId, BattleGr // 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; + // some bgs don't have different spawnmodes, with this we can stay close to dbc-data + while (!GetMapDifficultyData(GetId(), Difficulty(spawnMode))) + spawnMode--; BattleGroundMap *map = new BattleGroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); ASSERT(map->IsBattleGroundOrArena()); map->SetBG(bg); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 20591613f..c3180d79d 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8777" + #define REVISION_NR "8778" #endif // __REVISION_NR_H__