diff --git a/CURRENTRELEASE.md b/CURRENTRELEASE.md index ce230da..229f371 100644 --- a/CURRENTRELEASE.md +++ b/CURRENTRELEASE.md @@ -1,6 +1,8 @@ # OpenSpartan Workshop 1.0.6 (`CRUCIBLE-06072024`) - Fixes an issue with matches not being populated in full search mode. +- Fixes an issue where extra events are not loaded on first (cold) boot. +- Fixes an issue where matches based on a medal are not loaded due to a malformed SQLite query. >[!NOTE] >This is a point release with a hotfix. Original changelog with new functionality captured in [1.0.4](https://github.com/OpenSpartan/openspartan-workshop/releases/tag/1.0.4). diff --git a/src/OpenSpartan.Workshop/App.xaml.cs b/src/OpenSpartan.Workshop/App.xaml.cs index dc0f4ce..aa163b2 100644 --- a/src/OpenSpartan.Workshop/App.xaml.cs +++ b/src/OpenSpartan.Workshop/App.xaml.cs @@ -60,6 +60,9 @@ private async static void LoadSettings() SettingsViewModel.Instance.Settings.Build = settings.Build; SettingsViewModel.Instance.Settings.Sandbox = settings.Sandbox; SettingsViewModel.Instance.Settings.UseObanClearance = settings.UseObanClearance; + SettingsViewModel.Instance.Settings.ExtraRitualEvents = settings.ExtraRitualEvents; + + SettingsManager.StoreSettings(SettingsViewModel.Instance.Settings); } } catch (Exception ex) diff --git a/src/OpenSpartan.Workshop/Queries/Select/PlayerMatchesBasedOnMedal.sql b/src/OpenSpartan.Workshop/Queries/Select/PlayerMatchesBasedOnMedal.sql index 7dea720..6a99f50 100644 --- a/src/OpenSpartan.Workshop/Queries/Select/PlayerMatchesBasedOnMedal.sql +++ b/src/OpenSpartan.Workshop/Queries/Select/PlayerMatchesBasedOnMedal.sql @@ -3,6 +3,7 @@ WITH RAW_MATCHES AS ( MS.MatchId, MS.Teams, json_extract(MS.MatchInfo, '$.StartTime') AS StartTime, + json_extract(MS.MatchInfo, '$.EndTime') AS EndTime, json_extract(MS.MatchInfo, '$.Duration') AS Duration, json_extract(MS.MatchInfo, '$.GameVariantCategory') AS GameVariantCategory, json_extract(MS.MatchInfo, '$.MapVariant.AssetId') AS Map, @@ -37,6 +38,18 @@ MATCH_DETAILS AS ( json_extract(PE.value, '$.Result.TeamMmr') AS TeamMmr, json_extract(PE.value, '$.Result.Counterfactuals.SelfCounterfactuals.Deaths') AS ExpectedDeaths, json_extract(PE.value, '$.Result.Counterfactuals.SelfCounterfactuals.Kills') AS ExpectedKills, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Bronze.Deaths') AS ExpectedBronzeDeaths, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Bronze.Kills') AS ExpectedBronzeKills, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Silver.Deaths') AS ExpectedSilverDeaths, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Silver.Kills') AS ExpectedSilverKills, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Gold.Deaths') AS ExpectedGoldDeaths, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Gold.Kills') AS ExpectedGoldKills, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Platinum.Deaths') AS ExpectedPlatinumDeaths, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Platinum.Kills') AS ExpectedPlatinumKills, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Diamond.Deaths') AS ExpectedDiamondDeaths, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Diamond.Kills') AS ExpectedDiamondKills, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Onyx.Deaths') AS ExpectedOnyxDeaths, + json_extract(PE.value, '$.Result.Counterfactuals.TierCounterfactuals.Onyx.Kills') AS ExpectedOnyxKills, json_extract(PE.value, '$.Result.RankRecap.PostMatchCsr.Value') AS PostMatchCsr, json_extract(PE.value, '$.Result.RankRecap.PreMatchCsr.Value') AS PreMatchCsr, json_extract(PE.value, '$.Result.RankRecap.PostMatchCsr.Tier') AS Tier, @@ -59,6 +72,7 @@ SELECTIVE_MATCHES AS ( MatchId, Teams, StartTime, + EndTime, Duration, "Rank", Outcome, @@ -80,6 +94,7 @@ SELECT SM.MatchId, SM.Teams, SM.StartTime, + SM.EndTime, SM.Duration, SM."Rank", SM.Outcome, @@ -93,6 +108,18 @@ SELECT MD.TeamMmr AS TeamMmr, MD.ExpectedDeaths AS ExpectedDeaths, MD.ExpectedKills AS ExpectedKills, + MD.ExpectedBronzeDeaths AS ExpectedBronzeDeaths, + MD.ExpectedBronzeKills AS ExpectedBronzeKills, + MD.ExpectedSilverDeaths AS ExpectedSilverDeaths, + MD.ExpectedSilverKills AS ExpectedSilverKills, + MD.ExpectedGoldDeaths AS ExpectedGoldDeaths, + MD.ExpectedGoldKills AS ExpectedGoldKills, + MD.ExpectedPlatinumDeaths AS ExpectedPlatinumDeaths, + MD.ExpectedPlatinumKills AS ExpectedPlatinumKills, + MD.ExpectedDiamondDeaths AS ExpectedDiamondDeaths, + MD.ExpectedDiamondKills AS ExpectedDiamondKills, + MD.ExpectedOnyxDeaths AS ExpectedOnyxDeaths, + MD.ExpectedOnyxKills AS ExpectedOnyxKills, MD.PostMatchCsr AS PostMatchCsr, MD.PreMatchCsr AS PreMatchCsr, MD.Tier AS Tier, diff --git a/src/OpenSpartan.Workshop/ViewModels/SettingsViewModel.cs b/src/OpenSpartan.Workshop/ViewModels/SettingsViewModel.cs index 6aa2846..59e8400 100644 --- a/src/OpenSpartan.Workshop/ViewModels/SettingsViewModel.cs +++ b/src/OpenSpartan.Workshop/ViewModels/SettingsViewModel.cs @@ -1,5 +1,6 @@ using OpenSpartan.Workshop.Core; using OpenSpartan.Workshop.Models; +using System.Collections.Generic; using System.Runtime.CompilerServices; namespace OpenSpartan.Workshop.ViewModels @@ -162,6 +163,20 @@ public WorkshopSettings Settings } } + public List ExtraRitualEvents + { + get => Settings.ExtraRitualEvents; + set + { + if (Settings.ExtraRitualEvents != value) + { + Settings.ExtraRitualEvents = value; + SettingsManager.StoreSettings(Settings); + NotifyPropertyChanged(); + } + } + } + public static string Version { get => $"{Configuration.Version}-{Configuration.BuildId}";