Originally Posted by
SlippyCheeze
Please post some information about the solution, so that other people with the same problem can benefit from what you learned.
Sure!
This is what I made after learning how to do it:
Basically you need to use the item Link and NOT the item ID. If you use the link, it contains the hyperlink full of information which tells the program what enchants, gems, and raid difficulty the actual item has rather than just using the item ID which just gets the basic, generic item from the database.
Here is the solution:
Code:
local slotID = GetInventorySlotInfo(slotName)
local itemLink = GetInventoryItemLink("player", slotID)
local _, _, _, ilvl = GetItemInfo(itemLink)
where slotName is just each one of these with "Slot" concatenated at the end of the String:
Code:
local slots = {"Head", "Neck", "Shoulder", "Back", "Chest", "Shirt", "Tabard", "Wrist", "Waist", "Legs", "Feet", "Hands", "Finger0", "Finger1", "Trinket0", "Trinket1", "MainHand", "SecondaryHand"}
Happy programming!