aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/DataStores/DB2Structure.h8
-rw-r--r--src/server/game/DataStores/DBCEnums.h12
2 files changed, 13 insertions, 7 deletions
diff --git a/src/server/game/DataStores/DB2Structure.h b/src/server/game/DataStores/DB2Structure.h
index f1d2e6f7fcf..9e08a04866d 100644
--- a/src/server/game/DataStores/DB2Structure.h
+++ b/src/server/game/DataStores/DB2Structure.h
@@ -2589,9 +2589,9 @@ struct MapDifficultyEntry
uint32 MapID;
bool HasResetSchedule() const { return ResetInterval != MAP_DIFFICULTY_RESET_ANYTIME; }
- bool IsUsingEncounterLocks() const { return (Flags & MAP_DIFFICULTY_FLAG_LOCK_TO_ENCOUNTER) != 0; }
- bool IsRestoringDungeonState() const { return (Flags & MAP_DIFFICULTY_FLAG_RESTORE_DUNGEON_STATE) != 0; }
- bool IsExtendable() const { return (Flags & MAP_DIFFICULTY_FLAG_CANNOT_EXTEND) == 0; }
+ bool IsUsingEncounterLocks() const { return GetFlags().HasFlag(MapDifficultyFlags::UseLootBasedLockInsteadOfInstanceLock); }
+ bool IsRestoringDungeonState() const { return GetFlags().HasFlag(MapDifficultyFlags::ResumeDungeonProgressBasedOnLockout); }
+ bool IsExtendable() const { return !GetFlags().HasFlag(MapDifficultyFlags::DisableLockExtension); }
uint32 GetRaidDuration() const
{
@@ -2601,6 +2601,8 @@ struct MapDifficultyEntry
return 604800;
return 0;
}
+
+ EnumFlag<MapDifficultyFlags> GetFlags() const { return static_cast<MapDifficultyFlags>(Flags); }
};
struct MapDifficultyXConditionEntry
diff --git a/src/server/game/DataStores/DBCEnums.h b/src/server/game/DataStores/DBCEnums.h
index 94e9ad90685..dc3a8a1a95c 100644
--- a/src/server/game/DataStores/DBCEnums.h
+++ b/src/server/game/DataStores/DBCEnums.h
@@ -1076,13 +1076,17 @@ enum class MapFlags2 : uint32
DEFINE_ENUM_FLAG(MapFlags2);
-enum MapDifficultyFlags : uint8
+enum class MapDifficultyFlags : uint8
{
- MAP_DIFFICULTY_FLAG_LOCK_TO_ENCOUNTER = 0x02, // Lock to single encounters
- MAP_DIFFICULTY_FLAG_RESTORE_DUNGEON_STATE = 0x08, // Mythic dungeons with this flag zone into leaders instance instead of always using a fresh one (Return to Karazhan, Operation: Mechagon)
- MAP_DIFFICULTY_FLAG_CANNOT_EXTEND = 0x10
+ LimitToPlayersFromOneRealm = 0x01,
+ UseLootBasedLockInsteadOfInstanceLock = 0x02, // Lock to single encounters
+ LockedToSoloOwner = 0x04,
+ ResumeDungeonProgressBasedOnLockout = 0x08, // Mythic dungeons with this flag zone into leaders instance instead of always using a fresh one (Return to Karazhan, Operation: Mechagon)
+ DisableLockExtension = 0x10,
};
+DEFINE_ENUM_FLAG(MapDifficultyFlags);
+
enum MapDifficultyResetInterval : uint8
{
MAP_DIFFICULTY_RESET_ANYTIME = 0,