pub struct MasteryCtx<'a> {
pub state: &'a CombatState,
pub buf: &'a DenseBuffer,
pub spell_id: u32,
pub school: DamageSchool,
pub mastery: f64,
pub player_crit_pct: f64,
pub mastery_spell: SpellIdx,
pub is_periodic: bool,
pub is_pet: bool,
pub source: ActorId,
pub target: Option<EnemyIdx>,
pub now: SimTime,
}Fields§
§state: &'a CombatState§buf: &'a DenseBuffer§spell_id: u32§school: DamageSchool§mastery: f64§player_crit_pct: f64§mastery_spell: SpellIdx§is_periodic: bool§is_pet: bool§source: ActorId§target: Option<EnemyIdx>Hostile target used by target-specific mastery clauses. Reflected hits re-executed against their caster have no hostile target.
now: SimTimeImplementations§
Source§impl MasteryCtx<'_>
impl MasteryCtx<'_>
Sourcepub fn active_weapon_imbue_count(&self) -> usize
pub fn active_weapon_imbue_count(&self) -> usize
Number of registered temporary weapon imbues currently active.
Sourcepub fn is_aura_active(&self, local: LocalAuraIdx) -> bool
pub fn is_aura_active(&self, local: LocalAuraIdx) -> bool
Whether the exact source/target aura instance is active for this hit.
Sourcepub fn is_aura_active_id(&self, aura_id: u32) -> bool
pub fn is_aura_active_id(&self, aura_id: u32) -> bool
Whether a registered aura id is active for this hit’s exact source/target.
Sourcepub fn spell_has_label(&self, label: i32) -> bool
pub fn spell_has_label(&self, label: i32) -> bool
Whether the hit’s spell carries the given SpellLabel id.
Sourcepub fn has_school(&self, school: DamageSchool) -> bool
pub fn has_school(&self, school: DamageSchool) -> bool
Whether the hit’s DBC school mask contains school.
Sourcepub fn affects_spell(&self, effect: u8) -> bool
pub fn affects_spell(&self, effect: u8) -> bool
Is the hit’s spell inside the mastery effect’s affect list? effect is 1-based.
Sourcepub fn affected_spell_bonus(&self, effect: u8) -> f64
pub fn affected_spell_bonus(&self, effect: u8) -> f64
Self::bonus only when the mastery effect’s affect list includes this hit’s spell.
Sourcepub fn affected_bonus_any(&self, effects: &[u8]) -> f64
pub fn affected_bonus_any(&self, effects: &[u8]) -> f64
Self::bonus for the first listed effect whose affect list includes this hit’s spell.
Sourcepub fn direct_or_periodic_affected_bonus_any(
&self,
direct_effects: &[u8],
periodic_effects: &[u8],
) -> f64
pub fn direct_or_periodic_affected_bonus_any( &self, direct_effects: &[u8], periodic_effects: &[u8], ) -> f64
Select the direct or periodic mastery effect list and apply the first matching bonus.
Sourcepub fn pet_bonus(&self, effect: u8) -> f64
pub fn pet_bonus(&self, effect: u8) -> f64
Self::bonus only when the hit is dealt by a pet, else 1.0.
Sourcepub fn target_health_pct(&self) -> f64
pub fn target_health_pct(&self) -> f64
Exact target-health fraction (1.0 = full) from canonical encounter state.
Sourcepub fn active_guardian_count(&self) -> usize
pub fn active_guardian_count(&self) -> usize
Number of currently active temporary guardians.
Sourcefn is_weapon_imbue_active(&self, key: &str) -> bool
fn is_weapon_imbue_active(&self, key: &str) -> bool
Whether a named temporary weapon imbue is active.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for MasteryCtx<'a>
impl<'a> !RefUnwindSafe for MasteryCtx<'a>
impl<'a> !Send for MasteryCtx<'a>
impl<'a> !Sync for MasteryCtx<'a>
impl<'a> Unpin for MasteryCtx<'a>
impl<'a> UnsafeUnpin for MasteryCtx<'a>
impl<'a> !UnwindSafe for MasteryCtx<'a>
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