WoW:API GetContainerItemInfo: Difference between revisions

m
added name link
(Confirmed that "readable" marks items that are read)
m (added name link)
Line 1: Line 1:
<center>'''GetContainerItemInfo''' ''-Documentation by Arvenis-''</center>
<center>'''GetContainerItemInfo''' ''-Documentation by [[user:Arvenis|Arvenis]]-''</center>
----
----
;''Arguments''
;''Arguments''
Line 17: Line 17:
;''Examples''
;''Examples''


  local texture, itemCount = GetContainerItemInfo(1,2);
  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 the texture or the itemCount.
: If you are only interested in one of these values you can use the _ character to ignore one of them.


  local _,itemCount = GetContainerItemInfo(1,2);
  local _,itemCount,locked,quality,readable = GetContainerItemInfo(1,2);
  local texture,_ = 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:'' [[API_GetInventorySlotInfo|GetInventorySlotInfo]] to get the same information from a player's inventory (or equipped items).
''See also:'' [[API_GetInventorySlotInfo|GetInventorySlotInfo]] to get the same information from a player's inventory (or equipped items).
Line 31: Line 33:
: 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).
: 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).


: 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.
: 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.


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