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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user