Skip to main content

wowlab_engine_combat/state/defs/
pending.rs

1use wowlab_engine_domain::rotation::SpellSlotHandle;
2
3use super::{
4    ActorId, CastHookFn, DamageEffectRef, EnemyIdx, LocalAuraIdx, RuntimeDamageDef, SimTime,
5    SpatialTransform, SpellEffectRange,
6};
7use crate::state::PendingGroundPulse;
8
9#[derive(Clone, Copy, Debug)]
10pub(crate) enum PendingTimerAction {
11    Hook(CastHookFn),
12    PeriodicDriver {
13        index: usize,
14        expires_at: Option<SimTime>,
15    },
16    GroundPulse(PendingGroundPulse),
17    Effect(PendingEffectProgram),
18}
19
20#[derive(Clone, Copy, Debug)]
21pub(crate) struct PendingHookTimer {
22    pub(crate) action: PendingTimerAction,
23    pub(crate) source: ActorId,
24    pub(crate) target: Option<EnemyIdx>,
25    pub(crate) source_damage_flags: crate::systems::DamageFlags,
26    pub(crate) source_npc_id: Option<u32>,
27    pub(crate) pet_stat_inheritance: crate::state::PetStatInheritance,
28}
29
30#[derive(Clone, Copy, Debug)]
31pub(crate) struct PendingEffectProgram {
32    pub(crate) effects: SpellEffectRange,
33    pub(crate) profile_spell_id: u32,
34    pub(crate) profile_action: crate::state::program::LocalDamageActionIdx,
35    pub(crate) repeat: u8,
36    pub(crate) source: ActorId,
37    pub(crate) target: Option<EnemyIdx>,
38    pub(crate) effect_target: Option<ActorId>,
39    pub(crate) flags: crate::systems::DamageFlags,
40    pub(crate) originating_proc_driver_spell_id: u32,
41}
42
43#[derive(Clone, Copy, Debug)]
44pub(crate) struct PendingSpellImpact {
45    pub(crate) damage_binding: Option<crate::state::program::SpellDamageBinding>,
46    pub(crate) spell_local: crate::state::LocalSpellIdx,
47    pub(crate) spell_handle: SpellSlotHandle,
48    pub(crate) spell_id: u32,
49    pub(crate) profile_action: crate::state::program::LocalDamageActionIdx,
50    pub(crate) damage_effect: DamageEffectRef,
51    pub(crate) base_points: f64,
52    pub(crate) damage: RuntimeDamageDef,
53    pub(crate) is_pet: bool,
54    pub(crate) may_crit: bool,
55    pub(crate) attribute_flags: crate::DamageFlags,
56    pub(crate) applies_aura: Option<LocalAuraIdx>,
57    pub(crate) applies_aura_duration_ms: Option<u32>,
58    pub(crate) followup_effects: SpellEffectRange,
59    pub(crate) source: ActorId,
60    pub(crate) target: EnemyIdx,
61    pub(crate) cast_complete_at: SimTime,
62    pub(crate) travel: crate::travel::SpellTravelData,
63    pub(crate) required_explicit_target_mask: u32,
64    pub(crate) locked_source_transform: Option<SpatialTransform>,
65    pub(crate) locked_target_transform: Option<SpatialTransform>,
66    pub(crate) cast_destination: Option<SpatialTransform>,
67}