rustgie_types/destiny/definitions/sources/
mod.rs

1use std::collections::HashMap;
2use serde::{Deserialize, Serialize};
3
4/// Properties of a DestinyInventoryItemDefinition that store all of the information we were able to discern about how the item spawns, and where you can find the item.
5/// Items will have many of these sources, one per level at which it spawns, to try and give more granular data about where items spawn for specific level ranges.
6#[derive(Deserialize, Serialize)]
7pub struct DestinyItemSourceDefinition {
8    /// The level at which the item spawns. Essentially the Primary Key for this source data: there will be multiple of these source entries per item that has source data, grouped by the level at which the item spawns.
9    #[serde(rename = "level")]
10    pub level: i32,
11
12    /// The minimum Quality at which the item spawns for this level. Examine DestinyInventoryItemDefinition for more information about what Quality means. Just don't ask Phaedrus about it, he'll never stop talking and you'll have to write a book about it.
13    #[serde(rename = "minQuality")]
14    pub min_quality: i32,
15
16    /// The maximum quality at which the item spawns for this level.
17    #[serde(rename = "maxQuality")]
18    pub max_quality: i32,
19
20    /// The minimum Character Level required for equipping the item when the item spawns at the item level defined on this DestinyItemSourceDefinition, as far as we saw in our processing.
21    #[serde(rename = "minLevelRequired")]
22    pub min_level_required: i32,
23
24    /// The maximum Character Level required for equipping the item when the item spawns at the item level defined on this DestinyItemSourceDefinition, as far as we saw in our processing.
25    #[serde(rename = "maxLevelRequired")]
26    pub max_level_required: i32,
27
28    /// The stats computed for this level/quality range.
29    #[serde(rename = "computedStats")]
30    pub computed_stats: Option<HashMap<u32, crate::destiny::definitions::DestinyInventoryItemStatDefinition>>,
31
32    /// The DestinyRewardSourceDefinitions found that can spawn the item at this level.
33    #[serde(rename = "sourceHashes")]
34    pub source_hashes: Option<Vec<u32>>,
35}