Compare commits

...

2 Commits

2 changed files with 17 additions and 10 deletions

View File

@ -179,10 +179,12 @@ internal static class AethernetShortcut
} }
} }
} }
else else if (clientState.TerritoryType == aetheryteData.TerritoryIds[Task.To])
logger.LogWarning( logger.LogWarning(
"Aethernet shortcut not unlocked (from: {FromAetheryte}, to: {ToAetheryte}), walking manually", "Aethernet shortcut not unlocked (from: {FromAetheryte}, to: {ToAetheryte}), skipping as we are already in the destination territory",
Task.From, Task.To); Task.From, Task.To);
else
throw new TaskException($"Aethernet shortcut not unlocked (from: {Task.From}, to: {Task.To})");
return false; return false;
} }

View File

@ -22,13 +22,16 @@ internal sealed class TextAdvanceIpc : IDisposable
private readonly string _pluginName; private readonly string _pluginName;
private readonly ExternalTerritoryConfig _externalTerritoryConfig = new(); private readonly ExternalTerritoryConfig _externalTerritoryConfig = new();
public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework, QuestController questController, Configuration configuration) public TextAdvanceIpc(IDalamudPluginInterface pluginInterface, IFramework framework,
QuestController questController, Configuration configuration)
{ {
_framework = framework; _framework = framework;
_questController = questController; _questController = questController;
_configuration = configuration; _configuration = configuration;
_isInExternalControl = pluginInterface.GetIpcSubscriber<bool>("TextAdvance.IsInExternalControl"); _isInExternalControl = pluginInterface.GetIpcSubscriber<bool>("TextAdvance.IsInExternalControl");
_enableExternalControl = pluginInterface.GetIpcSubscriber<string, ExternalTerritoryConfig, bool>("TextAdvance.EnableExternalControl"); _enableExternalControl =
pluginInterface.GetIpcSubscriber<string, ExternalTerritoryConfig, bool>(
"TextAdvance.EnableExternalControl");
_disableExternalControl = pluginInterface.GetIpcSubscriber<string, bool>("TextAdvance.DisableExternalControl"); _disableExternalControl = pluginInterface.GetIpcSubscriber<string, bool>("TextAdvance.DisableExternalControl");
_pluginName = pluginInterface.InternalName; _pluginName = pluginInterface.InternalName;
_framework.Update += OnUpdate; _framework.Update += OnUpdate;
@ -45,7 +48,9 @@ internal sealed class TextAdvanceIpc : IDisposable
private void OnUpdate(IFramework framework) private void OnUpdate(IFramework framework)
{ {
if(_configuration.General.ConfigureTextAdvance && _questController.IsRunning) bool hasActiveQuest = _questController.IsRunning ||
_questController.AutomationType != QuestController.EAutomationType.Manual;
if (_configuration.General.ConfigureTextAdvance && hasActiveQuest)
{ {
if (!_isInExternalControl.InvokeFunc()) if (!_isInExternalControl.InvokeFunc())
{ {