View Single Post
03-18-24, 12:42 PM   #7
Codger
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Mar 2021
Posts: 30
Working great now

Thank you for your help!!
It's working the way I want now.

Lua Code:
  1. local function getGearItemLvl(slotName)
  2.     local lvl = 0
  3.     if (slotName ~= nil) then
  4.         local slotID, texture, checkRelic = GetInventorySlotInfo(slotName)
  5.         --print("getGearItemLvl    " .. slotID .. "     " .. texture .. "     " .. tostring(checkRelic))
  6.         if (slotID ~= nil) then
  7.             local itemLocation = ItemLocation:CreateFromEquipmentSlot(slotID)
  8.             if C_Item.DoesItemExist(itemLocation) then
  9.                 lvl = C_Item.GetCurrentItemLevel(itemLocation)
  10.             end
  11.         end
  12.     end
  13.     --print("getGearItemLvl("..slotName..") " .. "  slotID: " .. slotID .. "  itemlevel: " .. lvl)
  14.     return format("%s", lvl)
  15. end

For anyone that needs this the slotName is one of "HeadSlot", "NeckSlot", "ShoulderSlot", "BackSlot"...

Last edited by Codger : 03-22-24 at 10:20 AM.
  Reply With Quote