Wait on ContinueOnItemLoad for inbox, panel and loot history items

The inbox package border now waits for the item to load, since another
player's item may not be cached. The panel and loot history drop their
cached branch: ContinueOnItemLoad runs at once for a cached item. The
swing timer reads the off-hand inventory type from the slot instead of
parsing the item link.
This commit is contained in:
Brues
2026-10-30 21:44:37 -05:00
parent bfe1864aa1
commit 1b71ee617f
4 changed files with 29 additions and 40 deletions
+5 -11
View File
@@ -575,18 +575,12 @@ pfUI:RegisterModule("panel", function()
blindpowder = 5530
}
-- runs at once when the item is cached
local function AddItemToPanel(panelType)
local itemID = itemIDs[panelType]
if C_Item.IsItemDataCachedByID(itemID) then
local itemName, count = C_Item.GetItemNameByID(itemID), C_Item.GetItemCount(itemID)
pfUI.panel:OutputPanel(panelType, itemName .. ": " .. count)
else
local item = Item:CreateFromItemID(itemID)
item:ContinueOnItemLoad(function()
local itemName, count = item:GetItemName(), C_Item.GetItemCount(item:GetItemID())
pfUI.panel:OutputPanel(panelType, itemName .. ": " .. count)
end)
end
local item = Item:CreateFromItemID(itemIDs[panelType])
item:ContinueOnItemLoad(function()
pfUI.panel:OutputPanel(panelType, item:GetItemName() .. ": " .. C_Item.GetItemCount(item:GetItemID()))
end)
end
local class = UnitClassBase('player')