"ChocoboUnlocked",
"AetheryteShortcutIfInSameTerritory",
"NotTargetable",
- "ItemNotInInventory"
+ "ItemNotInInventory",
+ "WakingSandsMainArea"
]
}
},
{ ESkipCondition.AetheryteShortcutIfInSameTerritory, "AetheryteShortcutIfInSameTerritory" },
{ ESkipCondition.NotTargetable, "NotTargetable" },
{ ESkipCondition.ItemNotInInventory, "ItemNotInInventory" },
+ { ESkipCondition.WakingSandsMainArea, "WakingSandsMainArea" },
};
}
AetheryteShortcutIfInSameTerritory,
NotTargetable,
ItemNotInInventory,
+
+ // TODO: This is an indication the whole skip bit should be optimized/parameterized to some extent
+ WakingSandsMainArea,
}
step.SkipIf.Where(x => x != ESkipCondition.AetheryteShortcutIfInSameTerritory).ToList();
if (relevantConditions.Count == 0 &&
step.CompletionQuestVariablesFlags.Count == 0 &&
- step.RequiredQuestVariables.Count == 0)
+ step.RequiredQuestVariables.Count == 0 &&
+ step.PickUpQuestId == null &&
+ step.NextQuestId == null)
return null;
return serviceProvider.GetRequiredService<CheckTask>()
}
}
+ if (Step.SkipIf.Contains(ESkipCondition.WakingSandsMainArea))
+ {
+ var position = clientState.LocalPlayer!.Position;
+ if (position.X < 24)
+ {
+ logger.LogInformation("Skipping step, as we're not in the Solar");
+ return true;
+ }
+ }
+
+ if (Step.PickUpQuestId != null && gameFunctions.IsQuestAcceptedOrComplete(Step.PickUpQuestId.Value))
+ {
+ logger.LogInformation("Skipping step, as we have already picked up the relevant quest");
+ return true;
+ }
+
+ if (Step.TurnInQuestId != null && gameFunctions.IsQuestComplete(Step.TurnInQuestId.Value))
+ {
+ logger.LogInformation("Skipping step, as we have already completed the relevant quest");
+ return true;
+ }
+
return false;
}
];
case EInteractionType.AcceptQuest:
- return
- [
- serviceProvider.GetRequiredService<WaitQuestAccepted>()
- .With(step.PickUpQuestId ?? quest.QuestId),
- serviceProvider.GetRequiredService<WaitDelay>()
- ];
+ {
+ var accept = serviceProvider.GetRequiredService<WaitQuestAccepted>()
+ .With(step.PickUpQuestId ?? quest.QuestId);
+ var delay = serviceProvider.GetRequiredService<WaitDelay>();
+ if (step.PickUpQuestId != null)
+ return [accept, delay, Next(quest, sequence)];
+ else
+ return [accept, delay];
+ }
case EInteractionType.CompleteQuest:
- return
- [
- serviceProvider.GetRequiredService<WaitQuestCompleted>()
- .With(step.TurnInQuestId ?? quest.QuestId),
- serviceProvider.GetRequiredService<WaitDelay>()
- ];
+ {
+ var complete = serviceProvider.GetRequiredService<WaitQuestCompleted>()
+ .With(step.TurnInQuestId ?? quest.QuestId);
+ var delay = serviceProvider.GetRequiredService<WaitDelay>();
+ if (step.NextQuestId != null)
+ return [complete, delay, Next(quest, sequence)];
+ else
+ return [complete, delay];
+ }
case EInteractionType.Interact:
default: