fix: improved performance on bag->bank and bank->bag
This commit is contained in:
+2
-2
@@ -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
@@ -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
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user