From c23e8627f6a8b411e9d07b5a585352b6e077c392 Mon Sep 17 00:00:00 2001 From: Florian Stinglmayr Date: Thu, 11 May 2023 20:43:30 +0200 Subject: [PATCH] update instance code --- EDPlayerJournal/Instances.cs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/EDPlayerJournal/Instances.cs b/EDPlayerJournal/Instances.cs index 55f88c9..c9068d0 100644 --- a/EDPlayerJournal/Instances.cs +++ b/EDPlayerJournal/Instances.cs @@ -25,7 +25,7 @@ public class Instances { /// /// Medium Thargoid combat zone /// - public static readonly string WarzoneThargoidMed = "$Warzone_TG_Med"; + public static readonly string WarzoneThargoidMedium = "$Warzone_TG_Med"; /// /// High Thargoid combat zone /// @@ -35,6 +35,27 @@ public class Instances { /// public static readonly string WarzoneThargoidVeryHigh = "$Warzone_TG_VeryHigh"; + public static bool IsThargoidWarzone(string type) { + return + IsInstance(type, WarzoneThargoidLow) || + IsInstance(type, WarzoneThargoidMedium) || + IsInstance(type, WarzoneThargoidHigh) || + IsInstance(type, WarzoneThargoidVeryHigh) + ; + } + + public static bool IsHumanWarzone(string type) { + return + IsInstance(type, WarzoneLow) || + IsInstance(type, WarzoneMedium) || + IsInstance(type, WarzoneHigh) + ; + } + + public static bool IsWarzone(string type) { + return IsHumanWarzone(type) || IsThargoidWarzone(type); + } + public static bool IsInstance(string type, string instance) { if (string.IsNullOrEmpty(type) || string.IsNullOrEmpty(instance)) { return false;