WoW:API GetItemInfo
Return information about a specific item.
args = GetItemInfo(itemID | "itemLink");
Parameters
Arguments
- (itemID or "itemLink")
- itemID
- Integer - The numeric ID of the item. ie. 12345
- "itemLink"
- String - The item link. ie. "item:12345:0:0:0"
Returns
- itemName, itemLink, itemRarity, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc
- itemName
- String - The name of the item.
- itemLink
- String - The item link ie. "item:12345:0:0:0".
- itemRarity
- Integer - The value is 0 to 5, which represents Poor to Legendary.
- itemMinLeveL
- Integer - The minimum level required to use the item, 0 being no level requirement.
- itemType
- String - The type of the item. Armor, Weapon, Quest, Key, etc.
- itemSubType
- String - The sub type of the item. Enchanting, Cloth, Sword, etc.
- itemStackCount
- Integer - How many of the item per stack. ie. 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc.
- itemEquipLoc
- String - Equip location of the item specified, eg. "Hands", "Legs", etc or nil if it can't be equipped. -- Added in 1.7 --
Example
local sName, sLink, iQuality, iLevel, sType, sSubType, iCount = GetItemInfo(16846); message(sName..","..iQuality..","..sType..","..iCount);
Result
- Message box will pop-up with - "Gianstalker's Helmet,4,Armor,1".
Details
- This function will ONLY retrieve data that is in your local cache.
- If you have never seen the item that belongs to the Item ID or Item Link it will return nil.