WoW:API GetContainerItemInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (inventory is equipped items not main bag)
(Confirmed that "readable" marks items that are read)
Line 13: Line 13:
:;;;: locked - true if locked; that is, a stack that cannot be split
:;;;: locked - true if locked; that is, a stack that cannot be split
:;;;: quality - the numeric quality of the item
:;;;: quality - the numeric quality of the item
:;;;: readable - true if the item can be "read" (as in a book)? -- [[User:Xenoveritas|Xenoveritas]] 17:27, 27 Feb 2005 (EST)
:;;;: readable - true if the item can be "read" (as in a book)
----
----
;''Examples''
;''Examples''
Line 30: Line 30:


: The texture variable will contain the item's texture and the itemCount variable will contain the number of that item in the slot.
: The texture variable will contain the item's texture and the itemCount variable will contain the number of that item in the slot.
: quality result does not appear to directly correspond with the color used to display the item name, it only appears to be defined for equipment (as opposed to trade items).
: readable simply marks if there is text related to the item.  When it's true, the default UI changes the cursor to the "Read" cursor (the magnifying glass) when the mouse is over the item button.


----
----
{{Template:WoW API}}
{{Template:WoW API}}
[[Category:API Inventory Functions|GetContainerItemInfo]]
[[Category:API Inventory Functions|GetContainerItemInfo]]

Revision as of 09:54, 3 March 2005

GetContainerItemInfo -Documentation by Arvenis-

Arguments
(bag,slot)
bag
number - number of the bag the item is in, 1 is your backpack, 2-5 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 = GetContainerItemInfo(1,2);
If you are only interested in one of these values you can use the _ character to ignore the texture or the itemCount.
local _,itemCount = GetContainerItemInfo(1,2);
local texture,_ = 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.
quality result does not appear to directly correspond with the color used to display the item name, it only appears to be defined for equipment (as opposed to trade items).
readable simply marks if there is text related to the item. When it's true, the default UI changes the cursor to the "Read" cursor (the magnifying glass) when the mouse is over the item button.

Template:WoW API