pub struct AutoAttackDefinitionDraft {Show 13 fields
pub(crate) spell_id: u32,
pub(crate) swing_ms: u32,
pub(crate) ap_coef: f64,
pub(crate) is_physical: bool,
pub(crate) is_pet: bool,
pub(crate) npc_id: Option<u32>,
pub(crate) uses_spell_power: bool,
pub(crate) starts_active: bool,
pub(crate) on_crit_reduce_charge: Option<CritChargeReduction>,
pub(crate) miss_chance_hook: Option<fn(&HookCtx<'_>, SwingHand) -> Option<f64>>,
pub(crate) replacement_hook: Option<fn(&mut HookCtx<'_>, SwingHand) -> Option<SwingReplacement>>,
pub(crate) on_swing: Option<fn(&mut HookCtx<'_>, SwingEvent)>,
pub(crate) pet_action_bar: Option<PetActionBar>,
}Expand description
Mutable auto-attack definition lowered with the rest of the combat catalog.
Fields§
§spell_id: u32§swing_ms: u32§ap_coef: f64§is_physical: bool§is_pet: bool§npc_id: Option<u32>§uses_spell_power: bool§starts_active: bool§on_crit_reduce_charge: Option<CritChargeReduction>§miss_chance_hook: Option<fn(&HookCtx<'_>, SwingHand) -> Option<f64>>§replacement_hook: Option<fn(&mut HookCtx<'_>, SwingHand) -> Option<SwingReplacement>>§on_swing: Option<fn(&mut HookCtx<'_>, SwingEvent)>§pet_action_bar: Option<PetActionBar>Implementations§
Source§impl AutoAttackDefinitionDraft
impl AutoAttackDefinitionDraft
Sourcepub(crate) fn into_data(
&self,
ctx: &mut BuilderToRuntimeCtx<'_>,
) -> AutoAttackData
pub(crate) fn into_data( &self, ctx: &mut BuilderToRuntimeCtx<'_>, ) -> AutoAttackData
Lower this builder def into its Copy engine-side data struct.
Generated by #[derive(LowerData)].
Source§impl AutoAttackDefinitionDraft
impl AutoAttackDefinitionDraft
pub fn new() -> Self
pub fn spell_id(self, id: u32) -> Self
pub fn swing_ms(self, ms: u32) -> Self
pub fn ap_coef(self, coef: f64) -> Self
pub fn is_pet(self) -> Self
Sourcepub fn apply_base_from_data(self, data: &ResolvedGameData) -> Self
pub fn apply_base_from_data(self, data: &ResolvedGameData) -> Self
Derive whether this definition is a dormant action-driven attack from DBC effect 78.
Sourcepub fn npc_id(self, npc_id: u32) -> Self
pub fn npc_id(self, npc_id: u32) -> Self
Assign the creature identity used by NPC-filtered companion modifiers.
pub fn uses_spell_power(self) -> Self
pub fn on_crit_reduce_charge(self, target: LocalSpellIdx, chance: f64) -> Self
pub fn on_swing(self, hook: fn(&mut HookCtx<'_>, SwingEvent)) -> Self
pub fn miss_chance_hook( self, hook: fn(&HookCtx<'_>, SwingHand) -> Option<f64>, ) -> Self
pub fn replacement_hook( self, hook: fn(&mut HookCtx<'_>, SwingHand) -> Option<SwingReplacement>, ) -> Self
pub fn pet_action_bar(self, action_bar: PetActionBar) -> Self
Trait Implementations§
Source§impl Clone for AutoAttackDefinitionDraft
impl Clone for AutoAttackDefinitionDraft
Source§fn clone(&self) -> AutoAttackDefinitionDraft
fn clone(&self) -> AutoAttackDefinitionDraft
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AutoAttackDefinitionDraft
impl Debug for AutoAttackDefinitionDraft
Auto Trait Implementations§
impl Freeze for AutoAttackDefinitionDraft
impl RefUnwindSafe for AutoAttackDefinitionDraft
impl Send for AutoAttackDefinitionDraft
impl Sync for AutoAttackDefinitionDraft
impl Unpin for AutoAttackDefinitionDraft
impl UnsafeUnpin for AutoAttackDefinitionDraft
impl UnwindSafe for AutoAttackDefinitionDraft
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
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 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>
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