From 64a8539bc38855c4f754a79785d4b01b94dafaa4 Mon Sep 17 00:00:00 2001 From: David Higueros <111460331+TheDavSmasher@users.noreply.github.com> Date: Mon, 2 Nov 2026 19:52:45 -0700 Subject: [PATCH] Simplified to single ClickHandler call --- MiraAPI/Hud/CustomActionButton.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/MiraAPI/Hud/CustomActionButton.cs b/MiraAPI/Hud/CustomActionButton.cs index ce91ad57..079b33df 100644 --- a/MiraAPI/Hud/CustomActionButton.cs +++ b/MiraAPI/Hud/CustomActionButton.cs @@ -179,14 +179,8 @@ public abstract class CustomActionButton MiraEventManager.InvokeEvent(cancelEvent, cancelEventType); } - if (specificInvoked) - { - if (!@event.IsCancelled) ClickHandler(); - } - else - { - if (!genericEvent.IsCancelled) ClickHandler(); - } + MiraCancelableEvent eventCheck = specificInvoked ? @event : genericEvent; + if (!eventCheck.IsCancelled) ClickHandler(); })); if (Keybind == null) return;