From 207a639b81347dbf90a8575604d998dab43b7659 Mon Sep 17 00:00:00 2001 From: Jebzou <22751386+Jebzou@users.noreply.github.com> Date: Sat, 28 Dec 2024 11:30:19 +0100 Subject: [PATCH] Ship type quest tracker was not supporting the "All" type --- .../ViewModels/Conditions/ShipTypeConditionViewModel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ElectronicObserver/Window/Dialog/QuestTrackerManager/ViewModels/Conditions/ShipTypeConditionViewModel.cs b/ElectronicObserver/Window/Dialog/QuestTrackerManager/ViewModels/Conditions/ShipTypeConditionViewModel.cs index 991782e7a..3edd89abe 100644 --- a/ElectronicObserver/Window/Dialog/QuestTrackerManager/ViewModels/Conditions/ShipTypeConditionViewModel.cs +++ b/ElectronicObserver/Window/Dialog/QuestTrackerManager/ViewModels/Conditions/ShipTypeConditionViewModel.cs @@ -89,7 +89,11 @@ public bool ConditionMet(IFleetData fleet) bool flagshipCondition = !Model.MustBeFlagship || Model.Types.Contains(ships[0].MasterShip.ShipType); - int shipCount = ships.Count(s => Model.Types.Contains(s.MasterShip.ShipType)); + int shipCount = Model.Types.Contains(ShipTypes.All) switch + { + true => ships.Count, + _ => ships.Count(s => Model.Types.Contains(s.MasterShip.ShipType)), + }; bool countCondition = Compare(shipCount, Model.Count, Model.ComparisonType);