Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Micdu70 committed Jun 30, 2024
1 parent 427f19d commit 46aa7bb
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Entities/LogFileWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private void AddLineAfterClientShutdown() {
{ "FallGuy_FollowTheLeader_UNPACKED", "FallGuy_FollowTheLeader" },
{ "FallGuy_BlueJay_UNPACKED", "FallGuy_BlueJay" }
};

private bool IsRealFinalRound(string roundId, string showId) {
if ((showId.StartsWith("knockout_fp") && showId.EndsWith("_srs"))
|| (showId.StartsWith("show_wle_s10_") && showId.IndexOf("_srs", StringComparison.OrdinalIgnoreCase) != -1)
Expand All @@ -359,9 +359,16 @@ private bool IsRealFinalRound(string roundId, string showId) {
&& roundId.IndexOf("_cup_only", StringComparison.OrdinalIgnoreCase) == -1
&& !string.Equals(showId, "event_anniversary_season_1_alternate_name"))

|| ((roundId.IndexOf("round_basketfall", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_1v1_volleyfall", StringComparison.OrdinalIgnoreCase) != -1)
&& roundId.IndexOf("_final", StringComparison.OrdinalIgnoreCase) != -1)
|| (roundId.IndexOf("round_territory", StringComparison.OrdinalIgnoreCase) != -1
&& roundId.IndexOf("_non_final", StringComparison.OrdinalIgnoreCase) == -1)

|| (roundId.IndexOf("round_basketfall", StringComparison.OrdinalIgnoreCase) != -1
&& roundId.IndexOf("_non_final", StringComparison.OrdinalIgnoreCase) == -1
&& (roundId.EndsWith("_duos", StringComparison.OrdinalIgnoreCase)
|| roundId.IndexOf("_final", StringComparison.OrdinalIgnoreCase) != -1))

|| (roundId.IndexOf("round_1v1_volleyfall", StringComparison.OrdinalIgnoreCase) != -1
&& roundId.IndexOf("_final", StringComparison.OrdinalIgnoreCase) != -1)

|| ((roundId.IndexOf("round_pixelperfect", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_robotrampage", StringComparison.OrdinalIgnoreCase) != -1)
Expand All @@ -373,13 +380,13 @@ private bool IsRealFinalRound(string roundId, string showId) {

|| (roundId.IndexOf("_squads_squadcelebration", StringComparison.OrdinalIgnoreCase) != -1
&& roundId.EndsWith("_final", StringComparison.OrdinalIgnoreCase))

|| (string.Equals(showId, "event_only_hoverboard_template")
&& string.Equals(roundId, "round_hoverboardsurvival_final"))

|| (string.Equals(showId, "event_only_button_bashers_template")
&& string.Equals(roundId, "round_1v1_button_basher_event_only_final"))

|| (string.Equals(showId, "no_elimination_show")
&& (string.Equals(roundId, "round_snowballsurvival_final_noelim") || string.Equals(roundId, "round_robotrampage_arena_2_final_noelim")));
}
Expand Down Expand Up @@ -449,7 +456,7 @@ private bool IsTeamException(string roundId) {
&& (roundId.IndexOf("_duos", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("_squads", StringComparison.OrdinalIgnoreCase) != -1);
}

private void ClearUserCreativeLevelInfo() {
this.threadLocalVariable.Value.creativeOnlinePlatformId = string.Empty;
this.threadLocalVariable.Value.creativeAuthor = string.Empty;
Expand Down
17 changes: 17 additions & 0 deletions Views/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3159,6 +3159,23 @@ where string.Equals(ri.ShowNameId, "event_april_fools") && ri.IsFinal == false
this.CurrentSettings.Version = 97;
this.SaveUserSettings();
}

if (this.CurrentSettings.Version == 97) {
List<RoundInfo> roundInfoList = (from ri in this.RoundDetails.FindAll()
where !string.IsNullOrEmpty(ri.ShowNameId) && ri.ShowNameId.StartsWith("classic_")
select ri).ToList();

foreach (RoundInfo ri in roundInfoList) {
if (string.Equals(ri.Name, "round_basketfall_s4_show") || string.Equals(ri.Name, "round_territory_control_s4_show")) {
ri.IsFinal = (string.Equals(ri.ShowNameId, "classic_duos_show") && ri.Players <= 4) || (string.Equals(ri.ShowNameId, "classic_squads_show") && ri.Players <= 8);
}
}
this.StatsDB.BeginTrans();
this.RoundDetails.Update(roundInfoList);
this.StatsDB.Commit();
this.CurrentSettings.Version = 98;
this.SaveUserSettings();
}
}

private UserSettings GetDefaultSettings() {
Expand Down

0 comments on commit 46aa7bb

Please sign in to comment.