record-daemon: end-of-game stats, summoner spells
Some checks failed
record-daemon / Build, check and test (push) Failing after 8s

This commit is contained in:
2026-03-25 10:53:42 +01:00
parent 079d72649f
commit 12fe579aca
7 changed files with 754 additions and 21 deletions

View File

@@ -5,14 +5,15 @@ mod store;
pub use mapper::EventMapper;
pub use store::{
GameFinalStats, MetadataUpdate, RecordingMetadata, TimelineStore, TimestampedEvent,
GameFinalStats, MetadataUpdate, PlayerIdentityInfo, RecordingMetadata, TimelineStore,
TimestampedEvent,
};
use chrono::{DateTime, Duration, Utc};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
use crate::lqp::GameEvent;
use crate::lqp::{GameEvent, ItemBuild, RunePage, SummonerSpells};
/// A timeline of events for a recording.
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -48,6 +49,9 @@ pub struct Timeline {
/// Summoner name.
#[serde(default)]
pub summoner_name: Option<String>,
/// Player's PUUID.
#[serde(default)]
pub puuid: Option<String>,
/// Team (100 = blue, 200 = red).
#[serde(default)]
pub team: Option<u32>,
@@ -57,6 +61,18 @@ pub struct Timeline {
/// Final player stats.
#[serde(default)]
pub final_stats: Option<GameFinalStats>,
/// Rune page at game start.
#[serde(default)]
pub runes: Option<RunePage>,
/// Summoner spells.
#[serde(default)]
pub summoner_spells: Option<SummonerSpells>,
/// Final item build at game end.
#[serde(default)]
pub final_items: Option<ItemBuild>,
/// All players in the game (puuid to summoner name mapping).
#[serde(default)]
pub all_players: Vec<PlayerIdentityInfo>,
}
impl Timeline {
@@ -82,9 +98,14 @@ impl Timeline {
game_mode: None,
map_name: None,
summoner_name: None,
puuid: None,
team: None,
victory: None,
final_stats: None,
runes: None,
summoner_spells: None,
final_items: None,
all_players: Vec::new(),
}
}