grade can be null

This commit is contained in:
2023-02-26 21:57:24 +01:00
parent 1a8c163fc4
commit d8ac2a7ee7
2 changed files with 7 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ class CombatZoneFormat : LogFormatter {
public string GenerateLog(Objective objective) {
var logs = objective
.EnabledOfType<CombatZone>()
.OrderBy(x => CombatZones.DifficultyRank(x.Grade))
.OrderBy(x => (CombatZones.DifficultyRank(x.Grade) ?? 0))
.GroupBy(x => new { x.Type, x.Grade })
.ToDictionary(x => x.Key, x => x.ToList())
;
@@ -48,7 +48,7 @@ class CombatZoneFormat : LogFormatter {
public string GenerateSummary(Objective objective) {
var logs = objective
.EnabledOfType<CombatZone>()
.OrderBy(x => CombatZones.DifficultyRank(x.Grade))
.OrderBy(x => (CombatZones.DifficultyRank(x.Grade) ?? 0))
.GroupBy(x => new { x.Type, x.Grade })
.ToDictionary(x => x.Key, x => x.ToList())
;