From fbfdbaed690cfdab98756834f9ccc9ecfa9eb70e Mon Sep 17 00:00:00 2001 From: Micdu70 Date: Tue, 24 Sep 2024 10:35:57 +0200 Subject: [PATCH] Bug fix (for new LTM) --- Entities/LogFileWatcher.cs | 10 +++++----- Entities/Multilingual.cs | 6 ++++++ Views/Stats.cs | 25 +++++++++++++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) diff --git a/Entities/LogFileWatcher.cs b/Entities/LogFileWatcher.cs index 4a47ccf8..4270f012 100644 --- a/Entities/LogFileWatcher.cs +++ b/Entities/LogFileWatcher.cs @@ -338,7 +338,9 @@ private void AddLineAfterClientShutdown() { }; private bool IsShowIsCasualShow(string showId) { - return string.Equals(showId, "casual_show") || string.Equals(showId, "no_elimination_explore"); + return string.Equals(showId, "casual_show") + || string.Equals(showId, "no_elimination_explore") + || string.Equals(showId, "xtreme_explore"); } private bool IsRealFinalRound(string roundId, string showId) { @@ -651,10 +653,8 @@ private void UpdateServerConnectionLog(string session, string show) { private void UpdatePersonalBestLog(RoundInfo info) { if (info.PrivateLobby || (!info.IsCasualShow && info.UseShareCode) || !info.Finish.HasValue) { return; } - if (info.IsCasualShow && !string.Equals(info.ShowNameId, "no_elimination_explore")) { - if (string.IsNullOrEmpty(info.Name) || !string.Equals(info.ShowNameId, "user_creative_race_round")) { - return; - } + if (info.IsCasualShow && string.Equals(info.ShowNameId, "user_creative_race_round")) { + if (string.IsNullOrEmpty(info.Name)) { return; } if (!this.StatsForm.ExistsPersonalBestLog(info.Finish.Value)) { string levelName = string.IsNullOrEmpty(info.CreativeTitle) ? this.StatsForm.GetUserCreativeLevelTitle(info.Name) : info.CreativeTitle; diff --git a/Entities/Multilingual.cs b/Entities/Multilingual.cs index 59ffd79a..9461ca45 100644 --- a/Entities/Multilingual.cs +++ b/Entities/Multilingual.cs @@ -13536,6 +13536,7 @@ public static class Multilingual { { "wle_srs_single_winner_template_filler", "placeholder" }, { "wle_srs_single_winner_template_final", "placeholder" }, { "wle_srs_single_winner_template_opener", "placeholder" }, + { "xtreme_explore", "Explore - Xtreme" }, { "xtreme_party", "X-treme Party" }, { "show_wle_s10_wk01_mrs", "Creator Round Playlist 1" }, @@ -14443,6 +14444,7 @@ public static class Multilingual { { "wle_srs_single_winner_template_filler", "placeholder" }, { "wle_srs_single_winner_template_final", "placeholder" }, { "wle_srs_single_winner_template_opener", "placeholder" }, + { "xtreme_explore", "Exploration - Xtrême" }, { "xtreme_party", "Fête Xtrême" }, { "show_wle_s10_wk01_mrs", "Playlist de Manche de créateur 1" }, @@ -15350,6 +15352,7 @@ public static class Multilingual { { "wle_srs_single_winner_template_filler", "placeholder" }, { "wle_srs_single_winner_template_final", "placeholder" }, { "wle_srs_single_winner_template_opener", "placeholder" }, + { "xtreme_explore", "탐험 - X-익스트림" }, { "xtreme_party", "X-익스트림 파티" }, { "show_wle_s10_wk01_mrs", "크리에이터 라운드 플레이리스트 1" }, @@ -16257,6 +16260,7 @@ public static class Multilingual { { "wle_srs_single_winner_template_filler", "placeholder" }, { "wle_srs_single_winner_template_final", "placeholder" }, { "wle_srs_single_winner_template_opener", "placeholder" }, + { "xtreme_explore", "自由探索 - エクストリーム" }, { "xtreme_party", "エクストリームパーティー" }, { "show_wle_s10_wk01_mrs", "クリエイターラウンドのプレイリスト1" }, @@ -17164,6 +17168,7 @@ public static class Multilingual { { "wle_srs_single_winner_template_filler", "placeholder" }, { "wle_srs_single_winner_template_final", "placeholder" }, { "wle_srs_single_winner_template_opener", "placeholder" }, + { "xtreme_explore", "探索 - 极限糖豆人" }, { "xtreme_party", "极限糖豆人派对" }, { "show_wle_s10_wk01_mrs", "创作者回合节目列表 1" }, @@ -18071,6 +18076,7 @@ public static class Multilingual { { "wle_srs_single_winner_template_filler", "placeholder" }, { "wle_srs_single_winner_template_final", "placeholder" }, { "wle_srs_single_winner_template_opener", "placeholder" }, + { "xtreme_explore", "探索 - 極限糖豆人" }, { "xtreme_party", "極限糖豆人派對" }, { "show_wle_s10_wk01_mrs", "創作者回合節目列表 1" }, diff --git a/Views/Stats.cs b/Views/Stats.cs index 8d99dc47..4224d083 100644 --- a/Views/Stats.cs +++ b/Views/Stats.cs @@ -3319,6 +3319,29 @@ where string.Equals(ri.ShowNameId, "event_april_fools") && ri.IsFinal == false this.CurrentSettings.Version = 103; this.SaveUserSettings(); } + + if (this.CurrentSettings.Version == 103) { + List roundInfoList = (from ri in this.RoundDetails.FindAll() + where !string.IsNullOrEmpty(ri.ShowNameId) && string.Equals(ri.ShowNameId, "xtreme_explore") + select ri).ToList(); + + Profiles profile = this.Profiles.FindOne(Query.EQ("LinkedShowId", "event_xtreme_fall_guys_template")); + int profileId = profile?.ProfileId ?? -1; + foreach (RoundInfo ri in roundInfoList) { + if (profileId != -1) ri.Profile = profileId; + ri.IsCasualShow = true; + ri.Round = 1; + ri.Qualified = ri.Finish.HasValue; + ri.IsFinal = false; + ri.Crown = false; + ri.IsAbandon = false; + } + this.StatsDB.BeginTrans(); + this.RoundDetails.Update(roundInfoList); + this.StatsDB.Commit(); + this.CurrentSettings.Version = 104; + this.SaveUserSettings(); + } } private UserSettings GetDefaultSettings() { @@ -4757,6 +4780,8 @@ public string GetAlternateShowId(string showId) { case "invisibeans_pistachio_template": case "invisibeans_template": return "invisibeans_mode"; + case "xtreme_explore": + return "event_xtreme_fall_guys_template"; default: return showId; }