}
];
_questController.SetGatheringQuest(quest);
- _questController.StartSingleQuest("SatisfactionSupply prepare gathering");
+ _questController.StartGatheringQuest("SatisfactionSupply prepare gathering");
}
else
_chatGui.PrintError($"No associated quest ({info.QuestId}).", "Questionable");
_logger.LogInformation("Next quest {QuestId} accepted or completed",
_nextQuest.Quest.Id);
- // if (_nextQuest.Quest.Id is LeveId)
- // _startedQuest = _nextQuest;
+ if (AutomationType == EAutomationType.SingleQuestA)
+ {
+ _startedQuest = _nextQuest;
+ AutomationType = EAutomationType.SingleQuestB;
+ }
+ _logger.LogDebug("Started: {StartedQuest}", _startedQuest?.Quest.Id);
_nextQuest = null;
}
}
Stop("Quest level too high");
}
else
+ {
+ if (AutomationType == EAutomationType.SingleQuestB)
+ {
+ _logger.LogInformation("Single quest is finished");
+ AutomationType = EAutomationType.Manual;
+ }
+
CheckNextTasks("Different Quest");
+ }
}
else if (_startedQuest != null)
{
private void CheckNextTasks(string label)
{
- if (AutomationType == EAutomationType.Automatic)
+ if (AutomationType is EAutomationType.Automatic or EAutomationType.SingleQuestA or EAutomationType.SingleQuestB)
{
using var scope = _logger.BeginScope(label);
ExecuteNextStep();
}
+ public void StartGatheringQuest(string label)
+ {
+ using var scope = _logger.BeginScope($"GQ/{label}");
+ AutomationType = EAutomationType.GatheringOnly;
+ ExecuteNextStep();
+ }
+
public void StartSingleQuest(string label)
{
using var scope = _logger.BeginScope($"SQ/{label}");
- AutomationType = EAutomationType.CurrentQuestOnly;
+ AutomationType = EAutomationType.SingleQuestA;
ExecuteNextStep();
}
{
Manual,
Automatic,
- CurrentQuestOnly,
+ GatheringOnly,
+ SingleQuestA,
+ SingleQuestB,
}
}
{
protected override bool Start()
{
- if (questFunctions.IsQuestLocked(Task.NextQuestId, Task.CurrentQuestId))
+ if (questController.AutomationType is QuestController.EAutomationType.SingleQuestA or QuestController.EAutomationType.SingleQuestB)
+ {
+ logger.LogInformation("Won't set next quest to {QuestId}, automation type is CurrentQuestOnly", Task.NextQuestId);
+ questController.SetNextQuest(null);
+ }
+ else if (questFunctions.IsQuestLocked(Task.NextQuestId, Task.CurrentQuestId))
{
logger.LogInformation("Can't set next quest to {QuestId}, quest is locked", Task.NextQuestId);
+ questController.SetNextQuest(null);
}
else if (questRegistry.TryGetQuest(Task.NextQuestId, out Quest? quest))
{