CommonLibSSE NG
Loading...
Searching...
No Matches
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"
8
9namespace 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
44 enum Flag : std::uint8_t // LVLF
45 {
48 kUseAll = 1 << 2,
49 kSpecialLoot = 1 << 3
50 };
51
52 ~TESLeveledList() override; // 00
53
54 // override (BaseFormComponent)
55 void InitializeDataComponent() override; // 01
56 void ClearDataComponent() override; // 02
57 void CopyComponent(BaseFormComponent* a_rhs) override; // 03
58
59 // add
60 [[nodiscard]] virtual std::uint8_t GetChanceNone(); // 04 - { if (global) return global->value; else return chanceNone; }
61 [[nodiscard]] virtual bool GetMultCalc(); // 05 - { return (flags >> 1) & 1; }
62 [[nodiscard]] virtual std::int32_t GetLevDifferenceMax(); // 06 - { return 0; }
63 [[nodiscard]] virtual bool GetCanContainFormsOfType(FormType a_type) const = 0; // 07
64
65 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);
66 [[nodiscard]] std::vector<TESForm*> GetContainedForms() const;
67
68 // members
70 std::int8_t chanceNone; // 10 - LVLD
71 Flag llFlags; // 11 - LVLF
72 std::uint8_t numEntries; // 12 - LLCT
73 std::uint8_t unk13; // 13
74 std::uint32_t pad14; // 14
75 void* unk18; // 18
76 TESGlobal* chanceGlobal; // 20 - LVLG
77 };
78 static_assert(sizeof(TESLeveledList) == 0x28);
79}
Definition BSTArray.h:377
Definition BaseFormComponent.h:8
Definition MemoryManager.h:244
Definition TESForm.h:35
Definition TESGlobal.h:10
Definition TESLeveledList.h:40
SimpleArray< LEVELED_OBJECT > entries
Definition TESLeveledList.h:69
void CopyComponent(BaseFormComponent *a_rhs) override
std::uint32_t pad14
Definition TESLeveledList.h:74
std::vector< TESForm * > GetContainedForms() const
Flag
Definition TESLeveledList.h:45
@ kSpecialLoot
Definition TESLeveledList.h:49
@ kCalculateFromAllLevelsLTOrEqPCLevel
Definition TESLeveledList.h:46
@ kUseAll
Definition TESLeveledList.h:48
@ kCalculateForEachItemInCount
Definition TESLeveledList.h:47
~TESLeveledList() override
std::uint8_t numEntries
Definition TESLeveledList.h:72
virtual bool GetMultCalc()
void * unk18
Definition TESLeveledList.h:75
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:70
virtual std::uint8_t GetChanceNone()
virtual bool GetCanContainFormsOfType(FormType a_type) const =0
void ClearDataComponent() override
Flag llFlags
Definition TESLeveledList.h:71
std::uint8_t unk13
Definition TESLeveledList.h:73
void InitializeDataComponent() override
static constexpr auto RTTI
Definition TESLeveledList.h:42
TESGlobal * chanceGlobal
Definition TESLeveledList.h:76
virtual std::int32_t GetLevDifferenceMax()
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_TESLeveledList(513943, 392584, 0x1edb458)
FormType
Definition FormTypes.h:139
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