diff options
author | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-07-09 21:09:47 +0200 |
---|---|---|
committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2014-07-09 21:09:47 +0200 |
commit | 79062dd5ae49ec0e22350eaf8c0c2ce66f9db22d (patch) | |
tree | 0f2fdcd19b8541d82774c5b862b4c1448226c639 /src/server/game/Maps/MapManager.cpp | |
parent | c8eb69df10b36d19a77743a037e700b001c8ed77 (diff) | |
parent | b78d0a1c6dc8a2275924746291f1c9edcca09b0b (diff) |
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts:
sql/base/auth_database.sql
src/server/game/Battlegrounds/Battleground.h
src/server/game/Battlegrounds/BattlegroundMgr.cpp
src/server/game/World/World.cpp
Diffstat (limited to 'src/server/game/Maps/MapManager.cpp')
-rw-r--r-- | src/server/game/Maps/MapManager.cpp | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/server/game/Maps/MapManager.cpp b/src/server/game/Maps/MapManager.cpp index d03358c821c..d6c849f4387 100644 --- a/src/server/game/Maps/MapManager.cpp +++ b/src/server/game/Maps/MapManager.cpp @@ -131,21 +131,15 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player, bool loginCheck) if (!instance) return false; - Difficulty targetDifficulty = player->GetDifficulty(entry->IsRaid()); - //The player has a heroic mode and tries to enter into instance which has no a heroic mode - MapDifficulty const* mapDiff = GetMapDifficultyData(entry->MapID, targetDifficulty); + Difficulty targetDifficulty, requestedDifficulty; + targetDifficulty = requestedDifficulty = player->GetDifficulty(entry->IsRaid()); + // Get the highest available difficulty if current setting is higher than the instance allows + MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(entry->MapID, targetDifficulty); if (!mapDiff) { - // Send aborted message for dungeons - if (entry->IsNonRaidDungeon()) - { - player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, player->GetDungeonDifficulty()); - return false; - } - else // attempt to downscale - mapDiff = GetDownscaledMapDifficultyData(entry->MapID, targetDifficulty); + player->SendTransferAborted(mapid, TRANSFER_ABORT_DIFFICULTY, requestedDifficulty); + return false; } - // FIXME: mapDiff is never used //Bypass checks for GMs if (player->IsGameMaster()) |