From c193789d3c7215c42704dc012feae65526e69c92 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 31 Aug 2024 19:41:59 +0200 Subject: [PATCH] Ignore NextQuestId for job quests --- Questionable/Controller/Steps/Common/NextQuest.cs | 4 ++++ Questionable/Functions/QuestFunctions.cs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Questionable/Controller/Steps/Common/NextQuest.cs b/Questionable/Controller/Steps/Common/NextQuest.cs index e7fd2b626..574c76ae7 100644 --- a/Questionable/Controller/Steps/Common/NextQuest.cs +++ b/Questionable/Controller/Steps/Common/NextQuest.cs @@ -20,6 +20,10 @@ internal static class NextQuest if (step.NextQuestId == quest.Id) return null; + // probably irrelevant, since pick up is handled elsewhere (and, in particular, checks for aetherytes and stuff) + if (questFunctions.GetPriorityQuests().Contains(step.NextQuestId)) + return null; + return new SetQuest(step.NextQuestId, quest.Id, questRegistry, questController, questFunctions, loggerFactory.CreateLogger()); } } diff --git a/Questionable/Functions/QuestFunctions.cs b/Questionable/Functions/QuestFunctions.cs index 4bfdce001..b36e7c36b 100644 --- a/Questionable/Functions/QuestFunctions.cs +++ b/Questionable/Functions/QuestFunctions.cs @@ -254,7 +254,8 @@ internal sealed unsafe class QuestFunctions InventoryManager* inventoryManager = InventoryManager.Instance(); int gil = inventoryManager->GetItemCountInContainer(1, InventoryType.Currency); - return GetPriorityQuestsThatCanBeAccepted() + return GetPriorityQuests() + .Where(IsReadyToAcceptQuest) .Where(x => { if (!_questRegistry.TryGetQuest(x, out Quest? quest)) @@ -311,7 +312,7 @@ internal sealed unsafe class QuestFunctions return 1000 * quest.AllSteps().Count(x => x.Step.AetheryteShortcut != null); } - private List GetPriorityQuestsThatCanBeAccepted() + public List GetPriorityQuests() { List priorityQuests = [ @@ -349,7 +350,6 @@ internal sealed unsafe class QuestFunctions return priorityQuests .Where(_questRegistry.IsKnownQuest) - .Where(IsReadyToAcceptQuest) .ToList(); }