CommonLibSSE NG
Loading...
Searching...
No Matches
InventoryChanges.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSContainer.h"
4#include "RE/B/BSTList.h"
5#include "RE/F/FormTypes.h"
8
9namespace RE
10{
11 class ExtraDataList;
12 class InventoryEntryData;
13 class TESBoundObject;
14
16 {
17 public:
19 {
20 public:
21 inline static constexpr auto RTTI = RTTI_InventoryChanges__IItemChangeVisitor;
23
24 virtual ~IItemChangeVisitor(); // 00
25
26 // add
27 virtual BSContainer::ForEachResult Visit(InventoryEntryData* a_entryData) = 0; // 01
28 virtual bool ShouldVisit([[maybe_unused]] InventoryEntryData* a_entryData, [[maybe_unused]] TESBoundObject* a_object) { return true; } // 02
29 virtual BSContainer::ForEachResult Unk_03(InventoryEntryData* a_entryData, [[maybe_unused]] void* a_arg2, bool* a_arg3) // 03
30 {
31 *a_arg3 = true;
32 return Visit(a_entryData);
33 }
34 };
35 static_assert(sizeof(IItemChangeVisitor) == 0x8);
36
40
42 TESObjectARMO* GetArmorInSlot(std::int32_t a_slot);
43 std::uint16_t GetNextUniqueID();
44 std::uint32_t GetWornMask();
47 void InitOutfitItems(BGSOutfit* a_outfit, std::uint16_t a_npcLevel);
49 void RemoveFavorite(InventoryEntryData* a_entry, ExtraDataList* a_itemList);
50 void SendContainerChangedEvent(ExtraDataList* a_itemExtraList, TESObjectREFR* a_fromRefr, TESForm* a_item, std::int32_t a_count);
51 void SetFavorite(InventoryEntryData* a_entry, ExtraDataList* a_itemList);
52 void SetUniqueID(ExtraDataList* a_itemList, TESForm* a_oldForm, TESForm* a_newForm);
54 std::int16_t GetItemCount(RE::TESBoundObject* a_obj);
57
59
60 // members
62 TESObjectREFR* owner{ nullptr }; // 08
63 float totalWeight{ 0.0F }; // 10
64 float armorWeight{ 0.0F }; // 14
65 bool changed{ false }; // 18
66 std::uint8_t unk19{ 0 }; // 19
67 std::uint8_t unk1A{ 0 }; // 1A
68 std::uint8_t unk1B{ 0 }; // 1B
69 std::uint32_t unk1C{ 0 }; // 1C
70
71 private:
72 InventoryChanges* Ctor(TESObjectREFR* a_ref);
73 void Dtor();
74 };
75 static_assert(sizeof(InventoryChanges) == 0x20);
76}
Definition BGSOutfit.h:11
Definition BSTList.h:10
Definition ExtraDataList.h:53
Definition InventoryChanges.h:19
virtual bool ShouldVisit(InventoryEntryData *a_entryData, TESBoundObject *a_object)
Definition InventoryChanges.h:28
virtual BSContainer::ForEachResult Unk_03(InventoryEntryData *a_entryData, void *a_arg2, bool *a_arg3)
Definition InventoryChanges.h:29
static constexpr auto VTABLE
Definition InventoryChanges.h:22
virtual BSContainer::ForEachResult Visit(InventoryEntryData *a_entryData)=0
static constexpr auto RTTI
Definition InventoryChanges.h:21
Definition InventoryChanges.h:16
void SetUniqueID(ExtraDataList *a_itemList, TESForm *a_oldForm, TESForm *a_newForm)
void AddEntryData(InventoryEntryData *a_entry)
std::int16_t GetItemCount(RE::TESBoundObject *a_obj)
std::uint16_t GetNextUniqueID()
float totalWeight
Definition InventoryChanges.h:63
void GenerateLeveledListChanges()
std::uint8_t unk19
Definition InventoryChanges.h:66
void VisitInventory(IItemChangeVisitor &visitor)
std::uint32_t GetWornMask()
std::uint32_t unk1C
Definition InventoryChanges.h:69
float armorWeight
Definition InventoryChanges.h:64
void RemoveFavorite(InventoryEntryData *a_entry, ExtraDataList *a_itemList)
TESObjectREFR * owner
Definition InventoryChanges.h:62
TESObjectARMO * GetArmorInSlot(std::int32_t a_slot)
bool changed
Definition InventoryChanges.h:65
std::uint8_t unk1B
Definition InventoryChanges.h:68
void SendContainerChangedEvent(ExtraDataList *a_itemExtraList, TESObjectREFR *a_fromRefr, TESForm *a_item, std::int32_t a_count)
BSSimpleList< InventoryEntryData * > * entryList
Definition InventoryChanges.h:61
std::uint8_t unk1A
Definition InventoryChanges.h:67
void SetFavorite(InventoryEntryData *a_entry, ExtraDataList *a_itemList)
void InitOutfitItems(BGSOutfit *a_outfit, std::uint16_t a_npcLevel)
void VisitWornItems(IItemChangeVisitor &visitor)
InventoryChanges(TESObjectREFR *a_ref)
Definition InventoryEntryData.h:15
Definition TESBoundObject.h:24
Definition TESForm.h:35
Definition TESObjectARMO.h:37
Definition TESObjectREFR.h:112
ForEachResult
Definition BSContainer.h:6
Definition AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 1 > VTABLE_InventoryChanges__IItemChangeVisitor
Definition Offsets_VTABLE.h:398
constexpr REL::VariantID RTTI_InventoryChanges__IItemChangeVisitor(684949, 392686, 0x1edcb48)