C_Item.GetItemInfoInstant

From Warcraft Wiki
(Redirected from API GetItemInfoInstant)
Jump to navigation Jump to search
GitHub Octocat.png  Townlong-Yak BAD.png  ProfIcons engineering.png  BTNTemp.png C_Item.GetItemInfoInstant TheWarWithin-Icon-Inline.pngDragonflight-Icon-Inline.pngCata-Logo-Small.pngWoW Icon update.png + 10.2.6
BTNTemp.png GetItemInfoInstant Wrath-Logo-Small.png + 7.0.3 / 1.13.2

Returns readily available info for an item.

itemID, itemType, itemSubType, itemEquipLoc, icon, classID, subClassID = C_Item.GetItemInfoInstant(itemInfo)

Arguments

item
number|string : Item ID, Link or Name
  • Accepts any valid item ID.
  • Accepts an item link, or minimally in item:%d format.
  • Accepts a localized item name but this requires the item to be or have been in the player's inventory (bags/bank) for that session.

Returns

itemID
number - ID of the item.
itemType
string : ItemType - The localized type name of the item: Armor, Weapon, Quest, etc.
itemSubType
string : ItemType - The localized sub-type name of the item: Bows, Guns, Staves, etc.
itemEquipLoc
string : ItemEquipLoc - The inventory equipment location in which the item may be equipped e.g. "INVTYPE_HEAD", or an empty string if it cannot be equipped.
icon
number : fileID - The texture for the item icon.
classID
number : ItemType - The numeric ID of itemType
subClassID
number : ItemType - The numeric ID of itemSubType

Details

  • This function only returns info that don't require a query to the server. Which has the advantage over GetItemInfo() it will always return data for valid items.

Example

/dump GetItemInfoInstant(4306)

[1] = 4306,         -- itemID
[2] = "Tradeskill", -- itemType
[3] = "Cloth",      -- itemSubType
[4] = "",           -- itemEquipLoc
[5] = 132905,       -- icon
[6] = 7,            -- classID
[7] = 5             -- subclassID

Patch changes

Dragonflight Patch 10.2.6 (2024-03-19): Namespaced to C_Item.GetItemInfoInstant.
Legion Patch 7.0.3 (2016-07-19): Added.