Navigation menu

WoW:API GetItemInfo: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
m (Robot: converting/fixing HTML)
mNo edit summary
Line 1: Line 1:
{{wowapi}}__NOTOC__
{{wowapi}}__NOTOC__
Return information about a specific item.
Return information about a specific item.
itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture = GetItemInfo(itemID or "itemString" or "itemName" or "itemLink");


args = GetItemInfo(itemID or "itemString" or "itemName" or "itemLink"); --Item Links allowed after patch 2.0
== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
Line 16: Line 15:
:itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, invTexture
:itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, invTexture


:;1)itemName : String - The name of the item.
:;itemName : String - The name of the item.
:;2)[[itemLink]] : String - The item Link; you will see the clickable Link instead of the string. (String ex: "|cFFFFFFFF|Hitem:12345:0:0:0|h[Item Name]|h|r")
:;[[itemLink]] : String - The item Link; you will see the clickable Link instead of the string. (String ex: "|cFFFFFFFF|Hitem:12345:0:0:0|h[Item Name]|h|r")
:;3)itemRarity : Integer - The [[API TYPE Quality|quality]] of the item.  The value is 0 to 6, which represents Poor to Artifact.
:;itemRarity : Integer - The [[API TYPE Quality|quality]] of the item.  The value is 0 to 6, which represents Poor to Artifact.
:;4)itemLeveL : Integer - The item level of this item.
:;itemLevel : Integer - The item level of this item.
:;5)itemMinLeveL : Integer - The minimum level required to use the item, 0 being no level requirement.
:;itemMinLevel : Integer - The minimum level required to use the item, 0 being no level requirement.
:;6)[[itemType]] : String - The type of the item. Armor, Weapon, Quest, Key, etc.
:;[[itemType]] : String - The type of the item. Armor, Weapon, Quest, Key, etc.
:;7)itemSubType : String - The sub type of the item. Enchanting, Cloth, Sword, etc. See [[itemType]].
:;itemSubType : String - The sub type of the item. Enchanting, Cloth, Sword, etc. See [[itemType]].
:;8)itemStackCount : Integer - How many of the item per stack. ie. 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc.
:;itemStackCount : Integer - How many of the item per stack. ie. 20 for Runecloth, 1 for weapon, 100 for Alterac Ram Hide, etc.
:;9)[[itemEquipLoc]] : String - Where the item may be equipped, if it can. The string returned is also the name of a global string variable, i.e. for "INVTYPE_HEAD" there is a INVTYPE_HEAD variable containing a localized, displayable name of the location.
:;[[itemEquipLoc]] : String - Where the item may be equipped, if it can. The string returned is also the name of a global string variable, i.e. for "INVTYPE_HEAD" there is a INVTYPE_HEAD variable containing a localized, displayable name of the location.
:;10)itemTexture : String - The name and path for the inventory icon texture for the item.
:;itemTexture : String - The name and path for the inventory icon texture for the item.


== Example ==
== Example ==