Leave TextAdvance active if waiting for a new quest sequence from the server

This commit is contained in:
Liza 2025-01-13 18:38:53 +01:00
parent a2a36c5156
commit 16b62316c5
Signed by: liza
GPG Key ID: 2C41B84815CF6445

View File

@ -22,13 +22,16 @@ internal sealed class TextAdvanceIpc : IDisposable
private readonly string _pluginName;
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;
_questController = questController;
_configuration = configuration;
_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");
_pluginName = pluginInterface.InternalName;
_framework.Update += OnUpdate;
@ -45,7 +48,9 @@ internal sealed class TextAdvanceIpc : IDisposable
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())
{