CommonLibSSE (powerof3)
InventoryChanges.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTList.h"
4 #include "RE/F/FormTypes.h"
5 #include "RE/M/MemoryManager.h"
6 
7 namespace RE
8 {
9  class ExtraDataList;
10  class InventoryEntryData;
11 
13  {
14  public:
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_InventoryChanges__IItemChangeVisitor;
19 
20  virtual ~IItemChangeVisitor(); // 00
21 
22  // add
23  virtual bool Visit(InventoryEntryData* a_entryData) = 0; // 01
24  virtual void Unk_02(void); // 02 - { return 1; }
25  virtual void Unk_03(void); // 03
26  };
27  static_assert(sizeof(IItemChangeVisitor) == 0x8);
28 
30  explicit InventoryChanges(TESObjectREFR* a_ref);
32 
34  TESObjectARMO* GetArmorInSlot(std::int32_t a_slot);
35  std::uint16_t GetNextUniqueID();
38  void InitScripts();
39  void SendContainerChangedEvent(ExtraDataList* a_itemExtraList, TESObjectREFR* a_fromRefr, TESForm* a_item, std::int32_t a_count);
40  void SetUniqueID(ExtraDataList* a_itemList, TESForm* a_oldForm, TESForm* a_newForm);
41 
43 
44  // members
46  TESObjectREFR* owner{ nullptr }; // 08
47  float totalWeight{ 0.0F }; // 10
48  float armorWeight{ 0.0F }; // 14
49  bool changed{ false }; // 18
50  std::uint8_t unk19{ 0 }; // 19
51  std::uint8_t unk1A{ 0 }; // 1A
52  std::uint8_t unk1B{ 0 }; // 1B
53  std::uint32_t unk1C{ 0 }; // 1C
54 
55  private:
56  InventoryChanges* Ctor(TESObjectREFR* a_ref);
57  void Dtor();
58  };
59  static_assert(sizeof(InventoryChanges) == 0x20);
60 }
Definition: BSTList.h:10
Definition: ExtraDataList.h:40
Definition: InventoryChanges.h:16
virtual bool Visit(InventoryEntryData *a_entryData)=0
static constexpr auto RTTI
Definition: InventoryChanges.h:18
Definition: InventoryChanges.h:13
void SetUniqueID(ExtraDataList *a_itemList, TESForm *a_oldForm, TESForm *a_newForm)
void AddEntryData(InventoryEntryData *a_entry)
std::uint16_t GetNextUniqueID()
float totalWeight
Definition: InventoryChanges.h:47
TESObjectARMO * GetArmorInSlot(std::int32_t a_slot)
std::uint8_t unk19
Definition: InventoryChanges.h:50
std::uint32_t unk1C
Definition: InventoryChanges.h:53
float armorWeight
Definition: InventoryChanges.h:48
TESObjectREFR * owner
Definition: InventoryChanges.h:46
bool changed
Definition: InventoryChanges.h:49
std::uint8_t unk1B
Definition: InventoryChanges.h:52
void SendContainerChangedEvent(ExtraDataList *a_itemExtraList, TESObjectREFR *a_fromRefr, TESForm *a_item, std::int32_t a_count)
BSSimpleList< InventoryEntryData * > * entryList
Definition: InventoryChanges.h:45
std::uint8_t unk1A
Definition: InventoryChanges.h:51
InventoryChanges(TESObjectREFR *a_ref)
Definition: InventoryEntryData.h:14
Definition: TESForm.h:34
Definition: TESObjectARMO.h:37
Definition: TESObjectREFR.h:103
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_InventoryChanges__IItemChangeVisitor
Definition: Offsets_RTTI.h:5071