From 91c9fadf3f2e16e6f0b6e40373cca40644f26563 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sat, 14 Jun 2025 21:01:42 +0200 Subject: [PATCH] Automatically disable some Pandora's Box features --- Questionable/External/PandorasBoxIpc.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Questionable/External/PandorasBoxIpc.cs b/Questionable/External/PandorasBoxIpc.cs index 0233773f..22cf667c 100644 --- a/Questionable/External/PandorasBoxIpc.cs +++ b/Questionable/External/PandorasBoxIpc.cs @@ -7,6 +7,7 @@ using Dalamud.Plugin.Ipc.Exceptions; using Dalamud.Plugin.Services; using Microsoft.Extensions.Logging; using Questionable.Controller; +using Questionable.Data; namespace Questionable.External; @@ -31,6 +32,8 @@ internal sealed class PandorasBoxIpc : IDisposable private readonly IFramework _framework; private readonly QuestController _questController; + private readonly TerritoryData _territoryData; + private readonly IClientState _clientState; private readonly ILogger _logger; private readonly ICallGateSubscriber _getFeatureEnabled; @@ -39,11 +42,17 @@ internal sealed class PandorasBoxIpc : IDisposable private bool _loggedIpcError; private HashSet? _pausedFeatures; - public PandorasBoxIpc(IDalamudPluginInterface pluginInterface, IFramework framework, - QuestController questController, ILogger logger) + public PandorasBoxIpc(IDalamudPluginInterface pluginInterface, + IFramework framework, + QuestController questController, + TerritoryData territoryData, + IClientState clientState, + ILogger logger) { _framework = framework; _questController = questController; + _territoryData = territoryData; + _clientState = clientState; _logger = logger; _getFeatureEnabled = pluginInterface.GetIpcSubscriber("PandorasBox.GetFeatureEnabled"); _setFeatureEnabled = pluginInterface.GetIpcSubscriber("PandorasBox.SetFeatureEnabled"); @@ -78,7 +87,7 @@ internal sealed class PandorasBoxIpc : IDisposable { bool hasActiveQuest = _questController.IsRunning || _questController.AutomationType != QuestController.EAutomationType.Manual; - if (hasActiveQuest) + if (hasActiveQuest && !_territoryData.IsDutyInstance(_clientState.TerritoryType)) { DisableConflictingFeatures(); } -- 2.30.2