fix: improved performance on bag->bank and bank->bag

This commit is contained in:
Salikh Gurgenidze
2026-01-24 04:32:31 +04:00
parent f443154f0d
commit c23c3ed7ad
3 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -191,7 +191,7 @@ function BagFrame:UpdateSingleSlot(bagID, slotID)
-- Find the button for this slot in itemButtons
local targetButton = nil
for _, button in ipairs(itemButtons) do
if button.bagID == bagID and button.slot == slotID then
if button.bagID == bagID and button.slotID == slotID then
targetButton = button
break
end
@@ -248,7 +248,7 @@ function BagFrame:UpdateChangedSlots(bagID)
-- Find button for this slot
local targetButton = nil
for _, button in ipairs(itemButtons) do
if button.bagID == bagID and button.slot == slotID then
if button.bagID == bagID and button.slotID == slotID then
targetButton = button
break
end
+1 -1
View File
@@ -141,7 +141,7 @@ function BankFrame:UpdateSingleSlot(bagID, slotID)
local targetButton = nil
for button in pairs(bankBagParent.itemButtons) do
if button.bagID == bagID and button.slot == slotID then
if button.bagID == bagID and button.slotID == slotID then
targetButton = button
break
end
+1 -2
View File
@@ -355,8 +355,7 @@ function Guda_ItemButton_OnLoad(self)
self.questIcon = iconFrame
end
-- Create junk icon overlay (vendor sell icon in top-left corner)
CreateJunkIcon(self)
-- Note: Junk icon is acquired from pool on-demand in UpdateJunkIcon, not pre-created
-- Ensure the item button sits above its container backdrop and is mouse-enabled
local parent = self:GetParent()