CommonLibSSE (powerof3)
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
15 {
16 public:
18 {
19 public:
20 inline static constexpr auto RTTI = RTTI_InventoryChanges__IItemChangeVisitor;
22
23 virtual ~IItemChangeVisitor() = default; // 00
24
25 // add
26 virtual BSContainer::ForEachResult Visit(InventoryEntryData* a_entryData) = 0; // 01
27 virtual bool ShouldVisit([[maybe_unused]] InventoryEntryData* a_entryData, [[maybe_unused]] TESBoundObject* a_object) { return true; } // 02
28 virtual BSContainer::ForEachResult Unk_03(InventoryEntryData* a_entryData, [[maybe_unused]] void* a_arg2, bool* a_arg3) // 03
29 {
30 *a_arg3 = true;
31 return Visit(a_entryData);
32 }
33 };
34 static_assert(sizeof(IItemChangeVisitor) == 0x8);
35
39
41 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 RemoveAllItems(TESObjectREFR* a_ref, TESObjectREFR* a_moveToRef, bool a_arg4, bool a_keepOwnership, bool a_arg6);
51 void SendContainerChangedEvent(ExtraDataList* a_itemExtraList, TESObjectREFR* a_fromRefr, TESForm* a_item, std::int32_t a_count);
52 void SetFavorite(InventoryEntryData* a_entry, ExtraDataList* a_itemList);
53 void SetUniqueID(ExtraDataList* a_itemList, TESForm* a_oldForm, TESForm* a_newForm);
56
58
59 // members
61 TESObjectREFR* owner{ nullptr }; // 08
62 float totalWeight{ 0.0F }; // 10
63 float armorWeight{ 0.0F }; // 14
64 bool changed{ false }; // 18
65 std::uint8_t unk19{ 0 }; // 19
66 std::uint8_t unk1A{ 0 }; // 1A
67 std::uint8_t unk1B{ 0 }; // 1B
68 std::uint32_t unk1C{ 0 }; // 1C
69
70 private:
71 InventoryChanges* Ctor(TESObjectREFR* a_ref);
72 void Dtor();
73 };
74 static_assert(sizeof(InventoryChanges) == 0x20);
75}
Definition BGSOutfit.h:11
Definition BSTList.h:10
Definition ExtraDataList.h:49
Definition InventoryChanges.h:18
virtual bool ShouldVisit(InventoryEntryData *a_entryData, TESBoundObject *a_object)
Definition InventoryChanges.h:27
virtual BSContainer::ForEachResult Unk_03(InventoryEntryData *a_entryData, void *a_arg2, bool *a_arg3)
Definition InventoryChanges.h:28
static constexpr auto VTABLE
Definition InventoryChanges.h:21
virtual BSContainer::ForEachResult Visit(InventoryEntryData *a_entryData)=0
static constexpr auto RTTI
Definition InventoryChanges.h:20
Definition InventoryChanges.h:15
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:62
std::uint8_t unk19
Definition InventoryChanges.h:65
void VisitInventory(IItemChangeVisitor &visitor)
std::uint32_t GetWornMask()
std::uint32_t unk1C
Definition InventoryChanges.h:68
float armorWeight
Definition InventoryChanges.h:63
void RemoveFavorite(InventoryEntryData *a_entry, ExtraDataList *a_itemList)
TESObjectREFR * owner
Definition InventoryChanges.h:61
TESObjectARMO * GetArmorInSlot(std::int32_t a_slot)
bool changed
Definition InventoryChanges.h:64
std::uint8_t unk1B
Definition InventoryChanges.h:67
void SendContainerChangedEvent(ExtraDataList *a_itemExtraList, TESObjectREFR *a_fromRefr, TESForm *a_item, std::int32_t a_count)
BSSimpleList< InventoryEntryData * > * entryList
Definition InventoryChanges.h:60
void RemoveAllItems(TESObjectREFR *a_ref, TESObjectREFR *a_moveToRef, bool a_arg4, bool a_keepOwnership, bool a_arg6)
std::uint8_t unk1A
Definition InventoryChanges.h:66
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:36
Definition TESObjectARMO.h:37
Definition TESObjectREFR.h:114
ForEachResult
Definition BSContainer.h:6
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_InventoryChanges__IItemChangeVisitor
Definition Offsets_VTABLE.h:11920
constexpr REL::ID RTTI_InventoryChanges__IItemChangeVisitor(static_cast< std::uint64_t >(684949))