Skip to main content

DamagePlan

Struct DamagePlan 

Source
pub(crate) struct DamagePlan {
Show 46 fields actions: Box<[DamageActionPlan]>, effects: Box<[DamageEffectPlan]>, generated_action_bindings: FastMap<DamageActionId, LocalDamageActionIdx>, folded_passive_effects_by_action: Box<[Box<[LocalDamageEffectIdx]>]>, crit_damage_per_crit_chance: Box<[(SpellSchoolMask, f64)]>, spell_requests: Box<[Option<SpellDamageBinding>]>, spell_actions: Box<[LocalDamageActionIdx]>, periodic_requests: Box<[Option<PeriodicDamageBinding>]>, aura_actions: Box<[LocalDamageActionIdx]>, aura_apply_profile_actions: Box<[LocalDamageActionIdx]>, aura_tick_profile_actions: Box<[LocalDamageActionIdx]>, effect_requests: Box<[Option<DamageRequestBinding>]>, spell_effect_sources: Box<[Option<LocalDamageEffectIdx>]>, delayed_profile_actions: Box<[Option<LocalDamageActionIdx>]>, mastery_action: Option<LocalDamageActionIdx>, auto_attacks: Box<[FinalizedAutoAttackProfile]>, channel_requests: Box<[[Option<DamageRequestBinding>; 2]]>, replications: Box<[FinalizedDamageReplication]>, aura_replications: Box<[[Option<u16>; 16]]>, passive_replications: Box<[Option<u16>]>, aura_buff_bindings: Box<[[Option<FinalizedBuffDamageBinding>; 16]]>, passive_buff_bindings: Box<[Option<FinalizedBuffDamageBinding>]>, driver_modifiers_by_action: Box<[Box<[usize]>]>, impact_effect_driver_actions: Box<[Option<LocalDamageActionIdx>]>, impact_effect_profile_actions: Box<[Option<LocalDamageActionIdx>]>, periodic_driver_actions: Box<[LocalDamageActionIdx]>, pub(crate) auto_attack_damage_mult: f64, pub(crate) pet_damage_mult: f64, pub(crate) guardian_damage_mult: f64, pub(crate) target_armor_mult: f64, pub(crate) player_level: i32, pub(crate) main_hand: WeaponStats, pub(crate) off_hand: Option<WeaponStats>, primary_power_display_divisor: f64, secondary_power_display_divisor: f64, primary_power_cost_percent: f64, secondary_power_cost_percent: f64, rage_auto_attack_gain_multiplier: f64, pub(crate) health_per_stamina: Option<f64>, pub(crate) has_spell_modifiers: bool, pub(crate) has_armor_bypass: bool, pub(crate) has_health_critical: bool, pub(crate) has_replication: bool, pub(crate) has_reflection: bool, pub(crate) has_deflection: bool, pub(crate) retains_landed_impacts: bool,
}
Expand description

Immutable program-local damage catalog compiled during finalization.

Fields§

