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
|
-- Find the button for this slot in itemButtons
|
||||||
local targetButton = nil
|
local targetButton = nil
|
||||||
for _, button in ipairs(itemButtons) do
|
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
|
targetButton = button
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -248,7 +248,7 @@ function BagFrame:UpdateChangedSlots(bagID)
|
|||||||
-- Find button for this slot
|
-- Find button for this slot
|
||||||
local targetButton = nil
|
local targetButton = nil
|
||||||
for _, button in ipairs(itemButtons) do
|
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
|
targetButton = button
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-1
@@ -141,7 +141,7 @@ function BankFrame:UpdateSingleSlot(bagID, slotID)
|
|||||||
|
|
||||||
local targetButton = nil
|
local targetButton = nil
|
||||||
for button in pairs(bankBagParent.itemButtons) do
|
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
|
targetButton = button
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
+1
-2
@@ -355,8 +355,7 @@ function Guda_ItemButton_OnLoad(self)
|
|||||||
self.questIcon = iconFrame
|
self.questIcon = iconFrame
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Create junk icon overlay (vendor sell icon in top-left corner)
|
-- Note: Junk icon is acquired from pool on-demand in UpdateJunkIcon, not pre-created
|
||||||
CreateJunkIcon(self)
|
|
||||||
|
|
||||||
-- Ensure the item button sits above its container backdrop and is mouse-enabled
|
-- Ensure the item button sits above its container backdrop and is mouse-enabled
|
||||||
local parent = self:GetParent()
|
local parent = self:GetParent()
|
||||||
|
|||||||
Reference in New Issue
Block a user