Handle accepting quests via 'PickupQuestId' if NPC offers multiple quests
This commit is contained in:
parent
a5d75eb0f5
commit
de7cf2a94f
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user