Skip to main content

ResourceOps

Trait ResourceOps 

Source
pub trait ResourceOps {
Show 14 methods // Required methods fn gain_resource(&mut self, amount: f64) -> f64; fn gain_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64; fn gain_unmodified_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64; fn gain_secondary_resource(&mut self, amount: f64) -> f64; fn gain_secondary_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64; fn gain_pet_resource(&mut self, npc_id: u32, amount: f64) -> f64; fn spend_secondary_resource(&mut self, amount: f64) -> bool; fn spend_all_secondary_resource(&mut self, cost: f64) -> f64; fn secondary_resource(&self) -> f64; fn primary_resource(&self) -> f64; fn spell_resource_cost(&self, spell: u8) -> f64; fn last_primary_spent(&self) -> f64; fn last_optional_primary_spent(&self) -> f64; fn last_secondary_spent(&self) -> f64;
}
Expand description

Player and persistent-pet resource operations.

Required Methods§

Source

fn gain_resource(&mut self, amount: f64) -> f64

Source

fn gain_resource_from(&mut self, amount: f64, source: ResourceGainSource) -> f64

Source

fn gain_unmodified_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64

Source

fn gain_secondary_resource(&mut self, amount: f64) -> f64

Source

fn gain_secondary_resource_from( &mut self, amount: f64, source: ResourceGainSource, ) -> f64

Source

fn gain_pet_resource(&mut self, npc_id: u32, amount: f64) -> f64

Source

fn spend_secondary_resource(&mut self, amount: f64) -> bool

Source

fn spend_all_secondary_resource(&mut self, cost: f64) -> f64

Source

fn secondary_resource(&self) -> f64

Source

fn primary_resource(&self) -> f64

Source

fn spell_resource_cost(&self, spell: u8) -> f64

Source

fn last_primary_spent(&self) -> f64

Source

fn last_optional_primary_spent(&self) -> f64

Source

fn last_secondary_spent(&self) -> f64

Implementors§