diff --git a/src/game/DBCStructure.h b/src/game/DBCStructure.h index e799e993a..9a43ea9e9 100644 --- a/src/game/DBCStructure.h +++ b/src/game/DBCStructure.h @@ -1773,7 +1773,7 @@ struct MapDifficulty MapDifficulty(uint32 _resetTime, uint32 _maxPlayers) : resetTime(_resetTime), maxPlayers(_maxPlayers) {} uint32 resetTime; - uint32 maxPlayers; + uint32 maxPlayers; // some heroic dungeons have 0 when expect same value as in normal dificulty case }; struct TalentSpellPos diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 1a4d64282..2d174e42d 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -1134,8 +1134,18 @@ MapDifficulty const* Map::GetMapDifficulty() const uint32 Map::GetMaxPlayers() const { - MapDifficulty const* mapDiff = GetMapDifficulty(); - return mapDiff ? mapDiff->maxPlayers : 0; + 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(i_id, REGULAR_DIFFICULTY); + return normalDiff ? normalDiff->maxPlayers : 0; + } + } + else // I'd rather assert(false); + return 0; } uint32 Map::GetMaxResetDelay() const diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 09d3e9b14..ab44280e1 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 "8883" + #define REVISION_NR "8884" #endif // __REVISION_NR_H__