commonlibsse_ng\re\s/
SpellItem.rs1use crate::re::BGSEquipType::{BGSEquipType, BGSEquipTypeVtbl};
2use crate::re::BGSMenuDisplayObject::{BGSMenuDisplayObject, BGSMenuDisplayObjectVtbl};
3use crate::re::BGSPerk::BGSPerk;
4use crate::re::FormTypes::FormType;
5use crate::re::MagicItem::{MagicItem, MagicItemVtbl};
6use crate::re::MagicSystem;
7use crate::re::TESDescription::{TESDescription, TESDescriptionVtbl};
8use crate::re::offsets_rtti::RTTI_SpellItem;
9use crate::re::offsets_vtable::VTABLE_SpellItem;
10use crate::rel::id::VariantID;
11
12#[repr(C)]
13#[derive(Debug)]
14pub struct SpellItem {
15 pub __base: MagicItem, pub __base1: BGSEquipType, pub __base2: BGSMenuDisplayObject, pub __base3: TESDescription, pub data: Data, }
21const _: () = assert!(core::mem::size_of::<SpellItem>() == 0xE8);
22
23impl SpellItem {
24 pub const RTTI: VariantID = RTTI_SpellItem;
26
27 pub const VTABLE: [VariantID; 6] = VTABLE_SpellItem;
31
32 pub const FORM_TYPE: FormType = FormType::Spell;
34}
35
36#[repr(C)]
37pub struct SpellItemVtbl {
38 pub __base: MagicItemVtbl,
39 pub __base1: BGSEquipTypeVtbl,
40 pub __base2: BGSMenuDisplayObjectVtbl,
41 pub __base3: TESDescriptionVtbl,
42}
43
44#[derive(Debug, Clone, PartialEq)]
45pub struct Data {
46 costOverride: i32, flags: SpellFlag, spellType: MagicSystem::SpellType, chargeTime: f32, castingType: MagicSystem::CastingType, delivery: MagicSystem::Delivery, castDuration: f32, range: f32, castingPerk: *mut BGSPerk, }
56const _: () = assert!(core::mem::size_of::<Data>() == 0x28);
57
58#[commonlibsse_ng_derive_internal::to_bitflags]
59#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
60#[repr(u32)]
61pub enum SpellFlag {
62 None = 0,
63 CostOverride = 1 << 0,
64 FoodItem = 1 << 1,
65 ExtendDuration = 1 << 3,
66 PCStartSpell = 1 << 17,
67 InstantCast = 1 << 18,
68 IgnoreLOSCheck = 1 << 19,
69 IgnoreResistance = 1 << 20,
70 NoAbsorb = 1 << 21,
71 NoDualCastMods = 1 << 23,
72}
73
74#[commonlibsse_ng_derive_internal::to_bitflags]
75#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
76#[repr(u32)]
77pub enum RecordFlag {
78 Deleted = 1 << 5,
79 Ignored = 1 << 12,
80}