Don't open DF if in queue

This commit is contained in:
Liza 2024-06-16 20:50:18 +02:00
parent 4f0c269e7b
commit 736944a988
Signed by: liza
GPG Key ID: 7199F8D727D55F67

View File

@ -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;
}