WoW:API GetContainerItemInfo: Difference between revisions

better summary of the locked return value
(better summary of the locked return value)
Line 12: Line 12:
:;texture : String - the texture for the item in the specified bag slot
:;texture : String - the texture for the item in the specified bag slot
:;itemCount : Number - the number of items in the specified bag slot
:;itemCount : Number - the number of items in the specified bag slot
:;locked : [[Boolean]] - 1 if locked; that is, a stack that cannot be split (?)
:;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)
Line 29: Line 29:
: 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 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 [[API PickupContainerItem|PickupContainerItem]].
: 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.
Anonymous user