From ad54cfb453f25ee600eb46617038c0aac52a1858 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 31 May 2022 13:57:00 -0400 Subject: [PATCH] Core/DataStores: Defined SkillLineFlags Port From (https://github.com/TrinityCore/TrinityCore/commit/1215321c8bc2676fefc0b4627044f2f78202704c) --- Source/Framework/Constants/CliDBConst.cs | 22 ++++++++++++++++++++ Source/Game/DataStorage/Structs/S_Records.cs | 2 ++ 2 files changed, 24 insertions(+) diff --git a/Source/Framework/Constants/CliDBConst.cs b/Source/Framework/Constants/CliDBConst.cs index 5c4f29354..0b448b3bf 100644 --- a/Source/Framework/Constants/CliDBConst.cs +++ b/Source/Framework/Constants/CliDBConst.cs @@ -39,6 +39,27 @@ namespace Framework.Constants Compressed = 0x10, } + [Flags] + public enum SkillLineFlags + { + AlwaysShownInUI = 0x01, + NeverShownInUI = 0x02, + FirstTierIsSelfTaught = 0x04, + GrantedIncrementallyByCharacterUpgrade = 0x08, + AutomaticRank = 0x0010, + InheritParentRankWhenLearned = 0x20, + ShowsInSpellTooltip = 0x40, + AppearsInMiscTabOfSpellbook = 0x80, + // unused = 0x0100, + IgnoreCategoryMods = 0x200, + DisplaysAsProficiency = 0x400, + PetsOnly = 0x0800, + UniqueBitfield = 0x1000, + RacialForThePurposeOfPaidRaceOrFactionChange = 0x2000, + ProgressiveSkillUp = 0x4000, + RacialForThePurposeOfTemporaryRaceChange = 0x8000, + } + public enum AbilityLearnType : byte { OnSkillValue = 1, // Spell state will update depending on skill value @@ -46,6 +67,7 @@ namespace Framework.Constants RewardedFromQuest = 4 // Learned as quest reward, also re-learned if missing } + [Flags] public enum SkillLineAbilityFlags { CanFallbackToLearnedOnSkillLearn = 0x80, // The skill is rewarded from a quest if player started on exile's reach diff --git a/Source/Game/DataStorage/Structs/S_Records.cs b/Source/Game/DataStorage/Structs/S_Records.cs index 0ee94c504..335afece6 100644 --- a/Source/Game/DataStorage/Structs/S_Records.cs +++ b/Source/Game/DataStorage/Structs/S_Records.cs @@ -97,6 +97,8 @@ namespace Game.DataStorage public int ParentTierIndex; public ushort Flags; public int SpellBookSpellID; + + public SkillLineFlags GetFlags() => (SkillLineFlags)Flags; } public sealed class SkillLineAbilityRecord