From 7b3c78b25504851e01a33f477bb52aacaccb82f6 Mon Sep 17 00:00:00 2001 From: AndyMM22 Date: Sat, 8 Aug 2026 03:29:42 +0200 Subject: [PATCH] Target the Openables button by itemID, not bag slot --- Modules/Openables.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Modules/Openables.lua b/Modules/Openables.lua index 533b0169..493d2fd3 100644 --- a/Modules/Openables.lua +++ b/Modules/Openables.lua @@ -9,7 +9,7 @@ als openbaar tellen → vals-positief). C_TooltipInfo.GetBagItem levert de tooltip- regels zonder zichtbaar frame; secret-values guarden we weg. - Openen = het item gebruiken via een SecureActionButton (type=item, item="bag slot"). + Openen = het item gebruiken via een SecureActionButton (type=item, item="item:"). Secure attributen/positie/zichtbaarheid mogen niet in combat gewijzigd worden — dus we (her)opbouwen alleen buiten combat; een state-driver verbergt de knop in combat. ]] @@ -216,13 +216,14 @@ local MAXROWS = 12 local frame -- main secure button (UIParent) local function ApplyOpenAttr(btn, entry) - -- Alleen buiten combat: secure "gebruik item"-attribuut op bag/slot. + -- Alleen buiten combat: secure "gebruik item"-attribuut. + -- Target by itemID: a bag/slot attribute breaks as soon as that slot empties. if InCombatLockdown and InCombatLockdown() then return end - if entry then + if entry and entry.itemID then btn:SetAttribute("type", "item") - btn:SetAttribute("item", entry.bag .. " " .. entry.slot) + btn:SetAttribute("item", ("item:%d"):format(entry.itemID)) else btn:SetAttribute("type", nil) btn:SetAttribute("item", nil)