Skip to main content

CombatProgram

Struct CombatProgram 

Source
pub struct CombatProgram {
Show 65 fields pub(crate) spec_identity_brand: Option<u32>, pub(crate) enemies: Vec<EnemyActorDefinition>, pub(crate) telemetry_targets: Vec<TargetMetadata>, pub(crate) spells: Vec<SpellData>, pub(crate) scheduled_spells: ScheduledSpellCatalog, pub(crate) runtime_events: RuntimeEventCatalog, pub(crate) scheduled_spell_executions: Box<[ScheduledSpellExecution]>, pub(crate) empower_cast_times_ms: Vec<u32>, pub(crate) spell_effects: Vec<SpellEffectData>, pub(crate) auras: Vec<AuraData>, pub(crate) aura_bindings: Box<[Option<LocalAuraIdx>]>, pub(crate) spell_bindings: Box<[Option<LocalSpellIdx>]>, pub(crate) rppm_bindings: Box<[Option<LocalRppmIdx>]>, pub(crate) system_rppm_bindings: Box<[Option<ResolvedSystemRppmBinding>]>, pub(crate) aura_followups: Box<[Option<LocalAuraIdx>]>, pub(crate) aura_exclusions: Box<[[Option<LocalAuraIdx>; 5]]>, pub(crate) aura_expire_trigger_spells: Box<[Option<LocalSpellIdx>]>, pub(crate) external_buff_auras: Box<[Option<LocalAuraIdx>]>, pub(crate) proc_category_recovery_ms: Box<[u32]>, pub(crate) auto_attacks: Vec<AutoAttackData>, pub(crate) pet_action_plans: Box<[u16]>, pub(crate) pet_action_plan_by_auto: Box<[Option<u16>]>, pub(crate) primary_pet_action_auto: Option<u16>, pub(crate) pet_auto_attacks: Box<[u16]>, pub(crate) cast_hooks: Vec<Option<CastHookFn>>, pub(crate) empower_release_hooks: Vec<Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>>, pub(crate) tick_hooks: Vec<Option<CastHookFn>>, pub(crate) player_cast_hooks: Vec<CastHookFn>, pub(crate) resource_threshold_triggers: Vec<ResourceThresholdTrigger>, pub(crate) impact_procs: Vec<ImpactProc>, pub(crate) landed_impact_procs: Vec<LandedImpactProc>, pub(crate) accumulating_impact_procs: Vec<AccumulatingImpactProc>, pub(crate) impact_effect_procs: Vec<ImpactEffectProc>, pub(crate) driver_spell_modifiers: Vec<DriverSpellModifier>, pub(crate) passive_driver_effects: Vec<PassiveDriverEffect>, pub(crate) effects: EffectPlan, pub(crate) damage: DamagePlan, pub(crate) ground_effects: Box<[GroundEffectPlan]>, pub(crate) aura_dependencies: AuraDependencyPlan, pub(crate) rotation: RotationPlan, pub(crate) periodic_drivers: Vec<PeriodicDriver>, pub(crate) periodic_driver_bindings: Box<[Option<usize>]>, pub(crate) talent_ranks: Box<[u8]>, pub(crate) resource_gain_procs: Vec<ResourceGainProc>, pub(crate) item_use_spells: Vec<(GearSlot, u32)>, pub(crate) weapon_enchant_bindings: Box<[ResolvedWeaponEnchantBinding]>, pub(crate) weapon_imbue_bindings: Box<[ResolvedWeaponImbueBinding]>, pub(crate) weapon_imbue_by_spell: Box<[Option<WeaponImbueSlotHandle>]>, pub(crate) precombat_auras: Vec<LocalAuraIdx>, pub(crate) talent_aura_stacks: Vec<(LocalAuraIdx, u8)>, pub(crate) stealth_aura: Option<LocalAuraIdx>, pub(crate) spell_by_id: IntMap<u32, LocalSpellIdx>, pub(crate) aura_by_id: IntMap<u32, LocalAuraIdx>, pub(crate) cooldown_category_members: Box<[Box<[LocalSpellIdx]>]>, pub(crate) charge_category_members: Box<[Box<[LocalSpellIdx]>]>, pub(crate) charge_category_owners: Box<[LocalSpellIdx]>, pub(crate) start_recovery_category_owners: Box<[LocalSpellIdx]>, pub(crate) item_rppm_indices: IntMap<u32, LocalRppmIdx>, pub(crate) system_rppm_indices: IntMap<u32, LocalRppmIdx>, pub(crate) enchant_rppm_indices: IntMap<u32, LocalRppmIdx>, pub(crate) enchant_buff_spell_ids: IntMap<u32, u32>, pub(crate) config: ProgramConfig, pub(crate) names: Vec<Box<str>>, pub(crate) layout_fingerprint: LayoutFingerprint, pub(crate) buffer_bindings: BufferBindings,
}
Expand description

