mirror of
https://github.com/brues-code/pfUI.git
synced 2026-11-01 00:16:56 +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:
+10
-16
@@ -209,23 +209,17 @@ pfUI:RegisterModule("loothistory", function ()
|
||||
local isExpanded = rollID and expanded[rollID]
|
||||
SetToggleTexture(f.toggle, isExpanded)
|
||||
|
||||
-- Item icon/name/quality via the ClassicAPI Item mixin. When the item
|
||||
-- isn't cached yet, show a placeholder and re-paint this row from the
|
||||
-- ContinueOnItemLoad callback (guarded on rollID: rows are pooled, so the
|
||||
-- Item icon/name/quality via the ClassicAPI Item mixin. The row shows a
|
||||
-- placeholder until ContinueOnItemLoad paints it, which happens at once
|
||||
-- when the item is cached (guarded on rollID: rows are pooled, so the
|
||||
-- callback must no-op if the row has since been reused for another roll).
|
||||
local item = itemLink and Item:CreateFromItemLink(itemLink)
|
||||
if item and not item:IsItemEmpty() then
|
||||
if item:IsItemDataCached() then
|
||||
RenderItemVisual(f, item)
|
||||
else
|
||||
ShowRetrieving(f)
|
||||
local pending = rollID
|
||||
item:ContinueOnItemLoad(function()
|
||||
if f.rollID == pending then RenderItemVisual(f, item) end
|
||||
end)
|
||||
end
|
||||
else
|
||||
ShowRetrieving(f)
|
||||
ShowRetrieving(f)
|
||||
if itemLink then
|
||||
local item = Item:CreateFromItemLink(itemLink)
|
||||
local pending = rollID
|
||||
item:ContinueOnItemLoad(function()
|
||||
if f.rollID == pending then RenderItemVisual(f, item) end
|
||||
end)
|
||||
end
|
||||
|
||||
-- winner summary only on a decided, collapsed row
|
||||
|
||||
Reference in New Issue
Block a user