Skip to main content

AuraDefinitionDraft

Struct AuraDefinitionDraft 

Source
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

Source

pub(crate) fn finalize(self) -> BuilderAuraDef

Source§

impl AuraDefinitionDraft

Source

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.

Source

pub fn periodic_damage( self, tick_ms: u32, ap_coef: f64, flags: DamageFlags, ) -> Self

Source

pub fn periodic_flat_damage_from_spell( self, tick_ms: u32, payload: DamagePayload, ) -> Self

Source

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.

Source

pub fn periodic_rolling_damage( self, tick_ms: u32, ap_coef: f64, flags: DamageFlags, ) -> Self

Source

pub fn periodic_damage_from_spell( self, tick_ms: u32, payload: DamagePayload, ) -> Self

Source

pub fn periodic_damage_sp( self, tick_ms: u32, sp_coef: f64, flags: DamageFlags, ) -> Self

Source

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.

Source

pub fn periodic_damage_sp_from_spell( self, tick_ms: u32, payload: DamagePayload, ) -> Self

Source

pub fn periodic_max_health_damage( self, tick_ms: u32, percent: f64, is_physical: bool, ) -> Self

Source

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.

Source

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.

Source

pub fn periodic_residual_damage(self, tick_ms: u32) -> Self

Source

pub fn periodic_resource(self, tick_ms: u32, amount: f64) -> Self

Source

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.

Source

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.

Source

pub fn periodic_remove_stack(self, tick_ms: u32) -> Self

Removes one stack per unhasted tick and expires at zero stacks.

Source

pub fn periodic_stack_tick(self, tick_ms: u32) -> Self

Register a hook-free periodic chain used solely for tick-driven stack behavior.

Source

pub fn periodic_damage_resource_gain(self, amount: f64) -> Self

Grant primary resource in addition to a periodic damage tick.

Source

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.

Source

pub fn unhasted_periodic(self) -> Self

Keep the registered periodic on wall-clock time instead of haste scaling.

Source

pub fn hasted_periodic(self) -> Self

Scale the registered periodic interval with live spell haste.

Source

pub fn partial_tick(self) -> Self

Fires the tick hook once more at natural expiry after a partial interval.

Source

pub fn apply_at_max_stacks(self) -> Self

Applies or refreshes at maximum stacks.

Source

pub fn async_stacks(self) -> Self

Gives each stack an independent expiry, displacing the oldest at capacity.

Source

pub fn periodic_damage_scales_with_stacks(self) -> Self

Multiplies periodic damage by the aura’s current stack count.

Source

pub fn periodic_hook(self, tick_ms: u32) -> Self

Ensures an unhasted periodic exists to drive the tick hook.

Source

pub fn tick_hook(self, hook: CastHookFn) -> Self

Sets the hook fired after each periodic tick.

Source

pub(super) fn periodic_resource_type( self, tick_ms: u32, amount: f64, resource_type: ResourceType, ) -> Self

Source§

impl AuraDefinitionDraft

Source

pub fn new(name: &str, id: u32) -> Self

Source

pub fn apply_base_from_data( self, data: &ResolvedGameData, spell_id: u32, ) -> Result<Self, BuilderError>

Source

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.

Source

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.

Source

pub fn on_player(self) -> Self

Source

pub fn on_target(self) -> Self

Source

pub fn on_pet(self) -> Self

Source

