Skip to main content

BuiltCombatSystem

Struct BuiltCombatSystem 

Source
pub struct BuiltCombatSystem {
    pub state: CombatState,
    pub rotation: RotationEngine,
    pub buffer: DenseBuffer,
    pub names: Vec<Box<str>>,
}
Expand description

Output of a successful crate::CombatSystemBuilder::build call.

Fields§

§state: CombatState§rotation: RotationEngine§buffer: DenseBuffer§names: Vec<Box<str>>

Implementations§

Source§

impl BuiltCombatSystem

Source

pub fn builder(stats: CombatStats) -> CombatSystemBuilder

Start a combat-system definition for the supplied base stats.

Source

pub fn set_pet_action_bar( &mut self, npc_id: u32, action_bar: PetActionBar, ) -> bool

Attach an action bar to the persistent pet identified by its creature id.

Source

pub fn disable_spell(&mut self, spell_id: u32)

Source

pub fn patch_spell( &mut self, spell: LocalSpellIdx, patch: impl FnOnce(&mut SpellData), ) -> bool

Apply a build-time spell patch and atomically refresh its buffer projections.

Source

pub fn patch_aura( &mut self, aura: LocalAuraIdx, patch: impl FnOnce(&mut AuraData), ) -> bool

Apply a build-time aura patch to the authoritative definition.

Source

pub fn register_aura( &mut self, name: impl Into<Box<str>>, aura: AuraData, ) -> Result<LocalAuraIdx, EngineError>

Register an aura added after the declarative combat system has been built.

This synchronizes the name table, definition, spell-id index, and identity index. Player auras also receive their persistent buffer slot immediately.

§Errors

Returns an error when the runtime aura registry exceeds its local-index capacity.

Source

pub fn register_impact_proc(&mut self, proc: ImpactProc)

Registers a post-build impact proc.

Source

pub fn register_landed_impact_proc(&mut self, proc: LandedImpactProc)

Registers a post-build landed-impact proc.

Source

pub fn register_accumulating_impact_proc( &mut self, proc: AccumulatingImpactProc, )

Registers a post-build accumulating impact proc.

Source

pub fn register_resource_gain_proc(&mut self, proc: ResourceGainProc)

Registers a post-build resource-gain proc.

Source

pub fn register_rppm_tracker( &mut self, tracker: RppmTracker, ) -> Result<LocalRppmIdx, EngineError>

Registers a post-build RPPM tracker.

§Errors

Returns an error when the local tracker-index capacity is exhausted.

Source

pub fn register_weapon_enchant_binding( &mut self, binding: WeaponEnchantBinding, tracker: RppmTracker, ) -> Result<bool, EngineError>

Register one equipped weapon-enchant source and its shared RPPM tracker.

Duplicate enchantment IDs return false; the first binding installs the impact dispatcher.

§Errors

Returns an error when the local tracker-index capacity is exhausted.

Source

pub fn register_threshold_tracker( &mut self, tracker: ThresholdTracker, ) -> Result<LocalThresholdIdx, EngineError>

Registers a post-build accumulated-threshold tracker.

§Errors

Returns an error when the local tracker-index capacity is exhausted.

Source

pub fn push_precombat_aura(&mut self, aura: LocalAuraIdx)

Appends an aura to the precombat application set.

Source

pub fn set_precombat_aura(&mut self, aura: LocalAuraIdx, enabled: bool)

Include or exclude an aura from the precombat application set.

Source

pub fn remove_precombat_aura(&mut self, aura: LocalAuraIdx)

Removes an aura from every precombat talent projection.

Source

pub fn register_player_cast_hook(&mut self, hook: CastHookFn)

Registers a hook fired after every player cast.

Source

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

Returns a registered aura definition.

Source

pub fn rppm_tracker(&self, tracker: LocalRppmIdx) -> Option<&RppmTracker>

Returns a registered RPPM tracker.

Source

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

Returns a registered impact proc.

Source

pub fn impact_proc_count(&self) -> usize

Returns the number of registered impact procs.

Source

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

Returns a registered lowered impact-effect proc.

Source

pub fn impact_effect_proc_count(&self) -> usize

Returns the number of registered lowered impact-effect procs.

Source

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

Returns the lowered spell-effect program arena for read-only inspection.

Source

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

Returns the selected rank of a talent spell.

Source

pub fn rppm_tracker_count(&self) -> usize

Returns the number of registered RPPM trackers.

Source

pub fn player_cast_hook_count(&self) -> usize

Returns the number of registered player-cast hooks.

Source

pub fn spell_count(&self) -> usize

Returns the number of registered spells.

Source

pub fn first_auto_attack(&self) -> Option<&AutoAttackData>

Returns the first auto-attack definition.

Source

pub fn patch_auto_attacks(&mut self, patch: impl FnOnce(&mut [AutoAttackData]))

Applies a build-time patch to the registered auto-attack definitions.

Source

pub fn register_system_rppm_from_data( &mut self, driver_spell_id: u32, ) -> Result<LocalRppmIdx, EngineError>

Register a system-level RPPM source from its DBC driver spell.

The definition and driver lookup are committed together. Re-registering the same driver is idempotent and returns its existing local index.

§Errors

Returns a typed spec-construction error when the driver has no finite positive RPPM rate. It also errors when the local tracker-index capacity is exhausted.

Source

pub fn patch_base_stats(&mut self, patch: impl FnOnce(&mut BaseStats))

Apply a build-time base-stat patch and refresh the primary resource projection.

Source

pub fn base_combat_stats(&self) -> &CombatStats

Return the resolved baseline combat stats used by post-build content registration.

Source

pub fn set_aura_effect(&mut self, aura: LocalAuraIdx, effect: BuffEffect)

Appends a runtime effect to an already-built aura.

§Panics

Panics in debug builds if aura is not registered, or in all builds if its fixed-capacity effect list is full.

Source

pub fn mask_aura_dbc_effect( &mut self, aura: LocalAuraIdx, source_spell_id: u32, effect_index: u8, ) -> usize

Removes the rows an aura derived from one DBC spell effect, returning how many were cleared.

The shared resolution consumes every modifier effect a live aura’s spell declares. Some are scripted in game to apply only under a talent, or to be replaced by a different effect when one is picked, which is what SimC spells out per spec with register_passive_effect_mask. Content masks the effect here and then wires whatever its talent state calls for; leaving both in place makes every hit take the modifier twice.

Source

pub fn duplicate_aura_dbc_effect( &mut self, aura: LocalAuraIdx, source_spell_id: u32, effect_index: u8, ) -> usize

Duplicates rows lowered from one DBC effect while preserving their resolved payload.

Intended for modeled live-game bugs where the server applies the same modifier twice. Content identifies only the source coordinate.

Source

pub fn register_driver_spell_modifier(&mut self, modifier: DriverSpellModifier)

Register an always-present spell modifier under its real spell/passive driver.

Source

pub fn register_passive_driver_effect(&mut self, effect: PassiveDriverEffect)

Register an always-present player effect under its real spell/passive driver.

Source

pub fn register_weapon_imbue( &mut self, spell_id: u32, key: &'static str, initially_active: bool, )

Register a real weapon-imbue action and initialize its persistent equipment state.

Source

pub fn register_periodic_driver(&mut self, driver: PeriodicDriver)

Register encounter-lifetime periodic work under its real spell/passive driver.

Source

pub(crate) fn size_scratch_buffers(&mut self)

Trait Implementations§

Source§

impl Debug for BuiltCombatSystem

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