Skip to main content

CooldownOps

Trait CooldownOps 

Source
pub trait CooldownOps {
    // Required methods
    fn spend_spell_charge(&mut self, spell: u8) -> bool;
    fn reduce_cooldown(&mut self, spell: u8, amount_ms: u32);
    fn reset_cooldown(&mut self, spell: u8);
    fn start_cooldown(&mut self, spell: u8);
    fn set_spell_gate(&mut self, spell: u8, gate: SpellGate, available: bool);
    fn grant_charges(&mut self, spell: u8, amount: u8);
    fn spell_cooldown_ms(&self, spell: u8) -> u32;
    fn spell_cooldown_remaining_ms(&self, spell: u8) -> u32;
    fn spell_ready(&self, spell: u8) -> bool;
    fn spell_current_charges(&self, spell: u8) -> i32;
}
Expand description

Spell cooldown, charge, and cast-gate operations.

Required Methods§

Source

fn spend_spell_charge(&mut self, spell: u8) -> bool

Source

fn reduce_cooldown(&mut self, spell: u8, amount_ms: u32)

Source

fn reset_cooldown(&mut self, spell: u8)

Source

fn start_cooldown(&mut self, spell: u8)

Source

fn set_spell_gate(&mut self, spell: u8, gate: SpellGate, available: bool)

Source

fn grant_charges(&mut self, spell: u8, amount: u8)

Source

fn spell_cooldown_ms(&self, spell: u8) -> u32

Source

fn spell_cooldown_remaining_ms(&self, spell: u8) -> u32

Source

fn spell_ready(&self, spell: u8) -> bool

Source

fn spell_current_charges(&self, spell: u8) -> i32

Implementors§