pub struct AuraDefinitionDraft {Show 40 fields
pub(crate) name: String,
pub(crate) aura_id: u32,
pub(crate) on: AuraOn,
pub(crate) propagates_to_pet: bool,
pub(crate) duration_ms: u32,
pub(crate) doses: u8,
pub(crate) max_stacks: u8,
pub(crate) pandemic: bool,
pub(crate) refresh_behavior: RefreshBehavior,
pub(crate) duration_hasted: bool,
pub(crate) shapeshift_form: i32,
pub(crate) shapeshift_form_flags: i32,
pub(crate) shapeshift_combat_round_time_ms: u32,
pub(crate) periodic: Option<PeriodicDef>,
pub(crate) effects: [Option<BuffEffect>; 16],
pub(crate) spell_group: Option<SpellGroup>,
pub(crate) granted_aura_state: Option<AuraState>,
pub(crate) crowd_control: Option<CrowdControlSemantic>,
pub(crate) is_snapshot: bool,
pub(crate) dynamic_tick_action: DynamicTickAction,
pub(crate) apply_at_max_stacks: bool,
pub(crate) reverse: bool,
pub(crate) freeze_stacks: bool,
pub(crate) tick_behavior: AuraTickBehavior,
pub(crate) tick_stack_change: u8,
pub(crate) async_stacks: bool,
pub(crate) periodic_damage_scales_with_stacks: bool,
pub(crate) interrupt_flags: SpellAuraInterruptFlags,
pub(crate) reapply_on_expire: bool,
pub(crate) application_excluded_auras: [u32; 5],
pub(crate) application_followup_aura_id: u32,
pub(crate) apply_effects: Vec<BuilderSpellEffect>,
pub(crate) apply_profile_spell_id: u32,
pub(crate) on_consume: Vec<BuilderSpellEffect>,
pub(crate) tick_effects: Vec<BuilderSpellEffect>,
pub(crate) tick_profile_spell_id: u32,
pub(crate) expire_trigger_spell_id: u32,
pub(crate) expire_trigger_from_caster: bool,
pub(crate) on_expire: Option<CastHookFn>,
pub(crate) on_tick: Option<CastHookFn>,
}Fields§
§name: String§aura_id: u32§on: AuraOn§propagates_to_pet: bool§duration_ms: u32§doses: u8§max_stacks: u8§pandemic: bool§refresh_behavior: RefreshBehavior§duration_hasted: bool§shapeshift_form: i32§shapeshift_form_flags: i32§shapeshift_combat_round_time_ms: u32§periodic: Option<PeriodicDef>§effects: [Option<BuffEffect>; 16]§spell_group: Option<SpellGroup>§granted_aura_state: Option<AuraState>§crowd_control: Option<CrowdControlSemantic>§is_snapshot: bool§dynamic_tick_action: DynamicTickAction§apply_at_max_stacks: bool§reverse: bool§freeze_stacks: bool§tick_behavior: AuraTickBehavior§tick_stack_change: u8§async_stacks: bool§periodic_damage_scales_with_stacks: bool§interrupt_flags: SpellAuraInterruptFlags§reapply_on_expire: bool§application_excluded_auras: [u32; 5]§application_followup_aura_id: u32§apply_effects: Vec<BuilderSpellEffect>§apply_profile_spell_id: u32§on_consume: Vec<BuilderSpellEffect>§tick_effects: Vec<BuilderSpellEffect>§tick_profile_spell_id: u32§expire_trigger_spell_id: u32§expire_trigger_from_caster: bool§on_expire: Option<CastHookFn>§on_tick: Option<CastHookFn>Implementations§
Source§impl AuraDefinitionDraft
impl AuraDefinitionDraft
pub(crate) fn finalize(self) -> BuilderAuraDef
Source§impl AuraDefinitionDraft
impl AuraDefinitionDraft
Sourcepub fn apply_periodic_behavior_from_data(
self,
data: &ResolvedGameData,
spell_id: u32,
) -> Result<Self, BuilderError>
pub fn apply_periodic_behavior_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Inherit periodic cadence, critical, refresh, and rolling behavior from spell data.
pub fn periodic_damage( self, tick_ms: u32, ap_coef: f64, flags: DamageFlags, ) -> Self
pub fn periodic_flat_damage_from_spell( self, tick_ms: u32, payload: DamagePayload, ) -> Self
Sourcepub fn periodic_total_flat_damage_from_data(
self,
data: &ResolvedGameData,
tick_ms: u32,
spell_id: u32,
total: f64,
) -> Result<Self, BuilderError>
pub fn periodic_total_flat_damage_from_data( self, data: &ResolvedGameData, tick_ms: u32, spell_id: u32, total: f64, ) -> Result<Self, BuilderError>
Configure one flat-damage periodic from its total damage over the aura’s duration.
pub fn periodic_rolling_damage( self, tick_ms: u32, ap_coef: f64, flags: DamageFlags, ) -> Self
pub fn periodic_damage_from_spell( self, tick_ms: u32, payload: DamagePayload, ) -> Self
pub fn periodic_damage_sp( self, tick_ms: u32, sp_coef: f64, flags: DamageFlags, ) -> Self
Sourcepub fn periodic_tick_direct_damage(self) -> Self
pub fn periodic_tick_direct_damage(self) -> Self
Classify scheduled aura damage as direct while retaining periodic cadence.
Some buffs use a periodic scheduler to pulse child direct-damage actions.
Their hits use direct spell modifiers and proc classification.
pub fn periodic_damage_sp_from_spell( self, tick_ms: u32, payload: DamagePayload, ) -> Self
pub fn periodic_max_health_damage( self, tick_ms: u32, percent: f64, is_physical: bool, ) -> Self
Sourcepub fn periodic_damage_ap_from_data(
self,
data: &ResolvedGameData,
input: PeriodicDamageDataInput,
mode: PeriodicDamageMode,
) -> Result<Self, BuilderError>
pub fn periodic_damage_ap_from_data( self, data: &ResolvedGameData, input: PeriodicDamageDataInput, mode: PeriodicDamageMode, ) -> Result<Self, BuilderError>
Configure AP periodic damage from an effect row, deriving coefficient, school, and attribution.
Sourcepub fn periodic_damage_sp_from_data(
self,
data: &ResolvedGameData,
input: PeriodicDamageDataInput,
) -> Result<Self, BuilderError>
pub fn periodic_damage_sp_from_data( self, data: &ResolvedGameData, input: PeriodicDamageDataInput, ) -> Result<Self, BuilderError>
Configure SP periodic damage from an effect row, deriving coefficient, school, and attribution.
pub fn periodic_residual_damage(self, tick_ms: u32) -> Self
pub fn periodic_resource(self, tick_ms: u32, amount: f64) -> Self
Sourcepub fn periodic_resource_drain(self, tick_ms: u32, amount: f64) -> Self
pub fn periodic_resource_drain(self, tick_ms: u32, amount: f64) -> Self
Add periodic primary-resource drain; the aura expires when a tick is unaffordable.
Sourcepub fn periodic_apply_aura(self, tick_ms: u32, target_aura_local: u8) -> Self
pub fn periodic_apply_aura(self, tick_ms: u32, target_aura_local: u8) -> Self
Add a periodic that applies one stack of target_aura_local per tick.
Sourcepub fn periodic_remove_stack(self, tick_ms: u32) -> Self
pub fn periodic_remove_stack(self, tick_ms: u32) -> Self
Removes one stack per unhasted tick and expires at zero stacks.
Sourcepub fn periodic_stack_tick(self, tick_ms: u32) -> Self
pub fn periodic_stack_tick(self, tick_ms: u32) -> Self
Register a hook-free periodic chain used solely for tick-driven stack behavior.
Sourcepub fn periodic_damage_resource_gain(self, amount: f64) -> Self
pub fn periodic_damage_resource_gain(self, amount: f64) -> Self
Grant primary resource in addition to a periodic damage tick.
Sourcepub fn periodic_damage_crit_resource_gain(
self,
chance: f64,
amount: f64,
) -> Self
pub fn periodic_damage_crit_resource_gain( self, chance: f64, amount: f64, ) -> Self
Grant extra primary resource when a periodic damage tick crits and passes chance.
Sourcepub fn unhasted_periodic(self) -> Self
pub fn unhasted_periodic(self) -> Self
Keep the registered periodic on wall-clock time instead of haste scaling.
Sourcepub fn hasted_periodic(self) -> Self
pub fn hasted_periodic(self) -> Self
Scale the registered periodic interval with live spell haste.
Sourcepub fn partial_tick(self) -> Self
pub fn partial_tick(self) -> Self
Fires the tick hook once more at natural expiry after a partial interval.
Sourcepub fn apply_at_max_stacks(self) -> Self
pub fn apply_at_max_stacks(self) -> Self
Applies or refreshes at maximum stacks.
Sourcepub fn async_stacks(self) -> Self
pub fn async_stacks(self) -> Self
Gives each stack an independent expiry, displacing the oldest at capacity.
Sourcepub fn periodic_damage_scales_with_stacks(self) -> Self
pub fn periodic_damage_scales_with_stacks(self) -> Self
Multiplies periodic damage by the aura’s current stack count.
Sourcepub fn periodic_hook(self, tick_ms: u32) -> Self
pub fn periodic_hook(self, tick_ms: u32) -> Self
Ensures an unhasted periodic exists to drive the tick hook.
Sourcepub fn tick_hook(self, hook: CastHookFn) -> Self
pub fn tick_hook(self, hook: CastHookFn) -> Self
Sets the hook fired after each periodic tick.
pub(super) fn periodic_resource_type( self, tick_ms: u32, amount: f64, resource_type: ResourceType, ) -> Self
Source§impl AuraDefinitionDraft
impl AuraDefinitionDraft
pub fn new(name: &str, id: u32) -> Self
pub fn apply_base_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Sourcepub fn apply_periodic_effect_from_data(
self,
data: &ResolvedGameData,
spell_id: u32,
) -> Result<Self, BuilderError>
pub fn apply_periodic_effect_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Inherit periodic data while preserving authored duration and non-periodic effects.
Sourcepub fn apply_timing_modifiers_from_data(
self,
data: &ResolvedGameData,
spell_id: u32,
) -> Result<Self, BuilderError>
pub fn apply_timing_modifiers_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Apply cast-time, global-cooldown, duration, and tick-time modifiers from spell_id.
pub fn on_player(self) -> Self
pub fn on_target(self) -> Self
pub fn on_pet(self) -> Self
Sourcepub fn overkill_absorb_script(
self,
script: fn(&mut OverkillAbsorbScriptContext<'_>) -> OverkillAbsorbDecision,
) -> Self
pub fn overkill_absorb_script( self, script: fn(&mut OverkillAbsorbScriptContext<'_>) -> OverkillAbsorbDecision, ) -> Self
Installs the per-hit script strategy for aura-316 effects.
pub fn duration_ms(self, ms: u32) -> Self
pub fn trigger_spell_on_expire(self, spell_id: u32, from_caster: bool) -> Self
pub fn max_stacks(self, stacks: u8) -> Self
Sourcepub fn reverse(self) -> Self
pub fn reverse(self) -> Self
Start at maximum stacks and decrement on stack-changing ticks/triggers.
Sourcepub fn freeze_stacks(self) -> Self
pub fn freeze_stacks(self) -> Self
Prevent periodic ticks from changing stacks.
Sourcepub fn clip_tick_behavior(self, amount: u8) -> Self
pub fn clip_tick_behavior(self, amount: u8) -> Self
Change stacks after each tick and restart cadence when refreshed.
Sourcepub fn refresh_tick_behavior(self, amount: u8) -> Self
pub fn refresh_tick_behavior(self, amount: u8) -> Self
Change stacks after each tick while preserving cadence when refreshed.
Sourcepub fn dynamic_tick_update(self) -> Self
pub fn dynamic_tick_update(self) -> Self
Re-evaluate live actor state for every periodic tick.
Sourcepub fn dynamic_tick_snapshot(self) -> Self
pub fn dynamic_tick_snapshot(self) -> Self
Capture a new one-tick snapshot for every periodic tick.
pub fn no_pandemic(self) -> Self
Sourcepub fn pandemic_on_refresh(self) -> Self
pub fn pandemic_on_refresh(self) -> Self
Refresh to the base duration plus SimC’s pandemic carry window.
Sourcepub fn extend_on_refresh(self) -> Self
pub fn extend_on_refresh(self) -> Self
Extend the current remaining duration by the full base duration on refresh.
Sourcepub fn carry_tick_on_refresh(self) -> Self
pub fn carry_tick_on_refresh(self) -> Self
Refresh to the new duration while preserving the remainder of the current tick.
Sourcepub fn clip_on_refresh(self) -> Self
pub fn clip_on_refresh(self) -> Self
Replace the duration and restart the periodic tick chain on refresh.
Sourcepub fn never_refresh(self) -> Self
pub fn never_refresh(self) -> Self
Ignore applications while an existing instance remains active.
Sourcepub fn duration_hasted(self) -> Self
pub fn duration_hasted(self) -> Self
Scales the aura’s wall-clock duration by spell haste at application time.
Sourcepub fn apply_duration_behavior_from_data(
self,
data: &ResolvedGameData,
spell_id: u32,
) -> Result<Self, BuilderError>
pub fn apply_duration_behavior_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>
Inherit duration flags from the spell supplying this aura’s duration.
Sourcepub fn reapply_on_expire(self) -> Self
pub fn reapply_on_expire(self) -> Self
Re-apply immediately when the aura expires (permanent decay/refill buffs).
pub fn on_consume_extend(self, aura: LocalAuraIdx, amount_ms: u32) -> Self
pub fn spell_cost_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
pub fn spell_cost_flat( self, amount: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
pub fn secondary_spell_cost_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
pub fn secondary_spell_cost_flat( self, amount: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
pub fn recharge_rate_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
pub fn cast_time_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Sourcepub fn cast_time_percent_per_stack(
self,
percent: f64,
spells: &'static [u32],
) -> Result<Self, BuilderError>
pub fn cast_time_percent_per_stack( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Modify cast time additively for every active stack of this aura.
Sourcepub fn gcd_percent(
self,
percent: f64,
spells: &'static [u32],
) -> Result<Self, BuilderError>
pub fn gcd_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Modify the global cooldown for the listed spells while this aura has any stacks.
Sourcepub fn on_expire(self, hook: CastHookFn) -> Self
pub fn on_expire(self, hook: CastHookFn) -> Self
Sets the hook fired when the active aura is removed.
Sourcepub fn rating_per_stack(
self,
data: &ResolvedGameData,
rating: RatingType,
amount: f64,
) -> Result<Self, BuilderError>
pub fn rating_per_stack( self, data: &ResolvedGameData, rating: RatingType, amount: f64, ) -> Result<Self, BuilderError>
Add a per-stack combat-rating bonus, converted to percent points via the level’s rating divisor and DR curve (0 on empty introspection data).
pub fn haste_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Sourcepub fn attack_speed_per_stack(self, pct: f64) -> Result<Self, BuilderError>
pub fn attack_speed_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Percent points of auto-attack speed per stack (aura 319/342).
Sourcepub fn auto_attack_damage_per_stack(
self,
pct: f64,
) -> Result<Self, BuilderError>
pub fn auto_attack_damage_per_stack( self, pct: f64, ) -> Result<Self, BuilderError>
Percent points of extra auto-attack damage per stack (dynamic aura 344).
Sourcepub fn forwarded_effect_value(
self,
data: &ResolvedGameData,
value: f64,
) -> Result<Self, BuilderError>
pub fn forwarded_effect_value( self, data: &ResolvedGameData, value: f64, ) -> Result<Self, BuilderError>
Forward a resolved value into compatible zero-valued DBC effects on this aura.
The carrier effects keep their own subtype, source coordinate, and affect mask.
Sourcepub fn resource_gain_mult_per_stack(
self,
pct: f64,
) -> Result<Self, BuilderError>
pub fn resource_gain_mult_per_stack( self, pct: f64, ) -> Result<Self, BuilderError>
Percent points of extra primary-resource gain per stack (aura 213).
Sourcepub fn regen_percent_per_stack(self, pct: f64) -> Result<Self, BuilderError>
pub fn regen_percent_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Percent points of extra primary-resource regen while active (e.g. Adrenaline Rush +75).
Sourcepub fn max_resource_per_stack(self, amount: f64) -> Result<Self, BuilderError>
pub fn max_resource_per_stack(self, amount: f64) -> Result<Self, BuilderError>
Flat extra primary-resource maximum while active (e.g. Adrenaline Rush +50 energy).
pub fn crit_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Sourcepub fn damage_taken_from_caster_spells(
self,
data: &ResolvedGameData,
pct: f64,
) -> Result<Self, BuilderError>
pub fn damage_taken_from_caster_spells( self, data: &ResolvedGameData, pct: f64, ) -> Result<Self, BuilderError>
Overrides the percent on this aura’s DBC ModDamageTakenFromCasterSpells (271) effect, whose base is zero for value-override talents.
§Errors
Returns BuilderError when resolved data describes the aura but carries no such effect.
pub fn mastery_per_stack(self, pct: f64) -> Result<Self, BuilderError>
pub fn vers_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Sourcepub fn primary_per_stack(self, value: f64) -> Result<Self, BuilderError>
pub fn primary_per_stack(self, value: f64) -> Result<Self, BuilderError>
Add a flat primary stat bonus per stack (raw value).
Sourcepub fn primary_pct_per_stack(self, pct: f64) -> Result<Self, BuilderError>
pub fn primary_pct_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Add a percent primary-stat bonus per stack (e.g. 10.0 for +10%).
Sourcepub fn attack_power_pct_per_stack(self, pct: f64) -> Result<Self, BuilderError>
pub fn attack_power_pct_per_stack(self, pct: f64) -> Result<Self, BuilderError>
Add a percent attack-power bonus per stack (e.g. 10.0 for +10%).
Sourcepub fn crit_chance_spells(
self,
pct: f64,
spells: &'static [u32],
) -> Result<Self, BuilderError>
pub fn crit_chance_spells( self, pct: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Percent points of crit CHANCE per stack, only for the listed spells.
Sourcepub fn crit_damage_spells(
self,
pct: f64,
spells: &'static [u32],
) -> Result<Self, BuilderError>
pub fn crit_damage_spells( self, pct: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Percent points of crit DAMAGE per stack, only for the listed spells.
Sourcepub fn damage_percent_spells(
self,
pct: f64,
spells: &'static [u32],
) -> Result<Self, BuilderError>
pub fn damage_percent_spells( self, pct: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Add outgoing damage percent for the listed spells while this aura is active.
Sourcepub fn damage_percent_spells_linear(
self,
pct: f64,
spells: &'static [u32],
) -> Result<Self, BuilderError>
pub fn damage_percent_spells_linear( self, pct: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>
Adds linear per-stack outgoing damage for the listed spells.
Sourcepub fn damage_multiplier(self, mult: f64) -> Result<Self, BuilderError>
pub fn damage_multiplier(self, mult: f64) -> Result<Self, BuilderError>
Add a multiplicative outgoing damage modifier (e.g. 1.10 for +10%).
Sourcepub fn damage_multiplier_stacking(
self,
initial: f64,
per_stack: f64,
) -> Result<Self, BuilderError>
pub fn damage_multiplier_stacking( self, initial: f64, per_stack: f64, ) -> Result<Self, BuilderError>
Add a stacking damage modifier whose first stack differs from later stacks.
Sourcepub fn pet_damage_multiplier(self, mult: f64) -> Result<Self, BuilderError>
pub fn pet_damage_multiplier(self, mult: f64) -> Result<Self, BuilderError>
Add a multiplicative outgoing modifier for pet/guardian hits only.
pub fn spell_group(self, group_idx: u8, rule: SpellGroupRule) -> Self
Sourcepub fn snapshot(self) -> Self
pub fn snapshot(self) -> Self
Capture a source-side stat snapshot on periodic ticks; no-op without periodic damage.
fn push_effect(self, effect: BuffEffect) -> Result<Self, BuilderError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuraDefinitionDraft
impl RefUnwindSafe for AuraDefinitionDraft
impl Send for AuraDefinitionDraft
impl Sync for AuraDefinitionDraft
impl Unpin for AuraDefinitionDraft
impl UnsafeUnpin for AuraDefinitionDraft
impl UnwindSafe for AuraDefinitionDraft
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more