diff --git a/Questionable/Controller/Steps/Common/UnmountTask.cs b/Questionable/Controller/Steps/Common/UnmountTask.cs index ad369585..5ee67844 100644 --- a/Questionable/Controller/Steps/Common/UnmountTask.cs +++ b/Questionable/Controller/Steps/Common/UnmountTask.cs @@ -46,6 +46,13 @@ internal sealed class UnmountTask(ICondition condition, ILogger log 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] ? ETaskResult.StillRunning : ETaskResult.TaskComplete; diff --git a/Questionable/Controller/Steps/Interactions/UseItem.cs b/Questionable/Controller/Steps/Interactions/UseItem.cs index 497ae617..77a16847 100644 --- a/Questionable/Controller/Steps/Interactions/UseItem.cs +++ b/Questionable/Controller/Steps/Interactions/UseItem.cs @@ -72,6 +72,7 @@ internal static class UseItem .With(null, EAetheryteLocation.Limsa, territoryId); yield return serviceProvider.GetRequiredService() .With(EAetheryteLocation.Limsa, EAetheryteLocation.LimsaArcanist); + yield return serviceProvider.GetRequiredService(); yield return serviceProvider.GetRequiredService() .With(territoryId, destination, dataId: npcId, sprint: false); yield return serviceProvider.GetRequiredService() diff --git a/Questionable/Controller/Steps/Shared/Move.cs b/Questionable/Controller/Steps/Shared/Move.cs index 75fd691a..71d1a00e 100644 --- a/Questionable/Controller/Steps/Shared/Move.cs +++ b/Questionable/Controller/Steps/Shared/Move.cs @@ -130,7 +130,7 @@ internal static class Move return With( territoryId: step.TerritoryId, destination: destination, - stopDistance: step.StopDistance, + stopDistance: step.CalculateActualStopDistance(), dataId: step.DataId, disableNavMesh: step.DisableNavmesh, sprint: step.Sprint != false, diff --git a/Questionable/Validation/QuestValidator.cs b/Questionable/Validation/QuestValidator.cs index 694ff5f4..f6047a67 100644 --- a/Questionable/Validation/QuestValidator.cs +++ b/Questionable/Validation/QuestValidator.cs @@ -38,7 +38,8 @@ internal sealed class QuestValidator { 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}", issue.QuestId, quest.Info.Name, issue.Sequence, issue.Step, issue.Description); _validationIssues.Add(issue); diff --git a/Questionable/Windows/DebugOverlay.cs b/Questionable/Windows/DebugOverlay.cs index 0d2af7be..2c27dc69 100644 --- a/Questionable/Windows/DebugOverlay.cs +++ b/Questionable/Windows/DebugOverlay.cs @@ -75,7 +75,14 @@ internal sealed class DebugOverlay : Window for (int i = currentQuest.Step; i <= sequence.Steps.Count; ++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 || step.Position == null ||