GetItemInfoInstant

From Wowpedia
Revision as of 19:08, 9 December 2020 by Ketho (talk | contribs) (→‎Returns)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Game Flavors
Links
Patch
Added in 7.0.3 / 1.13.2

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 : ItemType - 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 : Enum.InventoryType - 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 : ItemType - This is the numerical value that determines the string to display for itemType
7. itemSubClassID
Number : ItemType - 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