CommonLibSSE (powerof3)
BGSPerk.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTArray.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/P/PerkRankVisitor.h"
6 #include "RE/T/TESCondition.h"
7 #include "RE/T/TESDescription.h"
8 #include "RE/T/TESForm.h"
9 #include "RE/T/TESFullName.h"
10 #include "RE/T/TESIcon.h"
11 
12 namespace RE
13 {
14  class BGSPerkEntry;
15 
16  struct PerkData // DATA
17  {
18  bool trait; // 0
19  std::int8_t level; // 1
20  std::int8_t numRanks; // 2
21  bool playable; // 3
22  bool hidden; // 4
23  };
24  static_assert(sizeof(PerkData) == 0x5);
25 
26  class BGSPerk :
27  public TESForm, // 00
28  public TESFullName, // 20
29  public TESDescription, // 30
30  public TESIcon // 40
31  {
32  public:
33  inline static constexpr auto RTTI = RTTI_BGSPerk;
34  inline static constexpr auto VTABLE = VTABLE_BGSPerk;
35  inline static constexpr auto FORMTYPE = FormType::Perk;
36 
37  struct RecordFlags
38  {
39  enum RecordFlag : std::uint32_t
40  {
41  kNonPlayable = 1 << 2,
42  kDeleted = 1 << 5,
43  kIgnored = 1 << 12
44  };
45  };
46 
48  {
49  public:
50  inline static constexpr auto RTTI = RTTI_BGSPerk__FindPerkInRanksVisitor;
51  inline static constexpr auto VTABLE = VTABLE_BGSPerk__FindPerkInRanksVisitor;
52 
53  // override (PerkRankVisitor)
54  bool operator()(const PerkRankData* a_entry) override; // 00
55  };
56  static_assert(sizeof(FindPerkInRanksVisitor) == 0x8);
57 
59  {
60  public:
61  inline static constexpr auto RTTI = RTTI_BGSPerk__ApplyPerksVisitor;
62  inline static constexpr auto VTABLE = VTABLE_BGSPerk__ApplyPerksVisitor;
63 
64  // override (PerkRankVisitor)
65  bool operator()(const PerkRankData* a_entry) override; // 00
66  };
67  static_assert(sizeof(ApplyPerksVisitor) == 0x8);
68 
70  {
71  public:
72  inline static constexpr auto RTTI = RTTI_BGSPerk__AddPerkVisitor;
73  inline static constexpr auto VTABLE = VTABLE_BGSPerk__AddPerkVisitor;
74 
75  // override (PerkRankVisitor)
76  bool operator()(const PerkRankData* a_entry) override; // 00
77  };
78  static_assert(sizeof(AddPerkVisitor) == 0x8);
79 
80  ~BGSPerk() override; // 00
81 
82  // override (TESForm)
83  void InitializeData() override; // 04
84  void ClearData() override; // 05
85  bool Load(TESFile* a_mod) override; // 06
86  void InitItemImpl() override; // 13
87 
88  // members
89  PerkData data; // 50 - DATA
90  std::uint8_t pad55; // 55
91  std::uint16_t pad56; // 56
94  BGSPerk* nextPerk; // 78 - NNAM
95  };
96  static_assert(sizeof(BGSPerk) == 0x80);
97 }
Definition: BGSPerk.h:70
static constexpr auto VTABLE
Definition: BGSPerk.h:73
bool operator()(const PerkRankData *a_entry) override
static constexpr auto RTTI
Definition: BGSPerk.h:72
Definition: BGSPerk.h:59
static constexpr auto RTTI
Definition: BGSPerk.h:61
static constexpr auto VTABLE
Definition: BGSPerk.h:62
bool operator()(const PerkRankData *a_entry) override
Definition: BGSPerk.h:48
bool operator()(const PerkRankData *a_entry) override
static constexpr auto VTABLE
Definition: BGSPerk.h:51
static constexpr auto RTTI
Definition: BGSPerk.h:50
Definition: BGSPerk.h:31
static constexpr auto VTABLE
Definition: BGSPerk.h:34
BGSPerk * nextPerk
Definition: BGSPerk.h:94
static constexpr auto FORMTYPE
Definition: BGSPerk.h:35
std::uint8_t pad55
Definition: BGSPerk.h:90
bool Load(TESFile *a_mod) override
std::uint16_t pad56
Definition: BGSPerk.h:91
void InitializeData() override
static constexpr auto RTTI
Definition: BGSPerk.h:33
void ClearData() override
PerkData data
Definition: BGSPerk.h:89
BSTArray< BGSPerkEntry * > perkEntries
Definition: BGSPerk.h:93
TESCondition perkConditions
Definition: BGSPerk.h:92
~BGSPerk() override
void InitItemImpl() override
Definition: BSTArray.h:378
Definition: PerkRankVisitor.h:10
Definition: TESCondition.h:992
Definition: TESDescription.h:12
Definition: TESFile.h:17
Definition: TESForm.h:36
Definition: TESFullName.h:9
Definition: TESIcon.h:8
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 4 > VTABLE_BGSPerk
Definition: Offsets_VTABLE.h:8711
constexpr REL::ID RTTI_BGSPerk__AddPerkVisitor(static_cast< std::uint64_t >(686894))
constexpr REL::ID RTTI_BGSPerk__ApplyPerksVisitor(static_cast< std::uint64_t >(686875))
constexpr REL::ID RTTI_BGSPerk__FindPerkInRanksVisitor(static_cast< std::uint64_t >(686874))
constexpr std::array< REL::ID, 1 > VTABLE_BGSPerk__FindPerkInRanksVisitor
Definition: Offsets_VTABLE.h:8716
constexpr std::array< REL::ID, 1 > VTABLE_BGSPerk__AddPerkVisitor
Definition: Offsets_VTABLE.h:8714
constexpr REL::ID RTTI_BGSPerk(static_cast< std::uint64_t >(513872))
constexpr std::array< REL::ID, 1 > VTABLE_BGSPerk__ApplyPerksVisitor
Definition: Offsets_VTABLE.h:8715
Definition: BGSPerk.h:38
RecordFlag
Definition: BGSPerk.h:40
@ kDeleted
Definition: BGSPerk.h:42
@ kNonPlayable
Definition: BGSPerk.h:41
@ kIgnored
Definition: BGSPerk.h:43
Definition: BGSPerk.h:17
bool playable
Definition: BGSPerk.h:21
std::int8_t level
Definition: BGSPerk.h:19
bool trait
Definition: BGSPerk.h:18
bool hidden
Definition: BGSPerk.h:22
std::int8_t numRanks
Definition: BGSPerk.h:20
Definition: BGSPerkRankArray.h:11