Immutable executable definition produced by combat-system finalization.

Fields§

§spec_identity_brand: Option<u32>§enemies: Vec<EnemyActorDefinition>§telemetry_targets: Vec<TargetMetadata>§spells: Vec<SpellData>§scheduled_spells: ScheduledSpellCatalog§runtime_events: RuntimeEventCatalog§scheduled_spell_executions: Box<[ScheduledSpellExecution]>§empower_cast_times_ms: Vec<u32>§spell_effects: Vec<SpellEffectData>§auras: Vec<AuraData>§aura_bindings: Box<[Option<LocalAuraIdx>]>§spell_bindings: Box<[Option<LocalSpellIdx>]>§rppm_bindings: Box<[Option<LocalRppmIdx>]>§system_rppm_bindings: Box<[Option<ResolvedSystemRppmBinding>]>§aura_followups: Box<[Option<LocalAuraIdx>]>§aura_exclusions: Box<[[Option<LocalAuraIdx>; 5]]>§aura_expire_trigger_spells: Box<[Option<LocalSpellIdx>]>§external_buff_auras: Box<[Option<LocalAuraIdx>]>§proc_category_recovery_ms: Box<[u32]>§auto_attacks: Vec<AutoAttackData>§pet_action_plans: Box<[u16]>§pet_action_plan_by_auto: Box<[Option<u16>]>§primary_pet_action_auto: Option<u16>§pet_auto_attacks: Box<[u16]>§cast_hooks: Vec<Option<CastHookFn>>§empower_release_hooks: Vec<Option<fn(_: &HookCtx<'_>, rank: u8) -> EmpowerReleaseAdjustment>>§tick_hooks: Vec<Option<CastHookFn>>§player_cast_hooks: Vec<CastHookFn>§resource_threshold_triggers: Vec<ResourceThresholdTrigger>§impact_procs: Vec<ImpactProc>§landed_impact_procs: Vec<LandedImpactProc>§accumulating_impact_procs: Vec<AccumulatingImpactProc>§impact_effect_procs: Vec<ImpactEffectProc>§driver_spell_modifiers: Vec<DriverSpellModifier>§passive_driver_effects: Vec<PassiveDriverEffect>§effects: EffectPlan§damage: DamagePlan§ground_effects: Box<[GroundEffectPlan]>§aura_dependencies: AuraDependencyPlan§rotation: RotationPlan§periodic_drivers: Vec<PeriodicDriver>§periodic_driver_bindings: Box<[Option<usize>]>§talent_ranks: Box<[u8]>§resource_gain_procs: Vec<ResourceGainProc>§item_use_spells: Vec<(GearSlot, u32)>§weapon_enchant_bindings: Box<[ResolvedWeaponEnchantBinding]>§weapon_imbue_bindings: Box<[ResolvedWeaponImbueBinding]>§weapon_imbue_by_spell: Box<[Option<WeaponImbueSlotHandle>]>§precombat_auras: Vec<LocalAuraIdx>§talent_aura_stacks: Vec<(LocalAuraIdx, u8)>§stealth_aura: Option<LocalAuraIdx>§spell_by_id: IntMap<u32, LocalSpellIdx>§aura_by_id: IntMap<u32, LocalAuraIdx>§cooldown_category_members: Box<[Box<[LocalSpellIdx]>]>§charge_category_members: Box<[Box<[LocalSpellIdx]>]>§charge_category_owners: Box<[LocalSpellIdx]>§start_recovery_category_owners: Box<[LocalSpellIdx]>§item_rppm_indices: IntMap<u32, LocalRppmIdx>§system_rppm_indices: IntMap<u32, LocalRppmIdx>§enchant_rppm_indices: IntMap<u32, LocalRppmIdx>§enchant_buff_spell_ids: IntMap<u32, u32>§config: ProgramConfig§names: Vec<Box<str>>§layout_fingerprint: LayoutFingerprint§buffer_bindings: BufferBindings

Implementations§

Source§

impl CombatProgram

Source

pub fn base_stats(&self) -> &BaseStats

Source

pub fn game_data(&self) -> &ResolvedGameData

Source

pub fn encounter(&self) -> &ResolvedEncounter

Source

pub fn spec_config<T>(&self) -> Option<&T>
where T: SpecConfig,

Source

pub fn spell(&self, local: LocalSpellIdx) -> &SpellData

Returns the spell definition for a program-owned local identity.

§Panics

Panics when local belongs to a different specialization.

Source

pub fn spells(&self) -> &[SpellData]

Source

pub fn aura(&self, local: LocalAuraIdx) -> &AuraData

Returns the aura definition for a program-owned local identity.

§Panics

Panics when local belongs to a different specialization.

Source

pub fn auras(&self) -> &[AuraData]

Source

pub fn precombat_auras(&self) -> &[LocalAuraIdx]

Source

pub fn talent_aura_stacks(&self) -> &[(LocalAuraIdx, u8)]

Source

pub fn talent_rank(&self, talent: DamageActionId) -> u8

Source

pub fn diagnostic_talent_rank(&self, spell_id: u32) -> Option<u8>

Keyed test oracle for fixtures that do not have generated identities.

Source

pub fn impact_effect_proc_count(&self) -> usize

Source

pub fn impact_proc_count(&self) -> usize

Source

pub fn impact_proc(&self, index: usize) -> Option<&ImpactProc>

Source

pub fn player_cast_hook_count(&self) -> usize

Source

pub fn impact_effect_proc(&self, index: usize) -> Option<&ImpactEffectProc>

Source

pub fn spell_effects(&self) -> &[SpellEffectData]

Source

pub fn enemy_definition(&self, enemy: EnemyIdx) -> Option<&EnemyActorDefinition>

Source

pub fn enemy_definitions( &self, ) -> impl ExactSizeIterator<Item = &EnemyActorDefinition>

Source

pub(crate) fn spell_data( &self, spell_id: u32, ) -> Option<(LocalSpellIdx, &SpellData)>

Source

pub(crate) fn scheduled_spell( &self, local: LocalSpellIdx, ) -> ScheduledSpellBinding

Source

pub(crate) fn validate_scheduled_spell( &self, binding: ScheduledSpellBinding, ) -> Option<LocalSpellIdx>

Source

pub(crate) fn scheduled_spell_execution( &self, binding: ScheduledSpellBinding, ) -> Option<ScheduledSpellExecution>

Source

pub(crate) fn buffer_cooldown<'a>( &self, instance: &'a CombatInstance, local: LocalSpellIdx, ) -> Option<&'a CooldownSlot>

