1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
use serde::{Deserialize, Serialize};
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct Inventory {
#[serde(rename = "csl")]
pub consumable_slot_lot: i32,
pub bag: Bags,
#[serde(default)]
pub grps: Vec<Group>,
pub items: Items,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct Bags {
#[serde(rename = "b")]
children: Vec<Bag>,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct Bag {
#[serde(rename = "t")]
pub ty: u32,
#[serde(rename = "m")]
pub max: u32,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct Group {
pub attr_id: String,
pub attr_l: String,
pub attr_n: String,
pub attr_t: u32,
pub attr_u: String,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct Items {
#[serde(rename = "nn")]
pub attr_nn: Option<String>,
#[serde(rename = "in")]
pub children: Vec<ItemBag>,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct ItemBag {
#[serde(rename = "t")]
pub ty: u32,
#[serde(default, rename = "i")]
pub children: Vec<Item>,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
pub struct Item {
#[serde(rename = "b")]
pub bound: bool,
#[serde(rename = "c")]
pub count: u32,
#[serde(default, rename = "eq")]
pub equipped: bool,
#[serde(rename = "id")]
pub id: u64,
#[serde(rename = "l")]
pub template: u32,
#[serde(rename = "s")]
pub slot: u32,
#[serde(rename = "sk")]
pub subkey: u64,
#[serde(rename = "x")]
pub x: Option<ItemExtra>,
}
#[derive(Default, Debug, PartialEq, Deserialize, Serialize)]
#[allow(missing_docs)]
pub struct ItemExtra {
#[serde(rename = "b")]
pub attr_b: Option<String>,
#[serde(rename = "ma")]
pub module_assembly: String,
#[serde(rename = "ub")]
pub attr_ub: Option<String>,
#[serde(rename = "ud")]
pub attr_ud: Option<String>,
#[serde(rename = "ui")]
pub attr_ui: Option<String>,
#[serde(rename = "um")]
pub attr_um: Option<String>,
#[serde(rename = "un")]
pub attr_un: Option<String>,
#[serde(rename = "uo")]
pub attr_uo: Option<String>,
#[serde(rename = "up")]
pub attr_up: Option<String>,
}