From 9d7dc7c850f8b650dee1418371ad74ca6516c71b Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Thu, 19 Aug 2021 17:14:20 +0200 Subject: [PATCH] compare faction, system and station case insensitive --- BGS/Objective.cs | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/BGS/Objective.cs b/BGS/Objective.cs index 9331a4d..e3fad67 100644 --- a/BGS/Objective.cs +++ b/BGS/Objective.cs @@ -26,19 +26,22 @@ namespace NonaBGS.BGS { } } - if (e.System != null && system != null && - e.System == system) { - ++match_count; + if (e.System != null && system != null) { + if (string.Compare(e.System, system, true) == 0) { + ++match_count; + } } - if (e.Station != null && station != null && - e.Station == station) { - ++match_count; + if (e.Station != null && station != null) { + if (string.Compare(e.Station, station, true) == 0) { + ++match_count; + } } - if (e.Faction != null && faction != null && - e.Faction == faction) { - ++match_count; + if (e.Faction != null && faction != null) { + if (string.Compare(e.Faction, faction, true) == 0) { + ++match_count; + } } return match_count;