From de7cf2a94fec6d2317d33d34a888d806a8e316f6 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Fri, 30 Aug 2024 21:40:42 +0200 Subject: [PATCH] Handle accepting quests via 'PickupQuestId' if NPC offers multiple quests --- .../Controller/GameUi/InteractionUiController.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Questionable/Controller/GameUi/InteractionUiController.cs b/Questionable/Controller/GameUi/InteractionUiController.cs index e630d7d6d..21c95d29d 100644 --- a/Questionable/Controller/GameUi/InteractionUiController.cs +++ b/Questionable/Controller/GameUi/InteractionUiController.cs @@ -235,6 +235,16 @@ internal sealed class InteractionUiController : IDisposable _logger.LogInformation("Checking if current quest {Name} is on the list", currentQuest.Quest.Info.Name); if (CheckQuestSelection(addonSelectIconString, currentQuest.Quest, answers)) return; + + var sequence = currentQuest.Quest.FindSequence(currentQuest.Sequence); + QuestStep? step = sequence?.FindStep(currentQuest.Step); + if (step is { InteractionType: EInteractionType.AcceptQuest, PickUpQuestId: not null } && + _questRegistry.TryGetQuest(step.PickUpQuestId, out Quest? pickupQuest)) + { + _logger.LogInformation("Checking if current picked-up {Name} is on the list", pickupQuest.Info.Name); + if (CheckQuestSelection(addonSelectIconString, pickupQuest, answers)) + return; + } } var nextQuest = _questController.NextQuest;