Ignore NextQuestId for job quests

This commit is contained in:
Liza 2024-08-31 19:41:59 +02:00
parent aaad336c64
commit c193789d3c
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 7 additions and 3 deletions

View File

@ -20,6 +20,10 @@ internal static class NextQuest
if (step.NextQuestId == quest.Id) if (step.NextQuestId == quest.Id)
return null; 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<SetQuest>()); return new SetQuest(step.NextQuestId, quest.Id, questRegistry, questController, questFunctions, loggerFactory.CreateLogger<SetQuest>());
} }
} }

View File

@ -254,7 +254,8 @@ internal sealed unsafe class QuestFunctions
InventoryManager* inventoryManager = InventoryManager.Instance(); InventoryManager* inventoryManager = InventoryManager.Instance();
int gil = inventoryManager->GetItemCountInContainer(1, InventoryType.Currency); int gil = inventoryManager->GetItemCountInContainer(1, InventoryType.Currency);
return GetPriorityQuestsThatCanBeAccepted() return GetPriorityQuests()
.Where(IsReadyToAcceptQuest)
.Where(x => .Where(x =>
{ {
if (!_questRegistry.TryGetQuest(x, out Quest? quest)) 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); return 1000 * quest.AllSteps().Count(x => x.Step.AetheryteShortcut != null);
} }
private List<ElementId> GetPriorityQuestsThatCanBeAccepted() public List<ElementId> GetPriorityQuests()
{ {
List<ElementId> priorityQuests = List<ElementId> priorityQuests =
[ [
@ -349,7 +350,6 @@ internal sealed unsafe class QuestFunctions
return priorityQuests return priorityQuests
.Where(_questRegistry.IsKnownQuest) .Where(_questRegistry.IsKnownQuest)
.Where(IsReadyToAcceptQuest)
.ToList(); .ToList();
} }