Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Advertisement
GetContainerItemInfo -Documentation by Arvenis-

Arguments
(bagID,slot)
bagID
number - number of the bag the item is in, 0 is your backpack, 1-4 are the four additional bags
slot
number - slot number of the bag item you want the info for.

Returns
texture, itemCount, locked, quality, readable
texture - the texture for the item in the specified bag slot
itemCount - the number of items in the specified bag slot
locked - true if locked; that is, a stack that cannot be split
quality - the numeric quality of the item
readable - true if the item can be "read" (as in a book)

Examples
local texture, itemCount, locked, quality, readable = GetContainerItemInfo(1,2);
If you are only interested in one of these values you can use the _ character to ignore one of them.
local _,itemCount,locked,quality,readable = GetContainerItemInfo(1,2);
You can also omit variables if your only interested in the first few values.
local texture,itemCount = GetContainerItemInfo(1,2)

See also: GetInventorySlotInfo to get the same information from a player's inventory (or equipped items).


Result
The texture variable will contain the item's texture and the itemCount variable will contain the number of that item in the slot.
The quality return value does not appear to directly correspond with the color used to display the item name. In addition, it only appears to be defined for equipment (as opposed to trade items).
The readable return value simply indicates if there is text related to the item. If it's true, the default UI will change the cursor to the "Read" cursor (the magnifying glass) when the mouse is over the item button.
The locked return value appears to be set to true only on an item that is picked up via PickupContainerItem.



Template:WoW API

Advertisement