record-daemon: don't propagate puuid, record it and compute at end
record-daemon / Build, check and test (push) Successful in 2m10s
record-daemon / Build, check and test (push) Successful in 2m10s
This commit is contained in:
3 files changed
+20
-74
No files matched your search
@@ -233,27 +233,6 @@ impl DaemonStateMachine {
|
||||
|
||||
match event {
|
||||
GameEvent::GameStart(info) => {
|
||||
// Extract summoner spells from session data if available
|
||||
let summoner_spells = info.session.as_ref().and_then(|session| {
|
||||
session
|
||||
.player_champion_selections
|
||||
.first()
|
||||
.map(|selection| SummonerSpells {
|
||||
spell1_id: selection.spell1_id,
|
||||
spell2_id: selection.spell2_id,
|
||||
spell1_name: crate::lqp::spell_id_to_name(selection.spell1_id),
|
||||
spell2_name: crate::lqp::spell_id_to_name(selection.spell2_id),
|
||||
})
|
||||
});
|
||||
|
||||
// Extract puuid from session data if available
|
||||
let puuid = info.session.as_ref().and_then(|session| {
|
||||
session
|
||||
.player_champion_selections
|
||||
.first()
|
||||
.map(|selection| selection.puuid.clone())
|
||||
});
|
||||
|
||||
Some(StateTransition::GameStarted {
|
||||
game_id: info.game_id,
|
||||
champion: info.champion.clone(),
|
||||
@@ -263,9 +242,9 @@ impl DaemonStateMachine {
|
||||
map_name: info.map_name.clone(),
|
||||
team: info.team,
|
||||
summoner_name: info.summoner_name.clone(),
|
||||
puuid,
|
||||
puuid: None, // Will be populated from client.fetch_player_game_metadata()
|
||||
runes: None, // Will be populated from client.fetch_player_game_metadata()
|
||||
summoner_spells,
|
||||
summoner_spells: None, // Will be populated from client.fetch_player_game_metadata()
|
||||
})
|
||||
}
|
||||
GameEvent::GameEnd(info) => Some(StateTransition::GameEnded {
|
||||
|
||||
Reference in new issue
Block a user