From 405f312918136510fde921403ffffa315bdbcb4b Mon Sep 17 00:00:00 2001 From: Spp Date: Mon, 30 Aug 2010 15:25:15 +0200 Subject: Core: Fix more warnings --HG-- branch : trunk --- src/server/game/Maps/MapInstanced.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/server/game/Maps/MapInstanced.cpp') diff --git a/src/server/game/Maps/MapInstanced.cpp b/src/server/game/Maps/MapInstanced.cpp index eb138e66818..fbeeb06019a 100644 --- a/src/server/game/Maps/MapInstanced.cpp +++ b/src/server/game/Maps/MapInstanced.cpp @@ -188,7 +188,7 @@ InstanceMap* MapInstanced::CreateInstance(uint32 InstanceId, InstanceSave *save, } // some instances only have one difficulty - MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(GetId(),difficulty); + GetDownscaledMapDifficultyData(GetId(),difficulty); sLog.outDebug("MapInstanced::CreateInstance: %s map instance %d for %d created with difficulty %s", save?"":"new ", InstanceId, GetId(), difficulty?"heroic":"normal"); @@ -211,7 +211,12 @@ BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battlegroun PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(),bg->GetMinLevel()); - uint8 spawnMode = bracketEntry ? bracketEntry->difficulty : REGULAR_DIFFICULTY; + uint8 spawnMode; + + if (bracketEntry) + spawnMode = bracketEntry->difficulty; + else + spawnMode = REGULAR_DIFFICULTY; BattlegroundMap *map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode); ASSERT(map->IsBattlegroundOrArena()); -- cgit v1.2.3