From b86ce8adef1363e5b7f8b8af3dda52eab7376db8 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 9 Nov 2019 20:14:46 +0100 Subject: [PATCH] bags: fix icon textures on bank bag slots --- modules/bags.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/bags.lua b/modules/bags.lua index 6171b618..dd2c3477 100644 --- a/modules/bags.lua +++ b/modules/bags.lua @@ -493,6 +493,17 @@ pfUI:RegisterModule("bags", "vanilla:tbc", function () pfUI.bag:UpdateBag(this.slot + 1) SlotLeave() end) + + -- On TBC, the OnEvent function of the template scans for framenames, + -- and obviously doesn't know the pf-Names. Therefore, triggering + -- the update function on each frame manually + if frame == pfUI.bag.left and BankFrameItemButton_Update then + local SlotUpdate = frame.bagslots.slots[slot].frame:GetScript("OnUpdate") + frame.bagslots.slots[slot].frame:SetScript("OnUpdate", function() + if SlotUpdate then SlotUpdate(this) end + BankFrameItemButton_Update(this) + end) + end end local left = (slot-min)*(frame.button_size/5*4+default_border*2) + default_border