From: Liza Carvelli Date: Fri, 30 Aug 2024 19:40:42 +0000 (+0200) Subject: Handle accepting quests via 'PickupQuestId' if NPC offers multiple quests X-Git-Tag: v2.20~16 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=de7cf2a94fec6d2317d33d34a888d806a8e316f6;p=Questionable.git Handle accepting quests via 'PickupQuestId' if NPC offers multiple quests --- diff --git a/Questionable/Controller/GameUi/InteractionUiController.cs b/Questionable/Controller/GameUi/InteractionUiController.cs index e630d7d6..21c95d29 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;