commonlibsse_ng\re\i/
InventoryChanges.rs

1use core::ffi::c_void;
2
3use crate::re::BSTList::BSSimpleList;
4use crate::re::ExtraDataList::ExtraDataList;
5use crate::re::InventoryEntryData::InventoryEntryData;
6use crate::re::TESBoundObject::TESBoundObject;
7use crate::re::TESForm::TESForm;
8use crate::re::TESObjectREFR::TESObjectREFR;
9use crate::re::offsets_rtti::RTTI_InventoryChanges__IItemChangeVisitor;
10use crate::re::offsets_vtable::VTABLE_InventoryChanges__IItemChangeVisitor;
11use crate::rel::id::VariantID;
12
13struct TESObjectARMO;
14struct BGSOutfit;
15
16////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
17
18#[repr(u32)]
19#[derive(Debug)]
20pub enum VisitResult {
21    Stop = 0,
22    Continue = 1,
23}
24
25pub struct IItemChangeVisitor {
26    pub vptr: *const IItemChangeVisitorVtbl,
27}
28
29impl IItemChangeVisitor {
30    pub const RTTI: VariantID = RTTI_InventoryChanges__IItemChangeVisitor;
31    pub const VTABLE: [VariantID; 1] = VTABLE_InventoryChanges__IItemChangeVisitor;
32}
33
34pub struct IItemChangeVisitorVtbl {
35    /// C++ virtual destructor
36    pub _drop: fn(this: *mut c_void),
37
38    pub visit: fn(this: *mut c_void, entry_data: &mut InventoryEntryData) -> VisitResult,
39    pub should_visit:
40        fn(this: *const c_void, entry_data: &InventoryEntryData, object: &TESBoundObject) -> bool,
41    pub unk_03: fn(
42        this: *mut c_void,
43        entry_data: &mut InventoryEntryData,
44        arg2: *mut c_void,
45        arg3: &mut bool,
46    ) -> VisitResult,
47}
48
49pub struct InventoryChanges {
50    pub entryList: *mut BSSimpleList<*mut InventoryEntryData>,
51    pub owner: *mut TESObjectREFR,
52    pub totalWeight: f32,
53    pub armorWeight: f32,
54    pub changed: bool,
55    pub unk19: u8,
56    pub unk1a: u8,
57    pub unk1b: u8,
58    pub unk1c: u32,
59}
60
61impl InventoryChanges {
62    /// C++ Constructor
63    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15812, ae_id = 16050)]
64    #[allow(clippy::use_self)]
65    fn new(ref_: *mut TESObjectREFR) -> InventoryChanges {}
66
67    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15813, ae_id = 16051)]
68    /// C++ Destructor
69    fn manually_drop(&mut self) {}
70
71    #[allow(clippy::missing_const_for_fn)]
72    pub fn add_entry_data(&mut self, entry: *mut InventoryEntryData) {
73        // self.entry_list.push_front(entry); // move take?
74        let _ = entry;
75        self.changed = true;
76    }
77
78    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15829, ae_id = 16068)]
79    pub fn generate_leveled_list_changes(&mut self) {}
80
81    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15873, ae_id = 16113)]
82    pub fn get_armor_in_slot(&self, slot: i32) -> *mut TESObjectARMO {}
83
84    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15883, ae_id = 16123)]
85    pub fn get_inventory_weight(&self) -> f32 {}
86
87    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15868, ae_id = 16047)]
88    pub fn get_item_count(&self, obj: *mut TESBoundObject) -> i16 {}
89
90    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15908, ae_id = 16148)]
91    pub fn get_next_unique_id(&self) -> u16 {}
92
93    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15859, ae_id = 16099)]
94    pub fn get_worn_mask(&self) -> u32 {}
95
96    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15890, ae_id = 16130)]
97    pub fn init_from_container_extra(&self) {}
98
99    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15889, ae_id = 16129)]
100    pub fn init_leveled_items(&self) {}
101
102    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15833, ae_id = 16072)]
103    pub fn init_outfit_items(&self, outfit: *mut BGSOutfit, npc_level: u16) {}
104
105    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15829, ae_id = 16068)]
106    pub fn init_scripts(&self) {}
107
108    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15859, ae_id = 16099)]
109    pub fn remove_favorite(
110        &mut self,
111        entry: *mut InventoryEntryData,
112        item_list: *mut ExtraDataList,
113    ) {
114    }
115
116    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15878, ae_id = 441567)]
117    pub fn remove_all_items(
118        &mut self,
119        ref_: *mut TESObjectREFR,
120        move_to_ref: *mut TESObjectREFR,
121        arg4: bool,
122        keep_ownership: bool,
123        arg6: bool,
124    ) {
125    }
126
127    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15909, ae_id = 16149)]
128    pub fn send_container_changed_event(
129        &mut self,
130        item_extrlist: *mut ExtraDataList,
131        from_refr: *mut TESObjectREFR,
132        item: *mut TESForm,
133        count: i32,
134    ) {
135    }
136
137    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15858, ae_id = 16098)]
138    pub fn set_favorite(&mut self, entry: *mut InventoryEntryData, item_list: *mut ExtraDataList) {}
139
140    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15907, ae_id = 16149)]
141    pub fn set_unique_id(
142        &mut self,
143        item_list: *mut ExtraDataList,
144        old_form: *mut TESForm,
145        new_form: *mut TESForm,
146    ) {
147    }
148
149    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15855, ae_id = 16095)]
150    pub fn visit_inventory(&mut self, visitor: &mut IItemChangeVisitor) {}
151
152    #[commonlibsse_ng_derive_internal::relocate_fn(se_id = 15856, ae_id = 16096)]
153    pub fn visit_worn_items(&mut self, visitor: &mut IItemChangeVisitor) {}
154}