Hi,
I use the following code to display the "item level" of an item (all items except armor and weapon) next to its name. Ex: "Heavy Kodo Stew (35)".
Lua Code:
local function Add_Item_Level(tooltip)
local item = tooltip:GetItem()
if item ~= nil then
local itemLevel = select(4, GetItemInfo(item))
local itemType = select(6, GetItemInfo(item))
if itemType ~= "Armor" and itemType ~= "Weapon" and itemLevel ~= nil then
tooltip:AppendText(" |cffffd100("..itemLevel..")")
end
end
end
GameTooltip:HookScript("OnTooltipSetItem", Add_Item_Level)
When I open a profession window (e.g. Blacksmithing) and bring the cursor over a resulting item, the item level is displayed only for items that I posses. For example, I have
Dense Grinding Stone, its item level is displayed:
http://imgur.com/kTrxxbP
On the other hand, I don't have
Heavy Grinding Stone, its item level is not displayed:
http://imgur.com/8GwaR95
Any ideas why it is not displaying on items I don't have, and how to make it display?
Thanks.