Skip to content

Commit

Permalink
bags: make sure bag slot frame is initialized
Browse files Browse the repository at this point in the history
  • Loading branch information
shagu committed Sep 18, 2024
1 parent b00dc9e commit fd4df67
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -662,14 +662,14 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function ()
end

function pfUI.bag:UpdateCooldowns()
local frame
for bag=-2, 11 do
local bagsize = GetContainerNumSlots(bag)
if bag == -2 and pfUI.bag.showKeyring == true then bagsize = GetKeyRingSize() end
for slot=1, bagsize do
if pfUI.bags[bag].slots[slot].frame.hasItem then
if _G[pfUI.bags[bag].slots[slot].frame:GetName() .. "Cooldown"] then
ContainerFrame_UpdateCooldown(bag, pfUI.bags[bag].slots[slot].frame)
end
frame = pfUI.bags[bag] and pfUI.bags[bag].slots[slot] and pfUI.bags[bag].slots[slot].frame
if frame and frame.hasItem and _G[frame:GetName() .. "Cooldown"] then
ContainerFrame_UpdateCooldown(bag, frame)
end
end
end
Expand Down

0 comments on commit fd4df67

Please sign in to comment.