m (→Returns: docs for return 6 and 7) |
User-6548696 (talk | contribs) mNo edit summary |
||
Line 35: | Line 35: | ||
==Patch changes== |
==Patch changes== |
||
*{{Patch 7.0.3|note=Added.}} |
*{{Patch 7.0.3|note=Added.}} |
||
+ | |||
+ | ==See Also== |
||
+ | * {{api|GetItemInfo}} |
||
+ | * {{api|GetContainerItemInfo}} |
Revision as of 13:40, 11 August 2018
Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Return information about a specific item. Though it is not documented, it apparently returns info available directly in client files. Because of that it returns less data, but have several advantages over GetItemInfo: it always return data, when GetItemInfo can return nil for valid, but not loaded items and it never initiates requests to server, that could be subject to throttling or forced disconnection.
itemID, itemType, itemSubType, itemEquipLoc, iconFileDataID, _, _ = GetItemInfoInstant(itemID or "itemString" or "itemName" or "itemLink")
Arguments
One of the following four ways to specify which item to query:
- itemId
- Number - Numeric ID of the item. e.g. 30234 for [Nordrassil Wrath-Kilt]
- itemName
- String - Name of an item owned by the player at some point during this play session, e.g. "Nordrassil Wrath-Kilt".
- itemString
- String - A fragment of the itemString for the item, e.g. "item:30234:0:0:0:0:0:0:0" or "item:30234".
- itemLink
- String - The full itemLink.
Returns
Index | Value | Type | Details |
---|---|---|---|
1 | itemID | Number | ID of the item. |
2 | itemType | String | The type of the item: Armor, Weapon, Quest, Key, etc. |
3 | itemSubType | String | The sub-type of the item: Enchanting, Cloth, Sword, etc. See itemType. |
4 | itemEquipLoc | String | The type of inventory equipment location in which the item may be equipped, or "" if it can't be equippable. The string returned is also the name of a global string variable e.g. if "INVTYPE_WEAPONMAINHAND" is returned, _G["INVTYPE_WEAPONMAINHAND"] will be the localized, displayable name of the location. |
5 | iconFileDataID | Number | The FileDataID for the icon texture for the item. |
6 | itemClassID | Number | This is the numerical value that determines the string to display for 'itemType'. |
7 | itemSubClassID | Number | This is the numerical value that determines the string to display for 'itemSubType' |
Details
- itemType and itemSubType are localized.
Patch changes
- Patch 7.0.3 (2016-07-19): Added.