diff options
| author | Subv <subv2112@gmail.com> | 2014-07-13 16:52:38 -0500 |
|---|---|---|
| committer | Subv <subv2112@gmail.com> | 2014-07-13 16:52:38 -0500 |
| commit | dfdc19f3bc57757965d1d3b760a27622e411eb05 (patch) | |
| tree | 08025cfd4bbdef881149291e926eaf1d4676f441 /src/server/game/Maps | |
| parent | f14399d7887b221eb61378863c9c314adbcdebc1 (diff) | |
Merge branch `master` into `boost`
Conflicts:
BattlegroundMgr.h
Diffstat (limited to 'src/server/game/Maps')
| -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 1de13d137c4..9c023b86bc9 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()) |
