master #4

Merged
cacahuetes merged 75 commits from liza/Questionable:master into master 2024-09-02 21:50:11 +00:00
2 changed files with 7 additions and 3 deletions
Showing only changes of commit c193789d3c - Show all commits

View File

@ -20,6 +20,10 @@ internal static class NextQuest
if (step.NextQuestId == quest.Id)
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>());
}
}

View File

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