Skip to main content

HandlerParams

Struct HandlerParams 

Source
pub struct HandlerParams<'a> {
Show 18 fields pub game_data: ResolvedGameData, pub rotation: &'a Rotation, pub stats: &'a CombatStats, pub talent_selections: &'a [TalentSelection], pub encounter: &'a ResolvedEncounter, pub fight_duration_secs: f64, pub equipped_items: &'a [EquippedItem], pub set_bonus_auras: &'a [u32], pub bloodlust: bool, pub pre_pot_tempered: bool, pub flask: bool, pub augment_rune: bool, pub race: RaceId, pub weapon_enchant_procs: &'a [WeaponEnchantProc], pub bugs: BugSettings, pub cast_latency: CastLatency, pub raid_events: &'a [RaidEventConfig], pub external_buffs: &'a [ExternalBuffConfig],
}
Expand description

Named parameters for building a spec handler.

Fields§

§game_data: ResolvedGameData§rotation: &'a Rotation§stats: &'a CombatStats§talent_selections: &'a [TalentSelection]§encounter: &'a ResolvedEncounter§fight_duration_secs: f64§equipped_items: &'a [EquippedItem]§set_bonus_auras: &'a [u32]§bloodlust: bool§pre_pot_tempered: bool§flask: bool§augment_rune: bool§race: RaceId§weapon_enchant_procs: &'a [WeaponEnchantProc]§bugs: BugSettings§cast_latency: CastLatency§raid_events: &'a [RaidEventConfig]§external_buffs: &'a [ExternalBuffConfig]

Implementations§

Source§

impl<'a> HandlerParams<'a>

Source

pub fn validate(self) -> Result<Self, EngineError>

Validates handler parameters after struct-literal construction.

§Errors

Returns an error when encounter and game-data armor inputs disagree.

Source

pub fn effect_base_points(&self, effect: (u32, u8)) -> f64

Reads base points for a named manifest effect binding.

Source

pub fn require_effect_base_points( &self, effect: (u32, u8), ) -> Result<f64, EngineError>

Requires base points for a named manifest effect binding.

§Errors

Returns an error when populated game data lacks the requested effect.

Source

pub fn talent_selected(&self, spell_id: u32) -> bool

Whether a talent is selected or granted as a baseline specialization spell.

Source

pub fn talent_ranked_or_specialization(&self, spell_id: u32) -> bool

Whether a ranked selection is active or the spell is granted by the specialization.

Source

pub fn talent_picked(&self, spell_id: u32) -> bool

Whether a talent appears in the decoded talent selections, by node spell or override spell.

Source

pub fn talent_picked_any(&self, spell_ids: &[u32]) -> bool

Whether any one of a set of equivalent talent spell IDs is selected.

Source

pub fn talent_ranks(&self, spell_id: u32) -> u8

Number of selected ranks for a talent, or zero when it is not selected.

Source

pub fn with_bugs(self, bugs: BugSettings) -> Self

Replace the run’s live-game bug toggles.

Source

pub fn with_cast_latency(self, cast_latency: CastLatency) -> Self

Source

pub fn with_timed_events( self, raid_events: &'a [RaidEventConfig], external_buffs: &'a [ExternalBuffConfig], ) -> Self

Trait Implementations§

Source§

impl<'a> Debug for HandlerParams<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for HandlerParams<'a>

§

impl<'a> RefUnwindSafe for HandlerParams<'a>

§

impl<'a> Send for HandlerParams<'a>

§

impl<'a> Sync for HandlerParams<'a>

§

impl<'a> Unpin for HandlerParams<'a>

§

impl<'a> UnsafeUnpin for HandlerParams<'a>

§

impl<'a> UnwindSafe for HandlerParams<'a>

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.

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.

§

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
Source§

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