pub struct Item {
pub name: String,
pub base: &'static ItemBase,
pub rarity: Rarity,
pub prefixes: Vec<String>,
pub suffixes: Vec<String>,
pub stats: HashMap<StatKind, f32>,
pub item_level: u32,
pub is_unique: bool,
pub set_id: Option<u32>,
pub enchantment: Option<Enchantment>,
pub sockets: Vec<Gem>,
}Expand description
A fully generated item with a base, optional affixes, and computed stats.
Fields§
§name: String§base: &'static ItemBase§rarity: Rarity§prefixes: Vec<String>§suffixes: Vec<String>§stats: HashMap<StatKind, f32>Final computed stats (base + all modifiers).
item_level: u32§is_unique: bool§set_id: Option<u32>§enchantment: Option<Enchantment>§sockets: Vec<Gem>Implementations§
Source§impl Item
impl Item
pub fn final_damage(&self) -> f32
pub fn final_defense(&self) -> f32
pub fn final_health(&self) -> f32
pub fn final_value(&self) -> u32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Item
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin for Item
impl UnsafeUnpin for Item
impl UnwindSafe for Item
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more