Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qutrits committed May 9, 2024
1 parent c7b84ba commit 6955680
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Entities/LogFileWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,6 @@ private void AddLineAfterClientShutdown() {
};

private bool IsRealFinalRound(string roundId, string showId) {
if (showId.StartsWith("knockout_") && roundId.StartsWith("knockout_fp10_final_")) {
return true;
}

if ((showId.StartsWith("show_wle_s10_") && showId.IndexOf("_srs", StringComparison.OrdinalIgnoreCase) != -1)
|| showId.IndexOf("wle_s10_player_round_", StringComparison.OrdinalIgnoreCase) != -1
|| showId.StartsWith("wle_mrs_shuffle_")
Expand Down Expand Up @@ -398,11 +394,14 @@ private bool IsModeException(string roundId, string showId) {
|| roundId.IndexOf("round_hexaring_event_only", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_hexaring_event_walnut", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_hexsnake_event_walnut", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_kraken_attack_event_only_survival", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_kraken_attack_event_only_survival", StringComparison.OrdinalIgnoreCase) !=
-1
|| roundId.IndexOf("round_thin_ice_event_only", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_blastball_arenasurvival_blast_ball_trials", StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_blastball_arenasurvival_blast_ball_trials",
StringComparison.OrdinalIgnoreCase) != -1
|| roundId.IndexOf("round_robotrampage_arena_2_ss2_show1", StringComparison.OrdinalIgnoreCase) != -1
|| string.Equals(showId, "event_blast_ball_banger_template");
|| string.Equals(showId, "event_blast_ball_banger_template")
|| showId.StartsWith("knockout_");
}

private bool IsModeFinalException(string roundId) {
Expand Down Expand Up @@ -432,7 +431,9 @@ private bool IsModeFinalException(string roundId) {
|| (roundId.IndexOf("round_robotrampage_arena_2_ss2_show1", StringComparison.OrdinalIgnoreCase) != -1
&& roundId.EndsWith("_03", StringComparison.OrdinalIgnoreCase))

|| string.Equals(roundId, "round_blastball_arenasurvival_blast_ball_banger");
|| string.Equals(roundId, "round_blastball_arenasurvival_blast_ball_banger")

|| roundId.StartsWith("knockout_fp10_final_");
}

private bool IsTeamException(string roundId) {
Expand Down
17 changes: 17 additions & 0 deletions Views/Stats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3119,6 +3119,23 @@ where string.Equals(ri.ShowNameId, "event_april_fools") && ri.IsFinal == false
this.CurrentSettings.Version = 92;
this.SaveUserSettings();
}

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

foreach (RoundInfo ri in roundInfoList) {
if (string.Equals(ri.Name, "round_blastball_arenasurvival_symphony_launch_show") || string.Equals(ri.Name, "round_kraken_attack")) {
ri.IsFinal = false;
}
}
this.StatsDB.BeginTrans();
this.RoundDetails.Update(roundInfoList);
this.StatsDB.Commit();
this.CurrentSettings.Version = 93;
this.SaveUserSettings();
}
}

private UserSettings GetDefaultSettings() {
Expand Down

0 comments on commit 6955680

Please sign in to comment.