pub struct Item {
pub typ: ItemType,
pub price: u32,
pub mushroom_price: u32,
pub model_id: u16,
pub class: Option<Class>,
pub type_specific_val: u32,
pub attributes: Attributes,
pub gem_slot: Option<GemSlot>,
pub rune: Option<Rune>,
pub enchantment: Option<Enchantment>,
pub color: u8,
}
Fields§
§typ: ItemType
The type of this item. May contain further type specific values
price: u32
Either the price to buy, or sell
mushroom_price: u32
The price you would have to pay for this item. Note that this value is junk for other players and potentially in other cases, where you should not be able to se a price
model_id: u16
The model id of this item
class: Option<Class>
The class restriction, that this item has. Will only cover the three main classes
type_specific_val: u32
Either the armor, weapon dmg, or other. You should be using armor()
,
or the weapon types damages though, if you want to have a safe
abstraction. This is only public in case I am missing a case here
attributes: Attributes
The stats this item gives, when equiped
gem_slot: Option<GemSlot>
The gemslot of this item, if any. A gemslot can be filled or empty
rune: Option<Rune>
The rune on this item
enchantment: Option<Enchantment>
The enchantment applied to this item^
color: u8
This is the color, or other cosmetic variation of an item
Implementations§
source§impl Item
impl Item
pub fn equipment_ident(&self) -> Option<EquipmentIdent>
sourcepub fn is_unique(&self) -> bool
pub fn is_unique(&self) -> bool
Checks, if this item is unique. Technically they are not always unique, as the scrapbook/keys can be sold, but it should be clear what this is
pub fn is_epic(&self) -> bool
pub fn is_legendary(&self) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Item
impl<'de> Deserialize<'de> for Item
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for Item
impl PartialEq for Item
impl Eq for Item
impl StructuralPartialEq for Item
Auto Trait Implementations§
impl RefUnwindSafe for Item
impl Send for Item
impl Sync for Item
impl Unpin 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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.