1
0
forked from liza/Questionable

Handle accepting quests via 'PickupQuestId' if NPC offers multiple quests

This commit is contained in:
Liza 2024-08-30 21:40:42 +02:00
parent a5d75eb0f5
commit de7cf2a94f
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -235,6 +235,16 @@ internal sealed class InteractionUiController : IDisposable
_logger.LogInformation("Checking if current quest {Name} is on the list", currentQuest.Quest.Info.Name); _logger.LogInformation("Checking if current quest {Name} is on the list", currentQuest.Quest.Info.Name);
if (CheckQuestSelection(addonSelectIconString, currentQuest.Quest, answers)) if (CheckQuestSelection(addonSelectIconString, currentQuest.Quest, answers))
return; 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; var nextQuest = _questController.NextQuest;