diff options
author | Shauren <shauren.trinity@gmail.com> | 2022-08-15 22:26:13 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2022-10-04 00:19:38 +0200 |
commit | 550d117fd758eb2bda3c69a86ef0774b9f9bf0f2 (patch) | |
tree | ed0282dad965111408d3e13c07e75c659c9be694 /src | |
parent | 4667db37f34504e25feefba7506ac31cfd7dceed (diff) |
Core/DataStores: Defined MapDifficulty.db2 flags
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/DataStores/DB2Structure.h | 8 | ||||
-rw-r--r-- | src/server/game/DataStores/DBCEnums.h | 12 |
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, |