From 736944a9885889875d9e7f9c28057c69ecc43680 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Sun, 16 Jun 2024 20:50:18 +0200 Subject: [PATCH] Don't open DF if in queue --- Questionable/Controller/Steps/InteractionFactory/Duty.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Questionable/Controller/Steps/InteractionFactory/Duty.cs b/Questionable/Controller/Steps/InteractionFactory/Duty.cs index adb6d590b..9a57f4f34 100644 --- a/Questionable/Controller/Steps/InteractionFactory/Duty.cs +++ b/Questionable/Controller/Steps/InteractionFactory/Duty.cs @@ -1,4 +1,6 @@ using System; +using Dalamud.Game.ClientState.Conditions; +using Dalamud.Plugin.Services; using Microsoft.Extensions.DependencyInjection; using Questionable.Model; using Questionable.Model.V1; @@ -21,7 +23,7 @@ internal static class Duty } } - internal sealed class OpenDutyFinder(GameFunctions gameFunctions) : ITask + internal sealed class OpenDutyFinder(GameFunctions gameFunctions, ICondition condition) : ITask { public uint ContentFinderConditionId { get; set; } @@ -33,6 +35,9 @@ internal static class Duty public bool Start() { + if (condition[ConditionFlag.InDutyQueue]) + return false; + gameFunctions.OpenDutyFinder(ContentFinderConditionId); return true; }