1use crate::items::ItemRarityId;
2use crate::prelude::*;
3use crate::{currency::CurrencyUnit, items::ItemType};
4
5#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
6pub struct ItemCaseRarityWeight {
7 #[schemars(schema_with = "item_rarity_link_id_schema")]
8 pub rarity_id: ItemRarityId,
9
10 #[schemars(title = "Вес редкости")]
11 pub weight: f64,
12}
13
14#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
15pub struct AutoChestSettings {
16 #[schemars(title = "Максимальный размер батча в авточесте")]
17 pub max_batch_size: i64,
18}
19
20#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, Tsify)]
21pub struct ItemCasesSettingsByLevel {
22 #[schemars(title = "Уровень сундука")]
23 pub level: i64,
24
25 #[schemars(title = "Требуемый уровень главы для апгрейда")]
26 pub required_chapter_level: i64,
27
28 #[schemars(title = "Стоимость уровня")]
29 pub upgrade_cost: Vec<CurrencyUnit>,
30
31 #[schemars(title = "Длительность прокачки сундука до следующего уровня (сек.)")]
32 pub upgrade_time_secs: u64,
33
34 #[schemars(title = "Веса редкостей")]
35 pub rarity_weights: Vec<ItemCaseRarityWeight>,
36
37 #[schemars(title = "Настройки авточеста")]
38 pub auto_chest_settings: AutoChestSettings,
39}
40
41#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, Tsify)]
42pub struct InventoryLevel {
43 #[schemars(title = "Минимальный уровень главы")]
44 pub from_chapter_level: i64,
45 #[schemars(title = "Доступные с уровня слоты")]
46 pub item_types: Vec<ItemType>,
47}