mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 14:00:48 +00:00
bags: only refresh if it has an item
This commit is contained in:
+9
-1
@@ -82,7 +82,9 @@ 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
|
||||||
ContainerFrame_UpdateCooldown(bag, pfUI.bags[bag].slots[slot].frame)
|
if pfUI.bags[bag].slots[slot].frame.hasItem then
|
||||||
|
ContainerFrame_UpdateCooldown(bag, pfUI.bags[bag].slots[slot].frame)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -253,6 +255,12 @@ pfUI:RegisterModule("bags", function ()
|
|||||||
SetItemButtonCount(pfUI.bags[bag].slots[slot].frame, count)
|
SetItemButtonCount(pfUI.bags[bag].slots[slot].frame, count)
|
||||||
SetItemButtonDesaturated(pfUI.bags[bag].slots[slot].frame, locked, 0.5, 0.5, 0.5)
|
SetItemButtonDesaturated(pfUI.bags[bag].slots[slot].frame, locked, 0.5, 0.5, 0.5)
|
||||||
|
|
||||||
|
if texture then
|
||||||
|
pfUI.bags[bag].slots[slot].frame.hasItem = 1
|
||||||
|
else
|
||||||
|
pfUI.bags[bag].slots[slot].frame.hasItem = nil
|
||||||
|
end
|
||||||
|
|
||||||
-- bankframe does not support cooldowns
|
-- bankframe does not support cooldowns
|
||||||
if bag ~= -1 then
|
if bag ~= -1 then
|
||||||
ContainerFrame_UpdateCooldown(bag, pfUI.bags[bag].slots[slot].frame)
|
ContainerFrame_UpdateCooldown(bag, pfUI.bags[bag].slots[slot].frame)
|
||||||
|
|||||||
Reference in New Issue
Block a user