CommonLibSSE (powerof3)
TESLeveledList.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTArray.h"
6 #include "RE/F/FormTypes.h"
7 #include "RE/M/MemoryManager.h"
8 
9 namespace RE
10 {
11  class TESFaction;
12  class TESForm;
13  class TESGlobal;
14 
16  {
17  public:
18  // members
19  TESForm* form; // 00 - LVLO~
20  std::uint16_t count; // 08
21  std::uint16_t level; // 0A - ~LVLO
22  std::uint32_t pad0C; // 0C
24  };
25  static_assert(sizeof(LEVELED_OBJECT) == 0x18);
26 
28  {
29  public:
30  // members
31  TESForm* form; // 00
32  std::uint16_t count; // 08
33  std::uint16_t pad0A; // 08
34  std::uint32_t pad0C; // 0C
36  };
37  static_assert(sizeof(CALCED_OBJECT) == 0x28);
38 
40  {
41  public:
42  inline static constexpr auto RTTI = RTTI_TESLeveledList;
43  inline static constexpr auto VTABLE = VTABLE_TESLeveledList;
44 
45  enum Flag : std::uint8_t // LVLF
46  {
49  kUseAll = 1 << 2,
50  kSpecialLoot = 1 << 3
51  };
52 
53  ~TESLeveledList() override; // 00
54 
55  // override (BaseFormComponent)
56  void InitializeDataComponent() override; // 01
57  void ClearDataComponent() override; // 02
58  void CopyComponent(BaseFormComponent* a_rhs) override; // 03
59 
60  // add
61  virtual std::uint8_t GetChanceNone(); // 04 - { if (global) return global->value; else return chanceNone; }
62  virtual bool GetMultCalc(); // 05 - { return (flags >> 1) & 1; }`
63  virtual std::int32_t GetLevDifferenceMax(); // 06 - { return 0; }
64  [[nodiscard]] virtual bool GetCanContainFormsOfType(FormType a_type) const = 0; // 07
65 
66  void CalculateCurrentFormList(std::uint16_t a_level, std::int16_t a_count, BSScrapArray<CALCED_OBJECT>& a_calcedObjects, std::uint32_t a_arg5, bool a_usePlayerLevel);
67  [[nodiscard]] std::vector<TESForm*> GetContainedForms() const;
68 
69  // members
71  std::int8_t chanceNone; // 10 - LVLD
72  Flag llFlags; // 11 - LVLF
73  std::uint8_t numEntries; // 12 - LLCT
74  std::uint8_t unk13; // 13
75  std::uint32_t pad14; // 14
76  void* unk18; // 18
77  TESGlobal* chanceGlobal; // 20 - LVLG
78  };
79  static_assert(sizeof(TESLeveledList) == 0x28);
80 }
Definition: BSTArray.h:378
Definition: BaseFormComponent.h:8
Definition: MemoryManager.h:244
Definition: TESForm.h:36
Definition: TESGlobal.h:10
Definition: TESLeveledList.h:40
SimpleArray< LEVELED_OBJECT > entries
Definition: TESLeveledList.h:70
void CopyComponent(BaseFormComponent *a_rhs) override
std::uint32_t pad14
Definition: TESLeveledList.h:75
std::vector< TESForm * > GetContainedForms() const
Flag
Definition: TESLeveledList.h:46
@ kSpecialLoot
Definition: TESLeveledList.h:50
@ kCalculateFromAllLevelsLTOrEqPCLevel
Definition: TESLeveledList.h:47
@ kUseAll
Definition: TESLeveledList.h:49
@ kCalculateForEachItemInCount
Definition: TESLeveledList.h:48
~TESLeveledList() override
std::uint8_t numEntries
Definition: TESLeveledList.h:73
virtual bool GetMultCalc()
static constexpr auto VTABLE
Definition: TESLeveledList.h:43
void * unk18
Definition: TESLeveledList.h:76
void CalculateCurrentFormList(std::uint16_t a_level, std::int16_t a_count, BSScrapArray< CALCED_OBJECT > &a_calcedObjects, std::uint32_t a_arg5, bool a_usePlayerLevel)
std::int8_t chanceNone
Definition: TESLeveledList.h:71
virtual std::uint8_t GetChanceNone()
virtual bool GetCanContainFormsOfType(FormType a_type) const =0
void ClearDataComponent() override
Flag llFlags
Definition: TESLeveledList.h:72
std::uint8_t unk13
Definition: TESLeveledList.h:74
void InitializeDataComponent() override
static constexpr auto RTTI
Definition: TESLeveledList.h:42
TESGlobal * chanceGlobal
Definition: TESLeveledList.h:77
virtual std::int32_t GetLevDifferenceMax()
Definition: AbsorbEffect.h:6
FormType
Definition: FormTypes.h:139
constexpr std::array< REL::ID, 1 > VTABLE_TESLeveledList
Definition: Offsets_VTABLE.h:12844
constexpr REL::ID RTTI_TESLeveledList(static_cast< std::uint64_t >(513943))
Definition: TESLeveledList.h:28
TESForm * form
Definition: TESLeveledList.h:31
std::uint16_t pad0A
Definition: TESLeveledList.h:33
std::uint32_t pad0C
Definition: TESLeveledList.h:34
std::uint16_t count
Definition: TESLeveledList.h:32
ContainerItemExtra containerItem
Definition: TESLeveledList.h:35
Definition: ContainerItemExtra.h:11
Definition: TESLeveledList.h:16
std::uint16_t level
Definition: TESLeveledList.h:21
std::uint16_t count
Definition: TESLeveledList.h:20
ContainerItemExtra * itemExtra
Definition: TESLeveledList.h:23
TESForm * form
Definition: TESLeveledList.h:19
std::uint32_t pad0C
Definition: TESLeveledList.h:22