Skip to main content

wowlab_engine_gamedata/game_data/
effect.rs

1//! Per-effect values and spell class-family flags used for affect-list matching.
2
3/// Number of `SpellClassMask` / `EffectSpellClassMask` flag words.
4pub(crate) const CLASS_FAMILY_FLAGS: usize = 4;
5
6#[derive(Clone, Debug, Default)]
7pub(crate) struct EffectValues {
8    pub ap_coef: f64,
9    pub sp_coef: f64,
10    pub power_coefficient_mastery_add: f64,
11    pub base_points: f64,
12    pub amplitude: f64,
13    pub period: f64,
14    pub coefficient: f64,
15    pub radius: f64,
16    /// Raw DBC scaling-class selector used to choose the matching `GameTable` budget.
17    pub scaling_class: i32,
18    pub points_per_resource: f64,
19    pub chain_targets: i32,
20    pub chain_multiplier: f64,
21    pub misc_value_0: i32,
22    /// Secondary DBC effect discriminator; aura 218/219 stores its spell-label id here.
23    pub misc_value_1: i32,
24    pub shapeshift_form_flags: i32,
25    /// `SpellShapeshiftForm.CombatRoundTime` in milliseconds; the swing period a beast form imposes.
26    pub shapeshift_combat_round_time_ms: i32,
27    /// DBC `Effect` kind id (2 = school damage, 6 = apply aura, 30 = energize, ...).
28    pub effect_type: i32,
29    /// Raw DBC `EffectMechanic`; zero means the effect inherits the spell mechanic.
30    pub effect_mechanic: i32,
31    pub effect_attributes: i32,
32    pub implicit_target_a: i32,
33    pub implicit_target_b: i32,
34    /// DBC `EffectAura` kind id (29 = mod stat, 189 = mod rating, ...); `0` for non-aura effects.
35    pub effect_aura: i32,
36    pub trigger_spell: i32,
37    pub class_mask: [i32; CLASS_FAMILY_FLAGS],
38}
39
40#[derive(Clone, Copy, Debug, Default)]
41pub(crate) struct SpellClassFlags {
42    pub class_set: i32,
43    pub class_mask: [i32; CLASS_FAMILY_FLAGS],
44}