conditionChangeAware.OnConditionChange(flag, value);
}
- private void OnNormalToast(ref SeString message, ref ToastOptions options, ref bool ishandled)
+ private void OnNormalToast(ref SeString message, ref ToastOptions options, ref bool isHandled)
{
_gatheringController.OnNormalToast(message);
}
- private void OnErrorToast(ref SeString message, ref bool ishandled)
+ private void OnErrorToast(ref SeString message, ref bool isHandled)
{
if (_currentTask is IToastAware toastAware)
- toastAware.OnErrorToast(message);
+ {
+ if (toastAware.OnErrorToast(message))
+ {
+ isHandled = true;
+ return;
+ }
+ }
}
public void Dispose()
using System.Numerics;
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.Objects.Types;
+using Dalamud.Game.Text.SeStringHandling;
using Dalamud.Plugin.Services;
using FFXIVClientStructs.FFXIV.Client.Game;
using FFXIVClientStructs.FFXIV.Client.Game.Character;
+using LLib;
+using Lumina.Excel.GeneratedSheets;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
-using Questionable.Controller.NavigationOverrides;
using Questionable.Controller.Steps.Common;
using Questionable.Data;
using Questionable.Functions;
using Questionable.Model;
using Questionable.Model.Questing;
+using Action = System.Action;
+using Quest = Questionable.Model.Quest;
namespace Questionable.Controller.Steps.Shared;
internal sealed class MoveInternal(
MovementController movementController,
GameFunctions gameFunctions,
- ILogger<MoveInternal> logger) : ITask
+ ILogger<MoveInternal> logger,
+ ICondition condition,
+ IDataManager dataManager) : ITask, IToastAware
{
+ private string _cannotExecuteAtThisTime = dataManager.GetString<LogMessage>(579, x => x.Text)!;
+
public Action StartAction { get; set; } = null!;
public Vector3 Destination { get; set; }
}
public override string ToString() => $"MoveTo({Destination.ToString("G", CultureInfo.InvariantCulture)})";
+
+ public bool OnErrorToast(SeString message)
+ {
+ if (GameFunctions.GameStringEquals(_cannotExecuteAtThisTime, message.TextValue) &&
+ condition[ConditionFlag.Diving])
+ return true;
+
+ return false;
+ }
}
internal sealed class ExpectToBeNearDataId(GameFunctions gameFunctions, IClientState clientState) : ITask