From 615c388879399e2dd81993ec66b647bdf9a4c53b Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 4 Oct 2022 20:13:52 -0400 Subject: [PATCH] Core/DataStores: Defined MapDifficulty.db2 flags Port From (https://github.com/TrinityCore/TrinityCore/commit/550d117fd758eb2bda3c69a86ef0774b9f9bf0f2) --- Source/Game/DataStorage/Structs/M_Records.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Source/Game/DataStorage/Structs/M_Records.cs b/Source/Game/DataStorage/Structs/M_Records.cs index a54c912f3..c1d1f0f17 100644 --- a/Source/Game/DataStorage/Structs/M_Records.cs +++ b/Source/Game/DataStorage/Structs/M_Records.cs @@ -134,14 +134,14 @@ namespace Game.DataStorage public uint MaxPlayers; public int ItemContext; public uint ItemContextPickerID; - public MapDifficultyFlags Flags; + public int Flags; public int ContentTuningID; public uint MapID; public bool HasResetSchedule() { return ResetInterval != MapDifficultyResetInterval.Anytime; } - public bool IsUsingEncounterLocks() { return Flags.HasFlag(MapDifficultyFlags.UseLootBasedLockInsteadOfInstanceLock); } - public bool IsRestoringDungeonState() { return Flags.HasFlag(MapDifficultyFlags.ResumeDungeonProgressBasedOnLockout); } - public bool IsExtendable() { return !Flags.HasFlag(MapDifficultyFlags.DisableLockExtension); } + public bool IsUsingEncounterLocks() { return GetFlags().HasFlag(MapDifficultyFlags.UseLootBasedLockInsteadOfInstanceLock); } + public bool IsRestoringDungeonState() { return GetFlags().HasFlag(MapDifficultyFlags.ResumeDungeonProgressBasedOnLockout); } + public bool IsExtendable() { return !GetFlags().HasFlag(MapDifficultyFlags.DisableLockExtension); } public uint GetRaidDuration() { @@ -151,6 +151,8 @@ namespace Game.DataStorage return 604800; return 0; } + + public MapDifficultyFlags GetFlags() { return (MapDifficultyFlags)Flags; } } public sealed class MapDifficultyXConditionRecord