From b8da28ebacf7232db7216897afe3dda57ab7072f Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Thu, 28 May 2026 14:59:31 -0500 Subject: [PATCH] use IsContainerItemOpenable and bump minimum ClassicAPI version to 1.2.1 --- modules/bags.lua | 14 +++++--------- pfUI.lua | 7 ++----- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/modules/bags.lua b/modules/bags.lua index d24ac846..21e467e1 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -285,15 +285,11 @@ pfUI:RegisterModule("bags", function () local bagsize = GetContainerNumSlots(bag) if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end for slot=1, bagsize do - if GetContainerItemInfo(bag, slot) then - scanner:SetBagItem(bag, slot) - - if scanner:Find(_G.ITEM_OPENABLE, true) then - openable.bag = bag - openable.slot = slot - openable.icon = GetContainerItemInfo(bag, slot) - return openable.bag, openable.slot - end + if C_Container.IsContainerItemOpenable(bag, slot) then + openable.bag = bag + openable.slot = slot + openable.icon = GetContainerItemInfo(bag, slot) + return openable.bag, openable.slot end end end diff --git a/pfUI.lua b/pfUI.lua index 58a18009..9a97a379 100644 --- a/pfUI.lua +++ b/pfUI.lua @@ -25,11 +25,8 @@ pfUI.bootup = true -- ClassicAPI dependency check. -- pfUI relies pervasively on the modern C_* / SuperWoW / nameplate / focus --- API surface that ClassicAPI polyfills, so presence is required (not --- optional). Without it, users would otherwise see a flood of "attempt to --- index a nil value" errors as each module tries to call C_Container / --- C_Item / C_UnitAuras / C_NamePlate / FocusUnit / etc. -local PFUI_CLASSIC_API_MIN = 10200 -- v1.2.0 (X*10000 + Y*100 + Z) +-- API surface that ClassicAPI polyfills, so presence is required. +local PFUI_CLASSIC_API_MIN = 10201 -- v1.2.0 (X*10000 + Y*100 + Z) if not CLASSIC_API_VERSION or CLASSIC_API_VERSION < PFUI_CLASSIC_API_MIN then pfUI.disabled = true