Thank you for the help.
It's working now... had a bit of trouble with empty slots and used a clunky workaround by looking at the texture. I'm sure there must be a better way to detect an empty slot but haven't found it yet.
Here's what I have now...
Lua Code:
local function getGearItemLvl(slotName)
local lvl = 0
local slotID, texture, checkRelic = GetInventorySlotInfo(slotName)
if (slotID ~= nil) then
if (texture ~= 136525) then
local itemLocation = ItemLocation:CreateFromEquipmentSlot(slotID)
if (itemLocation ~= nil) then
lvl = C_Item.GetCurrentItemLevel(itemLocation)
end
end
end
--print("getGearItemLvl("..slotName..") " .. " slotID: " .. slotID .. " itemlevel: " .. lvl)
return format("%s", lvl)
end