mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-31 16:06:57 +00:00
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:
+5
-11
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user