CommonLibSSE NG
TESLevItem.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/F/FormTypes.h"
4 #include "RE/T/TESBoundObject.h"
5 #include "RE/T/TESLeveledList.h"
6 
7 namespace RE
8 {
9  class TESLevItem :
10  public TESBoundObject, // 00
11  public TESLeveledList // 30
12  {
13  public:
14  inline static constexpr auto RTTI = RTTI_TESLevItem;
15  inline static constexpr auto VTABLE = VTABLE_TESLevItem;
16  inline static constexpr auto FORMTYPE = FormType::LeveledItem;
17 
18  struct ChangeFlags
19  {
20  enum ChangeFlag : std::uint32_t
21  {
22  kAddedObject = (std::uint32_t)1 << 31
23  };
24  };
25 
26  struct RecordFlags
27  {
28  enum RecordFlag : std::uint32_t
29  {
30  kDeleted = 1 << 5,
31  kIgnored = 1 << 12
32  };
33  };
34 
35  ~TESLevItem() override; // 00
36 
37  // override (TESBoundObject)
38  bool Load(TESFile* a_mod) override; // 06
39  void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
40  void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
41  void Revert(BGSLoadFormBuffer* a_buf) override; // 12
42  void InitItemImpl() override; // 13
43 
44  // override (TESLeveledList)
45  [[nodiscard]] std::int32_t GetLevDifferenceMax() override; // 06 - { return iLevItemLevelDifferenceMax; }
46  [[nodiscard]] bool GetCanContainFormsOfType(FormType a_type) const override; // 07
47  };
48  static_assert(sizeof(TESLevItem) == 0x58);
49 }
Definition: BGSLoadFormBuffer.h:11
Definition: BGSSaveFormBuffer.h:8
Definition: TESBoundObject.h:24
Definition: TESFile.h:17
Definition: TESLevItem.h:12
static constexpr auto RTTI
Definition: TESLevItem.h:14
void SaveGame(BGSSaveFormBuffer *a_buf) override
static constexpr auto VTABLE
Definition: TESLevItem.h:15
void InitItemImpl() override
bool GetCanContainFormsOfType(FormType a_type) const override
static constexpr auto FORMTYPE
Definition: TESLevItem.h:16
std::int32_t GetLevDifferenceMax() override
void Revert(BGSLoadFormBuffer *a_buf) override
bool Load(TESFile *a_mod) override
~TESLevItem() override
void LoadGame(BGSLoadFormBuffer *a_buf) override
Definition: TESLeveledList.h:40
Definition: AbsorbEffect.h:6
FormType
Definition: FormTypes.h:139
constexpr std::array< REL::VariantID, 2 > VTABLE_TESLevItem
Definition: Offsets_VTABLE.h:511
constexpr REL::VariantID RTTI_TESLevItem(513952, 392593, 0x1edb5e8)
Definition: TESLevItem.h:19
ChangeFlag
Definition: TESLevItem.h:21
@ kAddedObject
Definition: TESLevItem.h:22
Definition: TESLevItem.h:27
RecordFlag
Definition: TESLevItem.h:29
@ kIgnored
Definition: TESLevItem.h:31
@ kDeleted
Definition: TESLevItem.h:30