WoW:API GetItemInfo: Difference between revisions

no edit summary
mNo edit summary
No edit summary
Line 3: Line 3:
Return information about a specific item.
Return information about a specific item.


  args = GetItemInfo(itemID | "itemLink");
  args = GetItemInfo(itemID | "itemString");
== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
:(itemID or "itemLink")
:(itemID or "itemString")


:;itemID : Integer - The numeric ID of the item. ie. 12345
:;itemID : Integer - The numeric ID of the item. ie. 12345
:;"itemLink" : String - The item link. ie. "item:12345:0:0:0"
:;"itemString" : String - The full item ID in string format. ie. "item:12345:0:0:0"


=== Returns ===
=== Returns ===
Line 21: Line 21:
:;itemSubType : String - The sub type of the item. Enchanting, Cloth, Sword, 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.
:;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 <i>nil</i> if it can't be equipped. ''-- Added in 1.7 --''
:;itemEquipLoc : String - Equip location of the item specified, eg. "Hands", "Legs", etc or "" (a string of 0 length) if it can't be equipped. ''Note: until 1.9 this returns "" for ammo and most range items -- Added in 1.7 --''


== Example ==
== Example ==
Line 33: Line 33:
: This function will <b>ONLY</b> retrieve data that is in your local cache.
: This function will <b>ONLY</b> 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''.
: If you have never seen the item that belongs to the Item ID or Item Link it will return ''nil''.
 
: All string returns (itemName, itemType, itemSubType, itemEquipLoc(until 1.9)) are localized.
<br><center><i>Last updated: Patch 1.6.1</i></center>
: itemString is a subset of an item's link, not the actual link returned from functions like GetContainerItemLink()
----
----
__NOTOC__
__NOTOC__
Anonymous user