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