pub fn overkill_absorb_script( self, script: fn(&mut OverkillAbsorbScriptContext<'_>) -> OverkillAbsorbDecision, ) -> Self

Installs the per-hit script strategy for aura-316 effects.

Source

pub fn duration_ms(self, ms: u32) -> Self

Source

pub fn trigger_spell_on_expire(self, spell_id: u32, from_caster: bool) -> Self

Source

pub fn max_stacks(self, stacks: u8) -> Self

Source

pub fn reverse(self) -> Self

Start at maximum stacks and decrement on stack-changing ticks/triggers.

Source

pub fn freeze_stacks(self) -> Self

Prevent periodic ticks from changing stacks.

Source

pub fn clip_tick_behavior(self, amount: u8) -> Self

Change stacks after each tick and restart cadence when refreshed.

Source

pub fn refresh_tick_behavior(self, amount: u8) -> Self

Change stacks after each tick while preserving cadence when refreshed.

Source

pub fn dynamic_tick_update(self) -> Self

Re-evaluate live actor state for every periodic tick.

Source

pub fn dynamic_tick_snapshot(self) -> Self

Capture a new one-tick snapshot for every periodic tick.

Source

pub fn doses(self, doses: u8) -> Self

Number of stacks added by one aura application.

Source

pub fn no_pandemic(self) -> Self

Source

pub fn pandemic_on_refresh(self) -> Self

Refresh to the base duration plus SimC’s pandemic carry window.

Source

pub fn extend_on_refresh(self) -> Self

Extend the current remaining duration by the full base duration on refresh.

Source

pub fn carry_tick_on_refresh(self) -> Self

Refresh to the new duration while preserving the remainder of the current tick.

Source

pub fn clip_on_refresh(self) -> Self

Replace the duration and restart the periodic tick chain on refresh.

Source

pub fn never_refresh(self) -> Self

Ignore applications while an existing instance remains active.

Source

pub fn duration_hasted(self) -> Self

Scales the aura’s wall-clock duration by spell haste at application time.

Source

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.

Source

pub fn reapply_on_expire(self) -> Self

Re-apply immediately when the aura expires (permanent decay/refill buffs).

Source

pub fn on_consume_extend(self, aura: LocalAuraIdx, amount_ms: u32) -> Self

Source

pub fn spell_cost_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>

Source

pub fn spell_cost_flat( self, amount: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>

Source

pub fn secondary_spell_cost_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>

Source

pub fn secondary_spell_cost_flat( self, amount: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>

Source

pub fn recharge_rate_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>

Source

pub fn cast_time_percent( self, percent: f64, spells: &'static [u32], ) -> Result<Self, BuilderError>

Source

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.

Source

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.

Source

pub fn on_expire(self, hook: CastHookFn) -> Self

Sets the hook fired when the active aura is removed.

Source

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).

Source

pub fn haste_per_stack(self, pct: f64) -> Result<Self, BuilderError>

Source

pub fn attack_speed_per_stack(self, pct: f64) -> Result<Self, BuilderError>

Percent points of auto-attack speed per stack (aura 319/342).

Source

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).

Source

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.

Source

pub fn resource_gain_mult_per_stack( self, pct: f64, ) -> Result<Self, BuilderError>

Percent points of extra primary-resource gain per stack (aura 213).

Source

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).

Source

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).

Source

pub fn crit_per_stack(self, pct: f64) -> Result<Self, BuilderError>

Source

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.

Source

pub fn mastery_per_stack(self, pct: f64) -> Result<Self, BuilderError>

Source

pub fn vers_per_stack(self, pct: f64) -> Result<Self, BuilderError>

Source

pub fn primary_per_stack(self, value: f64) -> Result<Self, BuilderError>

Add a flat primary stat bonus per stack (raw value).

Source

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%).

Source

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%).

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn damage_multiplier(self, mult: f64) -> Result<Self, BuilderError>

Add a multiplicative outgoing damage modifier (e.g. 1.10 for +10%).

Source

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.

Source

pub fn pet_damage_multiplier(self, mult: f64) -> Result<Self, BuilderError>

Add a multiplicative outgoing modifier for pet/guardian hits only.

Source

pub fn spell_group(self, group_idx: u8, rule: SpellGroupRule) -> Self

Source

pub fn snapshot(self) -> Self

Capture a source-side stat snapshot on periodic ticks; no-op without periodic damage.

Source

fn push_effect(self, effect: BuffEffect) -> Result<Self, BuilderError>

Trait Implementations§

Source§

impl Debug for AuraDefinitionDraft

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> SpecConfig for T
where T: Any + Debug + Send,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> Upcast<T> for S
where T: UpcastFrom<S> + ?Sized, S: ?Sized,

Source§

fn upcast(&self) -> &T
where Self: ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider ref type within the Wasm bindgen generics type system. Read more
Source§

fn upcast_into(self) -> T
where Self: Sized + ErasableGeneric, T: ErasableGeneric<Repr = Self::Repr>,

Perform a zero-cost type-safe upcast to a wider type within the Wasm bindgen generics type system. Read more
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> ResolverSyncBound for T
where T: Sync + ?Sized,