using Dalamud.Plugin.Services;
using Microsoft.Extensions.Logging;
using Questionable.Controller;
+using Questionable.Data;
namespace Questionable.External;
private readonly IFramework _framework;
private readonly QuestController _questController;
+ private readonly TerritoryData _territoryData;
+ private readonly IClientState _clientState;
private readonly ILogger<PandorasBoxIpc> _logger;
private readonly ICallGateSubscriber<string, bool?> _getFeatureEnabled;
private bool _loggedIpcError;
private HashSet<string>? _pausedFeatures;
- public PandorasBoxIpc(IDalamudPluginInterface pluginInterface, IFramework framework,
- QuestController questController, ILogger<PandorasBoxIpc> logger)
+ public PandorasBoxIpc(IDalamudPluginInterface pluginInterface,
+ IFramework framework,
+ QuestController questController,
+ TerritoryData territoryData,
+ IClientState clientState,
+ ILogger<PandorasBoxIpc> logger)
{
_framework = framework;
_questController = questController;
+ _territoryData = territoryData;
+ _clientState = clientState;
_logger = logger;
_getFeatureEnabled = pluginInterface.GetIpcSubscriber<string, bool?>("PandorasBox.GetFeatureEnabled");
_setFeatureEnabled = pluginInterface.GetIpcSubscriber<string, bool, object?>("PandorasBox.SetFeatureEnabled");
{
bool hasActiveQuest = _questController.IsRunning ||
_questController.AutomationType != QuestController.EAutomationType.Manual;
- if (hasActiveQuest)
+ if (hasActiveQuest && !_territoryData.IsDutyInstance(_clientState.TerritoryType))
{
DisableConflictingFeatures();
}