§actions: Box<[DamageActionPlan]>§effects: Box<[DamageEffectPlan]>§generated_action_bindings: FastMap<DamageActionId, LocalDamageActionIdx>§folded_passive_effects_by_action: Box<[Box<[LocalDamageEffectIdx]>]>§crit_damage_per_crit_chance: Box<[(SpellSchoolMask, f64)]>§spell_requests: Box<[Option<SpellDamageBinding>]>§spell_actions: Box<[LocalDamageActionIdx]>§periodic_requests: Box<[Option<PeriodicDamageBinding>]>§aura_actions: Box<[LocalDamageActionIdx]>§aura_apply_profile_actions: Box<[LocalDamageActionIdx]>§aura_tick_profile_actions: Box<[LocalDamageActionIdx]>§effect_requests: Box<[Option<DamageRequestBinding>]>§spell_effect_sources: Box<[Option<LocalDamageEffectIdx>]>§delayed_profile_actions: Box<[Option<LocalDamageActionIdx>]>§mastery_action: Option<LocalDamageActionIdx>§auto_attacks: Box<[FinalizedAutoAttackProfile]>§channel_requests: Box<[[Option<DamageRequestBinding>; 2]]>§replications: Box<[FinalizedDamageReplication]>§aura_replications: Box<[[Option<u16>; 16]]>§passive_replications: Box<[Option<u16>]>§aura_buff_bindings: Box<[[Option<FinalizedBuffDamageBinding>; 16]]>§passive_buff_bindings: Box<[Option<FinalizedBuffDamageBinding>]>§driver_modifiers_by_action: Box<[Box<[usize]>]>§impact_effect_driver_actions: Box<[Option<LocalDamageActionIdx>]>§impact_effect_profile_actions: Box<[Option<LocalDamageActionIdx>]>§periodic_driver_actions: Box<[LocalDamageActionIdx]>§auto_attack_damage_mult: f64§pet_damage_mult: f64§guardian_damage_mult: f64§target_armor_mult: f64§player_level: i32§main_hand: WeaponStats§off_hand: Option<WeaponStats>§primary_power_display_divisor: f64§secondary_power_display_divisor: f64§primary_power_cost_percent: f64§secondary_power_cost_percent: f64§rage_auto_attack_gain_multiplier: f64§health_per_stamina: Option<f64>§has_spell_modifiers: bool§has_armor_bypass: bool§has_health_critical: bool§has_replication: bool§has_reflection: bool§has_deflection: bool§retains_landed_impacts: bool

Implementations§

Source§

impl DamagePlan

Source

pub(crate) fn compile( config: &ProgramConfig, spells: &[SpellData], auras: &[AuraData], passive_driver_effects: &[PassiveDriverEffect], spell_effects: &[SpellEffectData], declared_spell_ids: &[u32], generated_identities: &[DamageActionId], reachable_spell_ids: &[u32], required_target_spell_ids: &[u32], effect_plan: &EffectPlan, driver_spell_modifiers: &[DriverSpellModifier], impact_effect_procs: &[ImpactEffectProc], periodic_drivers: &[PeriodicDriver], landed_impact_procs: &[LandedImpactProc], auto_attacks: &[AutoAttackData], hook_flat_damage: &FastMap<u32, f64>, hook_scalars: &FastMap<u32, f64>, ) -> Result<Self, String>

Source§

impl DamagePlan

Source

pub(crate) fn action_locals( &self, ) -> impl Iterator<Item = LocalDamageActionIdx> + '_

Source

pub(crate) fn finalize_action_for_spell( &self, spell_id: u32, ) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn action_request( &self, action: LocalDamageActionIdx, ) -> Option<DamageRequestBinding>

Source

pub(crate) fn diagnostic_action_ordinal(&self, spell_id: u32) -> Option<usize>

Source

pub(crate) fn dense_talent_ranks(&self, ranks: &IntMap<u32, u8>) -> Box<[u8]>

Source

pub(crate) fn generated_action( &self, action: DamageActionId, ) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn action_at(&self, local: LocalDamageActionIdx) -> &DamageActionPlan

Source

pub(crate) fn spell_request( &self, local: LocalSpellIdx, ) -> Option<SpellDamageBinding>

Source

pub(crate) fn spell_action(&self, local: LocalSpellIdx) -> LocalDamageActionIdx

Source

pub(crate) fn periodic_request( &self, local: LocalAuraIdx, ) -> Option<PeriodicDamageBinding>

Source

pub(crate) fn aura_action(&self, local: LocalAuraIdx) -> LocalDamageActionIdx

Source

pub(crate) fn aura_apply_profile_action( &self, local: LocalAuraIdx, ) -> LocalDamageActionIdx

Source

pub(crate) fn aura_tick_profile_action( &self, local: LocalAuraIdx, ) -> LocalDamageActionIdx

Source

pub(crate) fn action_effect( &self, action: LocalDamageActionIdx, effect_index: u8, ) -> Option<LocalDamageEffectIdx>

Source

pub(crate) fn action_effects( &self, action: LocalDamageActionIdx, ) -> impl Iterator<Item = (LocalDamageEffectIdx, &DamageEffectPlan)>

Source

pub(crate) fn effect_request( &self, index: usize, ) -> Option<DamageRequestBinding>

