commonlibsse_ng\re\b/
BGSEquipType.rs

1use core::ptr::NonNull;
2
3use crate::re::BGSEquipSlot::BGSEquipSlot;
4use crate::re::BaseFormComponent::{BaseFormComponent, BaseFormComponentVtbl};
5use crate::re::offsets_rtti::RTTI_BGSEquipType;
6use crate::re::offsets_vtable::VTABLE_BGSEquipType;
7use crate::rel::id::VariantID;
8
9#[repr(C)]
10#[derive(Debug, PartialEq, Eq)]
11pub struct BGSEquipType {
12    pub __base: BaseFormComponent,                // 0x0
13    pub equipSlot: Option<NonNull<BGSEquipSlot>>, // 0x8
14}
15const _: () = assert!(core::mem::size_of::<BGSEquipType>() == 0x10);
16
17impl BGSEquipType {
18    /// Address & offset of the runtime type information (RTTI) identifier.
19    pub const RTTI: VariantID = RTTI_BGSEquipType;
20
21    /// Address & offset of the virtual function table.
22    ///
23    /// The number of tables is the same as the number of classes with inherited virtual functions.
24    pub const VTABLE: [VariantID; 1] = VTABLE_BGSEquipType;
25}
26
27pub struct BGSEquipTypeVtbl {
28    pub __base: BaseFormComponentVtbl,
29    pub GetEquipSlot: fn(this: &BGSEquipType),
30    pub SetEquipSlot: fn(this: &mut BGSEquipType, slot: *mut BGSEquipSlot),
31}
32
33#[commonlibsse_ng_derive_internal::ffi_enum]
34#[repr(C)]
35#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
36pub enum EQUIPPED_ITEM_TYPE {
37    Spell = 24,
38    Shield = 25,
39    Torch = 26,
40}