From d9d090e9800b5f32f264f09ab654ee38575e1673 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 28 Nov 2024 23:27:55 +0100 Subject: [PATCH] Skip equipping recommended gear if already in combat --- .../Controller/Steps/Interactions/EquipRecommended.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Questionable/Controller/Steps/Interactions/EquipRecommended.cs b/Questionable/Controller/Steps/Interactions/EquipRecommended.cs index b923c237..3b2be0f1 100644 --- a/Questionable/Controller/Steps/Interactions/EquipRecommended.cs +++ b/Questionable/Controller/Steps/Interactions/EquipRecommended.cs @@ -1,4 +1,5 @@ using System; +using Dalamud.Game.ClientState.Conditions; using Dalamud.Plugin.Services; using FFXIVClientStructs.FFXIV.Client.Game; using FFXIVClientStructs.FFXIV.Client.UI.Misc; @@ -39,12 +40,15 @@ internal static class EquipRecommended public override string ToString() => "EquipRecommended"; } - internal sealed unsafe class DoEquipRecommended(IClientState clientState, IChatGui chatGui) : TaskExecutor + internal sealed unsafe class DoEquipRecommended(IClientState clientState, IChatGui chatGui, ICondition condition) : TaskExecutor { private bool _equipped; protected override bool Start() { + if (condition[ConditionFlag.InCombat]) + return false; + RecommendEquipModule.Instance()->SetupForClassJob((byte)clientState.LocalPlayer!.ClassJob.RowId); return true; }