From 11b14a2a6a1b0a35c504b4126eb06dfd424e445b Mon Sep 17 00:00:00 2001 From: eunma Date: Thu, 21 Sep 2023 18:26:04 +0900 Subject: [PATCH] Bug fix --- Entities/FallalyticsReporter.cs | 2 +- Views/Stats.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Entities/FallalyticsReporter.cs b/Entities/FallalyticsReporter.cs index 3ebe4774d..4b45622cf 100644 --- a/Entities/FallalyticsReporter.cs +++ b/Entities/FallalyticsReporter.cs @@ -101,7 +101,7 @@ private string RoundInfoToRegisterPbJsonString(RoundInfo round, bool isAnonymous json += "\"onlineServiceId\":\"Anonymous\","; json += "\"onlineServiceName\":\"Anonymous\","; } - json += "\"record\":\"" + (round.Finish.Value - round.Start).Milliseconds + "\","; + json += "\"record\":\"" + (round.Finish.Value - round.Start).TotalMilliseconds + "\","; json += "\"finishDate\":\"" + round.Finish.Value.ToString("o") + "\","; json += "\"show\":\"" + round.ShowNameId + "\","; json += "\"session\":\"" + round.SessionId + "\"}"; diff --git a/Views/Stats.cs b/Views/Stats.cs index 860c73c4c..e0d8130bf 100644 --- a/Views/Stats.cs +++ b/Views/Stats.cs @@ -2664,8 +2664,8 @@ private void LogFile_OnParsedLogLines(List round) { // Task.Run(() => { // if (OnlineServiceFlag != -1 && this.StatLookup.TryGetValue(stat.Name, out LevelStats level)) { // LevelType levelType = (level?.Type).GetValueOrDefault(); - // if (stat.Finish.HasValue && (levelType == LevelType.Race || levelType == LevelType.CreativeRace)) { - // RoundInfo filteredInfo = this.AllStats.Find(r => r.Finish.HasValue && stat.Finish.Value > r.Finish.Value && stat.ShowNameId.Equals(r.ShowNameId) && stat.Name.Equals(r.Name)); + // if (stat.Finish.HasValue && levelType == LevelType.Race) { + // RoundInfo filteredInfo = this.AllStats.Find(r => r.Finish.HasValue && ((stat.Finish.Value - stat.Start).TotalMilliseconds > (r.Finish.Value - r.Start).TotalMilliseconds) && stat.ShowNameId.Equals(r.ShowNameId) && stat.Name.Equals(r.Name)); // if (filteredInfo == null) { FallalyticsReporter.RegisterPb(stat, this.CurrentSettings.FallalyticsAPIKey, this.CurrentSettings.EnableFallalyticsAnonymous); } // } // }