aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Maps/Map.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Maps/Map.cpp')
-rw-r--r--src/server/game/Maps/Map.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 8dc393c5f85..68657640852 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -3183,18 +3183,11 @@ MapDifficulty const* Map::GetMapDifficulty() const
uint32 InstanceMap::GetMaxPlayers() const
{
- if (MapDifficulty const* mapDiff = GetMapDifficulty())
- {
- if (mapDiff->maxPlayers || IsRegularDifficulty()) // Normal case (expect that regular difficulty always have correct maxplayers)
- return mapDiff->maxPlayers;
- else // DBC have 0 maxplayers for heroic instances with expansion < 2
- { // The heroic entry exists, so we don't have to check anything, simply return normal max players
- MapDifficulty const* normalDiff = GetMapDifficultyData(GetId(), REGULAR_DIFFICULTY);
- return normalDiff ? normalDiff->maxPlayers : 0;
- }
- }
- else // I'd rather ASSERT(false);
- return 0;
+ MapDifficulty const* mapDiff = GetMapDifficulty();
+ if (mapDiff && mapDiff->maxPlayers)
+ return mapDiff->maxPlayers;
+
+ return GetEntry()->maxPlayers;
}
uint32 InstanceMap::GetMaxResetDelay() const