Source

pub(crate) fn buffer_cooldown_mut<'a>( &self, instance: &'a mut CombatInstance, local: LocalSpellIdx, ) -> Option<&'a mut CooldownSlot>

Source

pub(crate) fn cooldown_binding( &self, local: LocalSpellIdx, ) -> Option<CooldownSlotHandle>

Source

pub(crate) fn aura_binding( &self, local: LocalAuraIdx, key: AuraKey, ) -> Option<ConcreteAuraBinding>

Source

pub(crate) fn aura_pool_index( &self, local: LocalAuraIdx, key: AuraKey, ) -> Option<usize>

Source

pub(crate) fn aura_event( &self, local: LocalAuraIdx, key: AuraKey, target: Option<EnemyIdx>, ) -> Option<AuraEventBinding>

Source

pub(crate) fn validate_aura_event( &self, event: AuraEventBinding, ) -> Option<(LocalAuraIdx, AuraKey, Option<EnemyIdx>)>

Source

pub(crate) fn buffer_aura<'a>( &self, instance: &'a CombatInstance, local: LocalAuraIdx, key: AuraKey, ) -> Option<&'a AuraSlot>

Source

pub(crate) fn buffer_resource<'a>( &self, instance: &'a CombatInstance, resource: ResourceType, ) -> Option<&'a ResourceSlot>

