commonlibsse_ng\re\b/
BGSEquipSlot.rs

1use crate::re::BSTArray::BSTArray;
2use crate::re::TESForm::{TESForm, TESFormVtbl};
3use crate::re::offsets_rtti::RTTI_BGSEquipSlot;
4use crate::re::offsets_vtable::VTABLE_BGSEquipSlot;
5use crate::rel::id::VariantID;
6
7#[repr(C)]
8#[derive(Debug, PartialEq, Eq)]
9pub struct BGSEquipSlot {
10    pub __base: TESForm,                          // 0x0
11    pub parentSlots: BSTArray<*mut BGSEquipSlot>, // 0x20
12    pub flags: Flag,                              // 0x38
13    pub pad3C: u32,                               // 0x3C
14}
15const _: () = assert!(core::mem::size_of::<BGSEquipSlot>() == 0x40);
16
17impl BGSEquipSlot {
18    /// Address & offset of the runtime type information (RTTI) identifier.
19    pub const RTTI: VariantID = RTTI_BGSEquipSlot;
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_BGSEquipSlot;
25}
26
27pub struct BGSEquipSlotVtbl {
28    pub __base: TESFormVtbl,
29}
30
31#[commonlibsse_ng_derive_internal::to_bitflags]
32#[repr(u32)]
33#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
34pub enum Flag {
35    #[default]
36    None = 0,
37    UseAllParents = 1 << 0,
38    ParentsOptional = 1 << 1,
39    ItemSlot = 1 << 2,
40}
41
42#[commonlibsse_ng_derive_internal::to_bitflags]
43#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
44#[repr(u32)]
45pub enum RecordFlag {
46    Deleted = 1 << 5,
47    Ignored = 1 << 12,
48}