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.cpp67
1 files changed, 66 insertions, 1 deletions
diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 57af9eb75c0..c778396dd88 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -3193,18 +3193,83 @@ bool Map::IsRaid() const
return i_mapEntry && i_mapEntry->IsRaid();
}
+bool Map::IsLFR() const
+{
+ switch (i_spawnMode)
+ {
+ case DIFFICULTY_LFR:
+ case DIFFICULTY_LFR_NEW:
+ case DIFFICULTY_LFR_15TH_ANNIVERSARY:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool Map::IsNormal() const
+{
+ switch (i_spawnMode)
+ {
+ case DIFFICULTY_NORMAL:
+ case DIFFICULTY_10_N:
+ case DIFFICULTY_25_N:
+ case DIFFICULTY_NORMAL_RAID:
+ case DIFFICULTY_NORMAL_ISLAND:
+ case DIFFICULTY_NORMAL_WARFRONT:
+ return true;
+ default:
+ return false;
+ }
+}
+
bool Map::IsHeroic() const
{
if (DifficultyEntry const* difficulty = sDifficultyStore.LookupEntry(i_spawnMode))
- return difficulty->Flags & DIFFICULTY_FLAG_HEROIC;
+ {
+ if (difficulty->Flags & DIFFICULTY_FLAG_DISPLAY_HEROIC)
+ return true;
+ }
+
+ // compatibility purposes of old difficulties
+ switch (i_spawnMode)
+ {
+ case DIFFICULTY_10_HC:
+ case DIFFICULTY_25_HC:
+ case DIFFICULTY_HEROIC:
+ case DIFFICULTY_3_MAN_SCENARIO_HC:
+ return true;
+ default:
+ return false;
+ }
+}
+
+bool Map::IsMythic() const
+{
+ if (DifficultyEntry const* difficulty = sDifficultyStore.LookupEntry(i_spawnMode))
+ return difficulty->Flags & DIFFICULTY_FLAG_DISPLAY_MYTHIC;
return false;
}
+bool Map::IsMythicPlus() const
+{
+ return IsDungeon() && i_spawnMode == DIFFICULTY_MYTHIC_KEYSTONE;
+}
+
+bool Map::IsHeroicOrHigher() const
+{
+ return IsHeroic() || IsMythic() || IsMythicPlus();
+}
+
bool Map::Is25ManRaid() const
{
return IsRaid() && (i_spawnMode == DIFFICULTY_25_N || i_spawnMode == DIFFICULTY_25_HC);
}
+bool Map::IsTimewalking() const
+{
+ return (IsDungeon() && i_spawnMode == DIFFICULTY_TIMEWALKING) || (IsRaid() && i_spawnMode == DIFFICULTY_TIMEWALKING_RAID);
+}
+
bool Map::IsBattleground() const
{
return i_mapEntry && i_mapEntry->IsBattleground();