From e7a1656d2a8bdb388e2fc8a0056d5f49adc36ae9 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Sat, 29 Jan 2022 10:48:49 +0100 Subject: [PATCH] fix a bug with secondary objectives --- BGS/Report.cs | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/BGS/Report.cs b/BGS/Report.cs index b994d03..c9f5f13 100644 --- a/BGS/Report.cs +++ b/BGS/Report.cs @@ -146,25 +146,23 @@ namespace EliteBGS.BGS { "\" was generated, please report this."); } - if (completed.Influences.Count > 1) { - foreach (var other in completed.Influences) { - string faction = other.Key; - if (string.IsNullOrEmpty(faction)) { - continue; - } - foreach (var influences in other.Value) { - ulong system_address = influences.Key; - if (!faction.Equals(results[0].Faction) || - (faction.Equals(results[0].Faction) && system_address != current_system_address)) { - string system = systems.TryGetValue(system_address, out string sys) ? sys : ""; - results.Add(new InfluenceSupport() { - Faction = faction, - Influence = influences.Value, - System = system, - SystemAddress = system_address, - RelevantMission = results[0] as MissionCompleted - }); - } + foreach (var other in completed.Influences) { + string faction = other.Key; + if (string.IsNullOrEmpty(faction)) { + continue; + } + foreach (var influences in other.Value) { + ulong system_address = influences.Key; + if (!faction.Equals(results[0].Faction) || + (faction.Equals(results[0].Faction) && system_address != current_system_address)) { + string system = systems.TryGetValue(system_address, out string sys) ? sys : ""; + results.Add(new InfluenceSupport() { + Faction = faction, + Influence = influences.Value, + System = system, + SystemAddress = system_address, + RelevantMission = results[0] as MissionCompleted + }); } } }