lua Code:
local function GetWornGear()
local gear = {emptySlots = {}}
local gearName = {}
for _, gearSlot in ipairs(DressingRoom.gearSlots) do
local itemId = GetItemUniqueId(BAG_WORN, gearSlot)
if itemId then
gear[Id64ToString(itemId)] = gearSlot
local icon = GetItemInfo(BAG_WORN, gearSlot)
gearName[#gearName+1] = ZO_CachedStrFormat("|t100%:100%:<<1>>|t <<t:2>>", icon, GetItemLink(BAG_WORN, gearSlot, LINK_STYLE_DEFAULT))
elseif not ((gearSlot == EQUIP_SLOT_OFF_HAND and DressingRoom.twoHanded[GetItemWeaponType(BAG_WORN, EQUIP_SLOT_MAIN_HAND)])
or (gearSlot == EQUIP_SLOT_BACKUP_OFF and DressingRoom.twoHanded[GetItemWeaponType(BAG_WORN, EQUIP_SLOT_BACKUP_MAIN)])) then
-- save empty slots; off-hand is not considered empty if a two-handed weapon is equipped
table.insert(gear.emptySlots, gearSlot)
end
end
return gear, gearName
end