forked from liza/Questionable
master #3
@ -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>());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user