diff --git a/EDPlayerJournal/BGS/CombatZone.cs b/EDPlayerJournal/BGS/CombatZone.cs index a7a8229..178760a 100644 --- a/EDPlayerJournal/BGS/CombatZone.cs +++ b/EDPlayerJournal/BGS/CombatZone.cs @@ -91,7 +91,7 @@ public class CombatZone : Transaction { } public override string ToString() { - if (Grade != null) { + if (!string.IsNullOrEmpty(Grade)) { return string.Format("Won {0} {1} Combat Zone", Grade, Type); } else { return string.Format("Won {0} Combat Zone", Type); diff --git a/EliteBGS/LogGenerator/CombatZoneFormat.cs b/EliteBGS/LogGenerator/CombatZoneFormat.cs index 8d987be..1057047 100644 --- a/EliteBGS/LogGenerator/CombatZoneFormat.cs +++ b/EliteBGS/LogGenerator/CombatZoneFormat.cs @@ -22,11 +22,18 @@ class CombatZoneFormat : LogFormatter { int optionals = log.Value .Sum(x => x.OptionalObjectivesCompleted) ; - builder.AppendFormat("Won {0}x {1} {2} Combat Zone(s)", - log.Value.Count, - log.Key.Grade, - log.Key.Type - ); + if (!string.IsNullOrEmpty(log.Key.Grade)) { + builder.AppendFormat("Won {0}x {1} {2} Combat Zone(s)", + log.Value.Count, + log.Key.Grade, + log.Key.Type + ); + } else { + builder.AppendFormat("Won {0}x {1} Combat Zone(s)", + log.Value.Count, + log.Key.Type + ); + } if (optionals > 0) { builder.AppendFormat(" (with {0} optional objectives)", optionals);