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:
@@ -258,12 +258,8 @@ pfUI:RegisterModule("swingtimer", function ()
|
||||
-- weapons (22); main-hand-only (21) can never sit there.
|
||||
local OH_WEAPON_TYPES = { [13]=true, [22]=true }
|
||||
local function HasOffhandWeapon()
|
||||
local l = GetInventoryItemLink("player", 17)
|
||||
if not l then return false end
|
||||
local _, _, id = string.find(l, "item:(%d+)")
|
||||
id = tonumber(id)
|
||||
if not id then return false end
|
||||
return OH_WEAPON_TYPES[C_Item.GetItemInventoryTypeByID(id)] == true
|
||||
local invType = C_Item.GetItemInventoryType({ equipmentSlotIndex = INVSLOT_OFFHAND })
|
||||
return OH_WEAPON_TYPES[invType] == true
|
||||
end
|
||||
|
||||
local function UpdateWeaponSpeeds()
|
||||
|
||||
Reference in New Issue
Block a user