From cb216f59412fa6dc619656489f3d290e76188e8c Mon Sep 17 00:00:00 2001 From: Sattva <74269253+Sattva-108@users.noreply.github.com> Date: Thu, 5 Jun 2025 16:40:11 +0300 Subject: [PATCH] feat: add disenchant roll warning bypass to NoConfirmLoot - Register CONFIRM_DISENCHANT_ROLL event for disenchant confirmations - Auto-confirm and hide popup when disenchanting valuable items --- Leatrix_Plus.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index d4f3fe9..4bec14f 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -839,11 +839,13 @@ function LeaPlusLC:Live() LpEvt:RegisterEvent("LOOT_BIND_CONFIRM") LpEvt:RegisterEvent("MERCHANT_CONFIRM_TRADE_TIMER_REMOVAL") LpEvt:RegisterEvent("MAIL_LOCK_SEND_ITEMS") + LpEvt:RegisterEvent("CONFIRM_DISENCHANT_ROLL") else LpEvt:UnregisterEvent("CONFIRM_LOOT_ROLL") LpEvt:UnregisterEvent("LOOT_BIND_CONFIRM") LpEvt:UnregisterEvent("MERCHANT_CONFIRM_TRADE_TIMER_REMOVAL") LpEvt:UnregisterEvent("MAIL_LOCK_SEND_ITEMS") + LpEvt:UnregisterEvent("CONFIRM_DISENCHANT_ROLL") end end @@ -16737,6 +16739,27 @@ local function eventHandler(self, event, arg1, arg2, ...) return end + -- Disable warning for attempting to disenchant items + if event == "CONFIRM_DISENCHANT_ROLL" then + ConfirmLootRoll(arg1, arg2) + StaticPopup_Hide("CONFIRM_DISENCHANT_ROLL") + return + end + + + local originalStaticPopupHide = StaticPopup_Hide + StaticPopup_Hide = function(which, data) + print("DEBUG StaticPopup_Hide called with:", which, data) + return originalStaticPopupHide(which, data) + end + + local originalStaticPopupShow = StaticPopup_Show + StaticPopup_Show = function(which, ...) + print("DEBUG StaticPopup_Show called with:", which, ...) + return originalStaticPopupShow(which, ...) + end + + function Leatrix_CustomSellCursorItem() -- Fetch the mouseovered item local bag, slot = GetMouseFocus():GetParent():GetID(), GetMouseFocus():GetID()