mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-21 11:50:49 +00:00
bags: make sure bag slot frame is initialized
This commit is contained in:
+4
-4
@@ -662,14 +662,14 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function ()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function pfUI.bag:UpdateCooldowns()
|
function pfUI.bag:UpdateCooldowns()
|
||||||
|
local frame
|
||||||
for bag=-2, 11 do
|
for bag=-2, 11 do
|
||||||
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 pfUI.bags[bag].slots[slot].frame.hasItem then
|
frame = pfUI.bags[bag] and pfUI.bags[bag].slots[slot] and pfUI.bags[bag].slots[slot].frame
|
||||||
if _G[pfUI.bags[bag].slots[slot].frame:GetName() .. "Cooldown"] then
|
if frame and frame.hasItem and _G[frame:GetName() .. "Cooldown"] then
|
||||||
ContainerFrame_UpdateCooldown(bag, pfUI.bags[bag].slots[slot].frame)
|
ContainerFrame_UpdateCooldown(bag, frame)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user