From 62a9cc28d515aa9d2f7cc78537374c2fba1329cd Mon Sep 17 00:00:00 2001 From: Chomp Date: Mon, 30 Jun 2025 12:41:49 +0100 Subject: [PATCH] Fixed weekly boss elimination quest generation not finding a location --- .../EliminationQuestGenerator.cs | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/EliminationQuestGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/EliminationQuestGenerator.cs index 1f168c82..27770b58 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/EliminationQuestGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/EliminationQuestGenerator.cs @@ -422,19 +422,23 @@ public class EliminationQuestGenerator( return false; } - // Specific location - locations = locations.Where(location => location != "any").ToList(); - if (locations.Count == 0) + // Don't filter when there's less than 2 options + if (locations.Count > 1) { - // Never should reach this if everything works out - logger.Error( - localisationService.GetText( - "quest-repeatable_elimination_generation_failed_please_report" - ) - ); + // Specific location + locations = locations.Where(location => location != "any").ToList(); + if (locations.Count == 0) + { + // Never should reach this if everything works out + logger.Error( + localisationService.GetText( + "quest-repeatable_elimination_generation_failed_please_report" + ) + ); - locationKey = null; - return false; + locationKey = null; + return false; + } } // Get name of location we want elimination to occur on