API GetItemInfoInstant

From Wowpedia
Jump to: navigation, search

Returns instantly-available information about a specific item.

itemID, itemType, itemSubType, itemEquipLoc, icon, itemClassID, itemSubClassID = 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

1. itemID
Number - ID of the item.
2. itemType
String - The localized type of the item: Armor, Weapon, Quest, Key, etc.
3. itemSubType
String (itemType) - The localized sub-type of the item: Enchanting, Cloth, Sword, etc.
4. itemEquipLoc
String (itemEquipLoc) - The type of inventory equipment location in which the item may be equipped, or "" if it can't be equipped. 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. icon
Number (fileID) - The icon texture of the icon.
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

  • Though it is not documented, this function 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.

Patch changes

See Also