Source

pub(crate) fn buffer_resource_mut<'a>( &self, instance: &'a mut CombatInstance, resource: ResourceType, ) -> Option<&'a mut ResourceSlot>

Source

pub(crate) fn resource_binding( &self, resource: ResourceType, ) -> Option<ResourceSlotHandle>

Source

pub(crate) fn buffer_talent_mut<'a>( &self, instance: &'a mut CombatInstance, key: &str, ) -> Option<&'a mut TalentSlot>

Source

pub(crate) fn buffer_swing<'a>( &self, instance: &'a CombatInstance, index: usize, ) -> Option<&'a SwingSlot>

Source

pub(crate) fn buffer_swing_mut<'a>( &self, instance: &'a mut CombatInstance, index: usize, ) -> Option<&'a mut SwingSlot>

Source

pub(crate) fn target_unit_mut<'a>( &self, instance: &'a mut CombatInstance, ) -> &'a mut UnitSlot

Source

pub(crate) fn buffer_weapon_imbue_mut<'a>( &self, instance: &'a mut CombatInstance, key: &str, ) -> Option<&'a mut WeaponImbueSlot>

Source

fn lookup_spell_data( &self, spell_id: u32, ) -> Option<(LocalSpellIdx, &SpellData)>

Source§

impl CombatProgram

Source

pub(crate) fn spell_local(&self, spell_id: u32) -> Option<LocalSpellIdx>

Source

pub(crate) fn aura_local(&self, aura_id: u32) -> Option<LocalAuraIdx>

Source

pub(crate) fn item_rppm_local(&self, item_id: u32) -> Option<LocalRppmIdx>

Source

pub(crate) fn system_rppm_local( &self, driver_spell_id: u32, ) -> Option<LocalRppmIdx>

Source

pub(crate) fn enchant_rppm_local( &self, enchantment_id: u32, ) -> Option<LocalRppmIdx>

Source

pub(crate) fn enchant_buff_spell_id(&self, enchantment_id: u32) -> Option<u32>

Source

fn lookup_spell_local(&self, spell_id: u32) -> Option<LocalSpellIdx>

Source

fn lookup_aura_local(&self, aura_id: u32) -> Option<LocalAuraIdx>

Source

fn lookup_item_rppm_local(&self, item_id: u32) -> Option<LocalRppmIdx>

Source

fn lookup_enchant_rppm_local(&self, enchantment_id: u32) -> Option<LocalRppmIdx>

Source

fn lookup_enchant_buff_spell_id(&self, enchantment_id: u32) -> Option<u32>

Source§

impl CombatProgram

Source

pub fn telemetry_targets(&self) -> &[TargetMetadata]

Immutable target dictionary finalized in encounter identity order.

Source

pub fn telemetry_scope( &self, source: ActorId, target: EnemyIdx, ) -> Option<TelemetryScope>

Exact source/target ownership scope for telemetry emitted against target.

Source

pub fn aura_telemetry_scope( &self, instance: &CombatInstance, key: AuraKey, ) -> AuraTelemetryScope

Pull/group ownership for an exact aura instance.

Source§

impl CombatProgram

Source

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

Source

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

Source§

impl CombatProgram

Source

pub(crate) fn capture_aura_transfer( &self, instance: &CombatInstance, binding: ConcreteAuraBinding, ) -> Option<AuraTransferState>

Source

pub(crate) fn mutate_aura( &self, instance: &mut CombatInstance, binding: ConcreteAuraBinding, mutation: AuraMutation, now: SimTime, ) -> bool

Atomically mutates one concrete aura and dispatches all finalized consumers.

Source

pub(crate) fn reset_aura_slots( &self, instance: &mut CombatInstance, token: AuraResetToken, )

Source

fn mark_changed_aura_projections( &self, instance: &mut CombatInstance, binding: ConcreteAuraBinding, )

Source

fn dispatch_aura_consumers( &self, instance: &mut CombatInstance, binding: ConcreteAuraBinding, now: SimTime, )

Trait Implementations§

Source§

impl Debug for CombatProgram

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