mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-22 12:10:48 +00:00
use IsContainerItemOpenable and bump minimum ClassicAPI version to 1.2.1
This commit is contained in:
+5
-9
@@ -285,15 +285,11 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
local bagsize = GetContainerNumSlots(bag)
|
local bagsize = GetContainerNumSlots(bag)
|
||||||
if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end
|
if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end
|
||||||
for slot=1, bagsize do
|
for slot=1, bagsize do
|
||||||
if GetContainerItemInfo(bag, slot) then
|
if C_Container.IsContainerItemOpenable(bag, slot) then
|
||||||
scanner:SetBagItem(bag, slot)
|
openable.bag = bag
|
||||||
|
openable.slot = slot
|
||||||
if scanner:Find(_G.ITEM_OPENABLE, true) then
|
openable.icon = GetContainerItemInfo(bag, slot)
|
||||||
openable.bag = bag
|
return openable.bag, openable.slot
|
||||||
openable.slot = slot
|
|
||||||
openable.icon = GetContainerItemInfo(bag, slot)
|
|
||||||
return openable.bag, openable.slot
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -25,11 +25,8 @@ pfUI.bootup = true
|
|||||||
|
|
||||||
-- ClassicAPI dependency check.
|
-- ClassicAPI dependency check.
|
||||||
-- pfUI relies pervasively on the modern C_* / SuperWoW / nameplate / focus
|
-- pfUI relies pervasively on the modern C_* / SuperWoW / nameplate / focus
|
||||||
-- API surface that ClassicAPI polyfills, so presence is required (not
|
-- API surface that ClassicAPI polyfills, so presence is required.
|
||||||
-- optional). Without it, users would otherwise see a flood of "attempt to
|
local PFUI_CLASSIC_API_MIN = 10201 -- v1.2.0 (X*10000 + Y*100 + Z)
|
||||||
-- 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)
|
|
||||||
if not CLASSIC_API_VERSION or CLASSIC_API_VERSION < PFUI_CLASSIC_API_MIN then
|
if not CLASSIC_API_VERSION or CLASSIC_API_VERSION < PFUI_CLASSIC_API_MIN then
|
||||||
pfUI.disabled = true
|
pfUI.disabled = true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user