Struct apiety::stash::Item
[−]
[src]
pub struct Item { pub verified: bool, pub w: u8, pub h: u8, pub ilvl: u8, pub icon: String, pub support: Option<bool>, pub league: String, pub id: String, pub sockets: Vec<Socket>, pub name: String, pub type_line: String, pub identified: bool, pub corrupted: bool, pub locket_to_character: Option<bool>, pub note: Option<String>, pub properties: Option<Vec<Requierty>>, pub additional_properties: Option<Vec<Requierty>>, pub requirements: Option<Vec<Requierty>>, pub sec_descr_text: Option<String>, pub implicit_mods: Option<Vec<String>>, pub explicit_mods: Option<Vec<String>>, pub flavour_text: Option<Vec<String>>, pub descr_text: Option<String>, pub frame_type: u8, pub x: u8, pub y: u8, pub inventory_id: String, pub socketed_items: Vec<Value>, }
Statically typed representation of an item inside a stash returned by the api
Contains meta data and actual data of an item
Fields
verified: bool
w: u8
Width of an item
h: u8
Heigth of an item
ilvl: u8
Item Level,
icon: String
Uri of a picture for this item
support: Option<bool>
league: String
Names the league in which this item is
id: String
Unique id for this item (only unique for this account, will change if the same item is owned by another player)
sockets: Vec<Socket>
name: String
First part of the item name, can be empty
type_line: String
Second part of the item name
identified: bool
Whether an item is identified
corrupted: bool
Whether an item is corrupted
locket_to_character: Option<bool>
note: Option<String>
A note set by the player for this item, usually contains a pricing information
properties: Option<Vec<Requierty>>
additional_properties: Option<Vec<Requierty>>
requirements: Option<Vec<Requierty>>
sec_descr_text: Option<String>
implicit_mods: Option<Vec<String>>
Array of implicit mods (mods which cannot be rerolled by currency)
explicit_mods: Option<Vec<String>>
Array if explicit mods. Prefixes and Suffixes.
flavour_text: Option<Vec<String>>
descr_text: Option<String>
frame_type: u8
Type of this item.
Value | Type |
---|---|
0 | normal |
1 | magic |
2 | rare |
3 | unique |
4 | gem |
5 | currency |
6 | divination card |
7 | quest item |
8 | prophecy |
9 | relic |
Items can be categorzied in roughly 3 categories:
Craftable Items (normal, magic, rare, unique, relic)
This includes everything where explicit mods exists and can be changed: Maps, Boots, Gloves, etc...
Semi-Craftable Items (gem)
Items where only quality related currency can be used: gems
Non-Craftable Items (currency, divination card, quest item, prophecy)
x: u8
Horizontal Position inside the stash tab.
left is smaller and right is larger
y: u8
Vertical Position inside the stash tab.
up is smaller and down is larger
inventory_id: String
# of this item inside the stash in the format of Stash{id}
eg. Stash1
socketed_items: Vec<Value>
Is not converted into a static type and remain as serde_json::Value because it contain different fields then items in a stash, for example don't have a inventory_id or x,y values.
This will most likely don't change in the future, because I don't expect it to be used but its here for sake of completeness and because it makes it easy to check if there are socketed items with .len()