diff --git a/Dalamud/Game/Internal/DalamudAtkTweaks.cs b/Dalamud/Game/Internal/DalamudAtkTweaks.cs index 111d1364c..0fede34c9 100644 --- a/Dalamud/Game/Internal/DalamudAtkTweaks.cs +++ b/Dalamud/Game/Internal/DalamudAtkTweaks.cs @@ -9,6 +9,7 @@ using Dalamud.Game.Text; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using Dalamud.Hooking; +using Dalamud.Interface; using Dalamud.Interface.Internal; using Dalamud.Interface.Windowing; using FFXIVClientStructs.FFXIV.Component.GUI; @@ -90,8 +91,9 @@ namespace Dalamud.Game.Internal { var systemText = Service.Get().GetExcelSheet()!.GetRow(1059)!.Text.RawString; // "System" var configuration = Service.Get(); + var interfaceManager = Service.Get(); - if (args.Title == systemText && configuration.DoButtonsSystemMenu) + if (args.Title == systemText && configuration.DoButtonsSystemMenu && interfaceManager.IsDispatchingEvents) { var dalamudInterface = Service.Get(); @@ -131,8 +133,9 @@ namespace Dalamud.Game.Internal } var configuration = Service.Get(); + var interfaceManager = Service.Get(); - if (!configuration.DoButtonsSystemMenu) + if (!configuration.DoButtonsSystemMenu || !interfaceManager.IsDispatchingEvents) { this.hookAgentHudOpenSystemMenu.Original(thisPtr, atkValueArgs, menuSize); return;