Update for GetItemInfo in patch 2.0
No edit summary |
(Update for GetItemInfo in patch 2.0) |
||
| Line 3: | Line 3: | ||
Return information about a specific item. | Return information about a specific item. | ||
args = GetItemInfo(itemID or "itemString"); | args = GetItemInfo(itemID or "itemString" or "itemLink"); --Item Links allowed after patch 2.0 | ||
== Parameters == | == Parameters == | ||
=== Arguments === | === Arguments === | ||
:(itemId or "[[itemString]]") | :(itemId or "[[itemString]]" or "[[itemLink]]") | ||
:;itemId : Integer - The numeric ID of the item. ie. 12345 | :;itemId : Integer - The numeric ID of the item. ie. 12345 | ||
| Line 12: | Line 12: | ||
=== Returns === | === Returns === | ||
:itemName, | :itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, invTexture | ||
:;itemName : String - The name of the item. | :;itemName : String - The name of the item. | ||
| Line 25: | Line 25: | ||
== Example == | == Example == | ||
local sName, sLink, | local sName, sLink, iRarity, iLevel, iMinLevel, sType, sSubType, iStackCount = GetItemInfo(16846); | ||
message(sName..",".. | message(sName..","..iRarity..","..sType..","..iStackCount); | ||
====Result==== | ====Result==== | ||
| Line 38: | Line 38: | ||
== Common usage == | == Common usage == | ||
<b>Note:</b> It is no longer necessary to take the item ID out of the link to use it with GetItemInfo since patch 2.0 | |||
function GetItemInfoFromItemLink(link) | function GetItemInfoFromItemLink(link) | ||
local itemId = nil; | local itemId = nil; | ||