From 06f99fda8bc85cf0b67119d4110b810202c40467 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 23 May 2023 05:17:41 -0400 Subject: [PATCH] Core/Units: Add PowerTypeFlags enum Port From (https://github.com/TrinityCore/TrinityCore/commit/8828af2a5e3754e45893e0d62efae86747dfa4f2) --- Source/Framework/Constants/CliDBConst.cs | 17 +++++++++++++++++ Source/Game/DataStorage/Structs/P_Records.cs | 2 ++ 2 files changed, 19 insertions(+) diff --git a/Source/Framework/Constants/CliDBConst.cs b/Source/Framework/Constants/CliDBConst.cs index b7d4890f8..0437bba44 100644 --- a/Source/Framework/Constants/CliDBConst.cs +++ b/Source/Framework/Constants/CliDBConst.cs @@ -1842,6 +1842,23 @@ namespace Framework.Constants MajorFactionRenown = 64 } + [Flags] + public enum PowerTypeFlags + { + StopRegenWhileCasting = 0x01, + UseRegenInterrupt = 0x02, + FillFractionalPowerOnEnergize = 0x08, + NoClientPrediction = 0x10, + UnitsUseDefaultPowerOnInit = 0x20, + NotSetToDefaultOnResurrect = 0x40, + IsUsedByNPCs = 0x80, + ContinueRegenWhileFatigued = 0x200, + RegenAffectedByHaste = 0x400, + SetToMaxOnLevelUp = 0x1000, + SetToMaxLevelOnInitialLogIn = 0x2000, + AllowCostModsForPlayers = 0x4000 + } + public enum PrestigeLevelInfoFlags : byte { Disabled = 0x01 // Prestige levels with this flag won't be included to calculate max prestigelevel. diff --git a/Source/Game/DataStorage/Structs/P_Records.cs b/Source/Game/DataStorage/Structs/P_Records.cs index c3ac3027a..1cc772dfd 100644 --- a/Source/Game/DataStorage/Structs/P_Records.cs +++ b/Source/Game/DataStorage/Structs/P_Records.cs @@ -140,6 +140,8 @@ namespace Game.DataStorage public float RegenPeace; public float RegenCombat; public short Flags; + + public PowerTypeFlags GetFlags() { return (PowerTypeFlags)Flags; } } public sealed class PrestigeLevelInfoRecord