record-daemon: end-of-game stats, summoner spells
record-daemon / Build, check and test (push) Failing after 8s
record-daemon / Build, check and test (push) Failing after 8s
This commit is contained in:
1 parent
079d72649f
commit
12fe579aca
7 files changed
+754
-21
No files matched your search
@@ -517,6 +517,136 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Player Metadata Structures (Runes, Summoner Spells, Items)
|
||||
// ============================================================================
|
||||
|
||||
/// Rune slot information
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RuneSlot {
|
||||
/// Rune ID
|
||||
pub rune_id: u32,
|
||||
/// Slot index
|
||||
pub slot: u32,
|
||||
}
|
||||
|
||||
/// Rune page configuration
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct RunePage {
|
||||
/// Primary rune style (keystone tree)
|
||||
pub primary_style_id: u32,
|
||||
/// Secondary rune style
|
||||
pub secondary_style_id: u32,
|
||||
/// Selected runes
|
||||
pub selected_perks: Vec<u32>,
|
||||
/// Stat modifiers (flex, offense, defense)
|
||||
#[serde(default)]
|
||||
pub stat_modifiers: Vec<u32>,
|
||||
/// Rune page name
|
||||
#[serde(default)]
|
||||
pub name: Option<String>,
|
||||
/// Whether this is the current page
|
||||
#[serde(default)]
|
||||
pub current: bool,
|
||||
}
|
||||
|
||||
/// Summoner spell information
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct SummonerSpells {
|
||||
/// First summoner spell ID
|
||||
pub spell1_id: u32,
|
||||
/// Second summoner spell ID
|
||||
pub spell2_id: u32,
|
||||
/// First summoner spell name (resolved)
|
||||
#[serde(default)]
|
||||
pub spell1_name: Option<String>,
|
||||
/// Second summoner spell name (resolved)
|
||||
#[serde(default)]
|
||||
pub spell2_name: Option<String>,
|
||||
}
|
||||
|
||||
/// Item information at game end
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ItemBuild {
|
||||
/// Final items (6 item slots)
|
||||
pub items: Vec<ItemInfo>,
|
||||
/// Trinket item
|
||||
#[serde(default)]
|
||||
pub trinket: Option<ItemInfo>,
|
||||
}
|
||||
|
||||
/// Individual item information
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct ItemInfo {
|
||||
/// Item ID
|
||||
pub item_id: u32,
|
||||
/// Item name (resolved)
|
||||
#[serde(default)]
|
||||
pub name: Option<String>,
|
||||
/// Slot index (0-5 for main items, 6 for trinket)
|
||||
pub slot: u32,
|
||||
}
|
||||
|
||||
/// Complete player metadata captured at game start
|
||||
#[derive(Debug, Clone, Serialize, Deserialize, Default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PlayerGameMetadata {
|
||||
/// Player's PUUID
|
||||
#[serde(default)]
|
||||
pub puuid: Option<String>,
|
||||
/// Player's summoner name
|
||||
#[serde(default)]
|
||||
pub summoner_name: Option<String>,
|
||||
/// Champion ID
|
||||
#[serde(default)]
|
||||
pub champion_id: Option<u32>,
|
||||
/// Champion name
|
||||
#[serde(default)]
|
||||
pub champion_name: Option<String>,
|
||||
/// Skin ID
|
||||
#[serde(default)]
|
||||
pub skin_id: Option<u32>,
|
||||
/// Skin name
|
||||
#[serde(default)]
|
||||
pub skin_name: Option<String>,
|
||||
/// Team (100 = blue, 200 = red)
|
||||
#[serde(default)]
|
||||
pub team: Option<u32>,
|
||||
/// Selected rune page
|
||||
#[serde(default)]
|
||||
pub runes: Option<RunePage>,
|
||||
/// Summoner spells
|
||||
#[serde(default)]
|
||||
pub summoner_spells: Option<SummonerSpells>,
|
||||
/// Final item build (captured at game end)
|
||||
#[serde(default)]
|
||||
pub final_items: Option<ItemBuild>,
|
||||
}
|
||||
|
||||
/// Player information for mapping puuid to summoner name
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PlayerIdentity {
|
||||
/// Player's PUUID
|
||||
pub puuid: String,
|
||||
/// Player's summoner name
|
||||
pub summoner_name: String,
|
||||
/// Player's summoner ID
|
||||
#[serde(default)]
|
||||
pub summoner_id: Option<u64>,
|
||||
/// Player's champion name
|
||||
#[serde(default)]
|
||||
pub champion_name: Option<String>,
|
||||
/// Player's team (100 or 200)
|
||||
#[serde(default)]
|
||||
pub team: Option<u32>,
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// GameFlow Session Data Structures
|
||||
// ============================================================================
|
||||
|
||||
Reference in new issue
Block a user