From: Liza Carvelli Date: Sat, 14 Jun 2025 19:01:42 +0000 (+0200) Subject: Automatically disable some Pandora's Box features X-Git-Tag: v5.18~9 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=91c9fadf3f2e16e6f0b6e40373cca40644f26563;p=Questionable.git Automatically disable some Pandora's Box features --- 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(); }