m
Move page script moved page API GetContainerItemInfo to WoW:API GetContainerItemInfo without leaving a redirect
(better summary of the locked return value) |
m (Move page script moved page API GetContainerItemInfo to WoW:API GetContainerItemInfo without leaving a redirect) |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{wowapi}} __NOTOC__ | {{wowapi}} __NOTOC__ | ||
texture, itemCount, locked, quality, readable = GetContainerItemInfo(bagID, slot); | texture, itemCount, locked, quality, readable, lootable, itemLink = GetContainerItemInfo(bagID, slot); | ||
== Parameters == | == Parameters == | ||
| Line 14: | Line 14: | ||
:;locked : [[Boolean]] - 1 if the item is locked by the server, nil otherwise. | :;locked : [[Boolean]] - 1 if the item is locked by the server, nil otherwise. | ||
:;quality : Number - the numeric quality of the item | :;quality : Number - the numeric quality of the item | ||
:;readable : [[Boolean - 1 if the item can be "read" (as in a book) | :;readable : [[Boolean]] - 1 if the item can be "read" (as in a book) | ||
:;lootable : [[Boolean]] - 1 if the item is a temporary container containing items that can be looted; otherwise nil. | |||
:;[[itemLink]] : a hyperlink for the item. | |||
== Example == | == Example == | ||
| Line 30: | Line 32: | ||
: An item in a character's inventory can become "locked" for a number of reasons. It might be locked because it is attached to the cursor, or because it has been split and the new stack is attached to the cursor, or because is in the "create auction" item slot, or because it is in a trade slot. In all of these cases, the item is considered to be "locked". Also, typically, the item's icon is shown in grayscale. The item will become unlocked when the action that locked the icon is complete. When the item's move is finished (and the server accepts the move), the item will become unlocked. When the server reports that the auction has been created, the item will become unlocked (although it will also disappear). During the period that the item is locked, some methods that affect the item (such as [[API PickupContainerItem|PickupContainerItem]]) silently fail. | : An item in a character's inventory can become "locked" for a number of reasons. It might be locked because it is attached to the cursor, or because it has been split and the new stack is attached to the cursor, or because is in the "create auction" item slot, or because it is in a trade slot. In all of these cases, the item is considered to be "locked". Also, typically, the item's icon is shown in grayscale. The item will become unlocked when the action that locked the icon is complete. When the item's move is finished (and the server accepts the move), the item will become unlocked. When the server reports that the auction has been created, the item will become unlocked (although it will also disappear). During the period that the item is locked, some methods that affect the item (such as [[API PickupContainerItem|PickupContainerItem]]) silently fail. | ||
== Example == | |||
/script DEFAULT_CHAT_FRAME:AddMessage( (select(2, GetContainerItemInfo(1,1))) ) | |||
=== Result === | |||
: This macro will print out the item count for the item located in slot 1 of bag 1. Different indices, instead of 2, can be used to slice out a specific return value. | |||