Source

pub(crate) fn spell_effect_source( &self, index: usize, ) -> Option<LocalDamageEffectIdx>

Source

pub(crate) fn delayed_profile_action( &self, index: usize, ) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn mastery_action(&self) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn auto_attack_profile( &self, index: usize, ) -> Option<FinalizedAutoAttackProfile>

Source

pub(crate) fn channel_request( &self, local: LocalSpellIdx, alternate: bool, ) -> Option<DamageRequestBinding>

Source

pub(crate) fn aura_replication( &self, local: LocalAuraIdx, position: u8, ) -> Option<&FinalizedDamageReplication>

Source

pub(crate) fn passive_replication( &self, index: usize, ) -> Option<&FinalizedDamageReplication>

Source

pub(crate) fn aura_buff_binding( &self, local: LocalAuraIdx, position: u8, ) -> Option<&FinalizedBuffDamageBinding>

Source

pub(crate) fn passive_buff_binding( &self, index: usize, ) -> Option<&FinalizedBuffDamageBinding>

Source

pub(crate) fn driver_modifiers_for_action( &self, action: LocalDamageActionIdx, ) -> &[usize]

Source

pub(crate) fn impact_effect_driver_action( &self, index: usize, ) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn impact_effect_profile_action( &self, index: usize, ) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn periodic_driver_action( &self, index: usize, ) -> LocalDamageActionIdx

Source

pub(crate) fn effect_at(&self, local: LocalDamageEffectIdx) -> &DamageEffectPlan

Source

pub(crate) fn effect_ref(&self, local: LocalDamageEffectIdx) -> DamageEffectRef

Source

pub(crate) fn action_id_request( &self, action: DamageActionId, ) -> Option<DamageRequestBinding>

Source

pub(crate) fn action_id_plan( &self, action: DamageActionId, ) -> Option<&DamageActionPlan>

Source

pub(crate) fn validated_action_id( &self, action: DamageActionId, ) -> Option<LocalDamageActionIdx>

Source

pub(crate) fn profiled_action_id_request( &self, action: DamageActionId, profile: DamageActionId, ) -> Option<DamageRequestBinding>

Source

pub(crate) fn effect_id_plan( &self, coordinate: DamageEffectId, ) -> Option<(LocalDamageEffectIdx, &DamageEffectPlan)>

Source

pub(crate) fn triggered_effect_id_request( &self, source: DamageEffectId, ) -> Option<(DamageRequestBinding, &DamageEffectPlan)>

Source

pub(crate) fn effect_id_request( &self, effect: DamageEffectId, geometry: DamageEffectId, profile: DamageActionId, ) -> Option<DamageRequestBinding>

Source

pub(crate) fn effect_affects_action( &self, source: LocalDamageEffectIdx, target: LocalDamageActionIdx, ) -> bool

Source

pub(crate) fn proc_provenance_local( &self, action: LocalDamageActionIdx, kind: ProcSourceKind, ) -> ProcProvenance

Source

pub(crate) fn resolved_action_damage( &self, local: LocalDamageActionIdx, ) -> Option<(f64, RuntimeDamageDef)>

Source

pub(crate) fn cost_entry_local( &self, action: LocalDamageActionIdx, pool: ResourcePool, ) -> u8

Source

pub(crate) const fn power_display_divisor(&self, pool: ResourcePool) -> f64

Source

pub(crate) const fn power_cost_percent(&self, pool: ResourcePool) -> f64

Source

pub(crate) const fn rage_auto_attack_gain_multiplier(&self) -> f64

Source

pub(crate) fn live_effect_points_local( &self, effect: LocalDamageEffectIdx, mastery_points: f64, ) -> f64

Source

pub(crate) fn crit_damage_per_crit_chance( &self, ) -> impl Iterator<Item = (SpellSchoolMask, f64)> + '_

Source

pub(crate) fn folded_passive_effects_for_action( &self, action: LocalDamageActionIdx, ) -> &[LocalDamageEffectIdx]

Trait Implementations§

Source§

impl Debug for DamagePlan

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
§

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

§

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
§

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