From aa53a84a4618816c4b258a3ef0cab550fdec696a Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Fri, 27 Mar 2026 21:35:06 +0100 Subject: [PATCH] tauri-app: fix win/lose status detection --- tauri-app/src/types/timeline.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tauri-app/src/types/timeline.ts b/tauri-app/src/types/timeline.ts index b93758d..8310e9a 100644 --- a/tauri-app/src/types/timeline.ts +++ b/tauri-app/src/types/timeline.ts @@ -216,8 +216,9 @@ export interface PlayerStats { TOTAL_DAMAGE_TAKEN?: number; /** Vision score. */ VISION_SCORE?: number; - /** Win status (1 = win). */ + /** Win/Lose status (0/1 = False/True). */ WIN?: number; + LOSE?: number; } /** @@ -234,7 +235,7 @@ export function getGameResult(game: GameHistoryItem): GameResult { // Try to extract victory from raw_end_game_stats const stats = game.raw_end_game_stats as RawEndGameStats | null; if (stats?.localPlayer?.stats?.WIN === 1) return 'Victory'; - if (stats?.localPlayer?.stats?.WIN === 0) return 'Defeat'; + if (stats?.localPlayer?.stats?.LOSE === 1) return 'Defeat'; return 'Terminated'; }