Fix stopDistance for WalkTo steps
This commit is contained in:
parent
3a742ea2ad
commit
9eeda20d88
@ -46,6 +46,13 @@ internal sealed class UnmountTask(ICondition condition, ILogger<UnmountTask> log
|
|||||||
return ETaskResult.StillRunning;
|
return ETaskResult.StillRunning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (condition[ConditionFlag.Mounted] && condition[ConditionFlag.InCombat])
|
||||||
|
{
|
||||||
|
_unmountTriggered = gameFunctions.Unmount();
|
||||||
|
_continueAt = DateTime.Now.AddSeconds(1);
|
||||||
|
return ETaskResult.StillRunning;
|
||||||
|
}
|
||||||
|
|
||||||
return condition[ConditionFlag.Mounted]
|
return condition[ConditionFlag.Mounted]
|
||||||
? ETaskResult.StillRunning
|
? ETaskResult.StillRunning
|
||||||
: ETaskResult.TaskComplete;
|
: ETaskResult.TaskComplete;
|
||||||
|
@ -72,6 +72,7 @@ internal static class UseItem
|
|||||||
.With(null, EAetheryteLocation.Limsa, territoryId);
|
.With(null, EAetheryteLocation.Limsa, territoryId);
|
||||||
yield return serviceProvider.GetRequiredService<AethernetShortcut.UseAethernetShortcut>()
|
yield return serviceProvider.GetRequiredService<AethernetShortcut.UseAethernetShortcut>()
|
||||||
.With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist);
|
.With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist);
|
||||||
|
yield return serviceProvider.GetRequiredService<WaitAtEnd.WaitDelay>();
|
||||||
yield return serviceProvider.GetRequiredService<Move.MoveInternal>()
|
yield return serviceProvider.GetRequiredService<Move.MoveInternal>()
|
||||||
.With(territoryId, destination, dataId: npcId, sprint: false);
|
.With(territoryId, destination, dataId: npcId, sprint: false);
|
||||||
yield return serviceProvider.GetRequiredService<Interact.DoInteract>()
|
yield return serviceProvider.GetRequiredService<Interact.DoInteract>()
|
||||||
|
@ -130,7 +130,7 @@ internal static class Move
|
|||||||
return With(
|
return With(
|
||||||
territoryId: step.TerritoryId,
|
territoryId: step.TerritoryId,
|
||||||
destination: destination,
|
destination: destination,
|
||||||
stopDistance: step.StopDistance,
|
stopDistance: step.CalculateActualStopDistance(),
|
||||||
dataId: step.DataId,
|
dataId: step.DataId,
|
||||||
disableNavMesh: step.DisableNavmesh,
|
disableNavMesh: step.DisableNavmesh,
|
||||||
sprint: step.Sprint != false,
|
sprint: step.Sprint != false,
|
||||||
|
@ -38,7 +38,8 @@ internal sealed class QuestValidator
|
|||||||
{
|
{
|
||||||
foreach (var issue in validator.Validate(quest))
|
foreach (var issue in validator.Validate(quest))
|
||||||
{
|
{
|
||||||
_logger.LogWarning(
|
var level = issue.Severity == EIssueSeverity.Error ? LogLevel.Warning : LogLevel.Information;
|
||||||
|
_logger.Log(level,
|
||||||
"Validation failed: {QuestId} ({QuestName}) / {QuestSequence} / {QuestStep} - {Description}",
|
"Validation failed: {QuestId} ({QuestName}) / {QuestSequence} / {QuestStep} - {Description}",
|
||||||
issue.QuestId, quest.Info.Name, issue.Sequence, issue.Step, issue.Description);
|
issue.QuestId, quest.Info.Name, issue.Sequence, issue.Step, issue.Description);
|
||||||
_validationIssues.Add(issue);
|
_validationIssues.Add(issue);
|
||||||
|
@ -75,7 +75,14 @@ internal sealed class DebugOverlay : Window
|
|||||||
for (int i = currentQuest.Step; i <= sequence.Steps.Count; ++i)
|
for (int i = currentQuest.Step; i <= sequence.Steps.Count; ++i)
|
||||||
{
|
{
|
||||||
QuestStep? step = sequence.FindStep(i);
|
QuestStep? step = sequence.FindStep(i);
|
||||||
DrawStep(i.ToString(CultureInfo.InvariantCulture), step);
|
if (step == null || step.Position == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
DrawStep(i.ToString(CultureInfo.InvariantCulture), step,
|
||||||
|
Vector3.Distance(_clientState.LocalPlayer!.Position, step.Position.Value) <
|
||||||
|
step.CalculateActualStopDistance()
|
||||||
|
? 0xFF00FF00
|
||||||
|
: 0xFF0000FF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -94,7 +101,7 @@ internal sealed class DebugOverlay : Window
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DrawStep(string counter, QuestStep? step, uint color = 0xFF0000FF)
|
private void DrawStep(string counter, QuestStep? step, uint color)
|
||||||
{
|
{
|
||||||
if (step == null ||
|
if (step == null ||
|
||||||
step.Position == null ||
|
step.Position == null ||
|
||||||
|
Loading…
Reference in New Issue
Block a user