pub enum ItemType {
Show 25 variants
Hat,
BreastPlate,
Gloves,
FootWear,
Weapon {
min_dmg: u32,
max_dmg: u32,
},
Amulet,
Belt,
Ring,
Talisman,
Shield {
block_chance: u32,
},
Shard {
piece: u32,
},
Potion(Potion),
Scrapbook,
DungeonKey {
id: u32,
shadow_key: bool,
},
Gem(Gem),
PetItem {
typ: PetItem,
},
QuickSandGlass,
HeartOfDarkness,
WheelOfFortune,
Mannequin,
Resource {
amount: u32,
typ: ResourceType,
},
ToiletKey,
Gral,
EpicItemBag,
Unknown(u8),
}
Expand description
Identifies a specific item and contains all values related to the specific
type. The only thing missing is armor, which can be found as a method on
Item
Variants§
Hat
BreastPlate
Gloves
FootWear
Weapon
Amulet
Belt
Ring
Talisman
Shield
Shard
Potion(Potion)
Scrapbook
DungeonKey
Gem(Gem)
PetItem
QuickSandGlass
HeartOfDarkness
WheelOfFortune
Mannequin
Resource
ToiletKey
Gral
EpicItemBag
Unknown(u8)
If there is a new item added to the game, this will be the placeholder to make sure you never think a place is empty somewhere, if it is not
Implementations§
Source§impl ItemType
impl ItemType
Sourcepub fn is_class_item(&self) -> bool
pub fn is_class_item(&self) -> bool
Checks if this type can only be worn by only a particular class
Sourcepub fn is_unique(&self) -> bool
pub fn is_unique(&self) -> bool
Checks, if this item type is unique. Technically they are not always unique, as the scrapbook/keys can be sold, but it should be clear what this is
Sourcepub fn equipment_slot(&self) -> Option<EquipmentSlot>
pub fn equipment_slot(&self) -> Option<EquipmentSlot>
The equipment slot, that this item type can be equipped to
Sourcepub fn is_enchantable(&self) -> bool
pub fn is_enchantable(&self) -> bool
Checks, if this item type can be enchanted
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemType
impl<'de> Deserialize<'de> for ItemType
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ItemType
impl Eq for ItemType
impl StructuralPartialEq for ItemType
Auto Trait Implementations§
impl Freeze for ItemType
impl RefUnwindSafe for ItemType
impl Send for ItemType
impl Sync for ItemType
impl Unpin for ItemType
impl UnwindSafe for ItemType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.