Skip to main content

PlayerStateResolver

Trait PlayerStateResolver 

Source
pub trait PlayerStateResolver {
    // Provided methods
    fn get_player_stat(&self, _stat: &str) -> Option<f64> { ... }
    fn knows_spell(&self, _spell_id: u32) -> bool { ... }
    fn has_aura(&self, _aura_id: u32) -> bool { ... }
    fn is_specialization(&self, _spec_index: u8) -> bool { ... }
    fn is_male(&self) -> bool { ... }
}
Expand description

Resolves player state: stats, gender, specialization, known spells, active auras.

Provided Methods§

Source

fn get_player_stat(&self, _stat: &str) -> Option<f64>

Get a player stat value by name (SP/AP/RAP/MHP/SPS/PL/INT).

Source

fn knows_spell(&self, _spell_id: u32) -> bool

Check if the player knows a spell. Used for $?s12345 conditionals.

Source

fn has_aura(&self, _aura_id: u32) -> bool

Check if an aura is active on the player. Used for $?a12345 conditionals.

Source

fn is_specialization(&self, _spec_index: u8) -> bool

Check the player’s 1-based specialization index. Used for $?cX conditionals.

Source

fn is_male(&self) -> bool

Player gender; true for male, false for female.

Implementors§