pub struct GitAreaEffect {Show 26 fields
pub shape: GitAreaEffectShape,
pub tag: String,
pub area_effect_id: i32,
pub spell_id: u32,
pub spell_save_dc: i32,
pub spell_level: i32,
pub meta_magic_type: u8,
pub creator_id: u32,
pub linked_to_object: u32,
pub last_entered: u32,
pub last_left: u32,
pub duration: u32,
pub duration_type: u8,
pub last_heartbeat_day: u32,
pub last_heartbeat_time: u32,
pub on_heartbeat: ResRef,
pub on_user_defined: ResRef,
pub on_obj_enter: ResRef,
pub on_obj_exit: ResRef,
pub object_id: ObjectId,
pub orientation_x: f32,
pub orientation_y: f32,
pub orientation_z: f32,
pub position_x: f32,
pub position_y: f32,
pub position_z: f32,
}Expand description
An area-of-effect object placed in the area (struct type 13).
These are runtime spell and ability effects. Unlike every other object
list, they have no blueprint: no loader in the binary ever opens a
template for one, so UseTemplates has nothing to select between and
Git::area_effects is a plain Vec rather than a GitObjects.
§Not exercised by the fixture corpus
Every save in fixtures/saves/ has an empty AreaEffectList, so this
field set comes from the engine’s own load and save paths rather than from
real data. A test asserts the lists are still empty, so a corpus that
grows one fails loudly instead of quietly going unchecked.
Fields§
§shape: GitAreaEffectShapeThe effect’s footprint, as whichever shape the file describes.
tag: StringObject tag (Tag).
area_effect_id: i32Effect row (AreaEffectId), into vfx_persistent.2da.
spell_id: u32Originating spell (SpellId).
spell_save_dc: i32Save DC of the originating spell (SpellSaveDC).
spell_level: i32Level of the originating spell (SpellLevel).
meta_magic_type: u8Metamagic applied to the originating spell (MetaMagicType).
creator_id: u32Object that created the effect (CreatorId).
linked_to_object: u32Object the effect is attached to (LinkedToObject).
last_entered: u32Last object to enter the effect (LastEntered).
last_left: u32Last object to leave the effect (LastLeft).
duration: u32Remaining duration (Duration).
duration_type: u8How the duration is counted (DurationType).
last_heartbeat_day: u32Day of the last heartbeat (LastHrtbtDay).
last_heartbeat_time: u32Time of the last heartbeat (LastHrtbtTime).
on_heartbeat: ResRefOnHeartbeat. Written by the engine, never read back.
on_user_defined: ResRefOnUserDefined. Written by the engine, never read back.
on_obj_enter: ResRefOnObjEnter. Written by the engine, never read back.
on_obj_exit: ResRefOnObjExit. Written by the engine, never read back.
object_id: ObjectIdRuntime object id (ObjectId).
Defaults to the engine-wide OBJECT_INVALID placeholder rather than
zero, which is what a freshly constructed object carries.
orientation_x: f32X orientation (OrientationX).
orientation_y: f32Y orientation (OrientationY).
orientation_z: f32Z orientation (OrientationZ).
position_x: f32X position (PositionX).
position_y: f32Y position (PositionY).
position_z: f32Z position (PositionZ).
Implementations§
Source§impl GitAreaEffect
impl GitAreaEffect
Sourcepub const PARTS: &'static [&'static [Field]]
pub const PARTS: &'static [&'static [Field]]
This type’s schema in parts, which is what a container holding it references.
Own fields first, then one part per flattened child in the order they are declared.
Sourcepub fn read_declared(root: &GffStruct) -> Self
pub fn read_declared(root: &GffStruct) -> Self
Reads every declared field off root.
Absent fields take the entry’s own answer, so a fallback is derived from the declaration rather than restated beside it.
A field declaring a hand-written read is left at that answer for the view to overwrite.
Sourcepub fn write_declared(&self, root: &mut GffStruct)
pub fn write_declared(&self, root: &mut GffStruct)
Writes every declared field onto root, leaving out the ones
their entry says the engine’s own writer leaves out.
A field declaring a hand-written write is not touched here.
Source§impl GitAreaEffect
impl GitAreaEffect
Sourcepub fn read_element(structure: &GffStruct) -> Self
pub fn read_element(structure: &GffStruct) -> Self
Reads one AreaEffectList element, resolving the shape’s four labels.
Sourcepub fn write_element(&self, structure: &mut GffStruct)
pub fn write_element(&self, structure: &mut GffStruct)
Writes one element, emitting only the dimensions its shape uses.
A circle carrying a Width would be a field the engine never wrote.
Trait Implementations§
Source§impl Clone for GitAreaEffect
impl Clone for GitAreaEffect
Source§fn clone(&self) -> GitAreaEffect
fn clone(&self) -> GitAreaEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GitAreaEffect
impl Debug for GitAreaEffect
Source§impl Default for GitAreaEffect
impl Default for GitAreaEffect
Source§impl HasSchema for GitAreaEffect
impl HasSchema for GitAreaEffect
Source§impl PartialEq for GitAreaEffect
impl PartialEq for GitAreaEffect
Source§fn eq(&self, other: &GitAreaEffect) -> bool
fn eq(&self, other: &GitAreaEffect) -> bool
self and other values to be equal, and is used by ==.