WoW:API GetInventoryItemCount: Difference between revisions

m
Move page script moved page API GetInventoryItemCount to WoW:API GetInventoryItemCount without leaving a redirect
m (More details, updated template.)
m (Move page script moved page API GetInventoryItemCount to WoW:API GetInventoryItemCount without leaving a redirect)
 
(6 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<center>'''GetInventoryItemCount''' - ''Documentation by [[User:Ulic|ulic]]''</center>
{{wowapi}}
 
Determine the quantity of an item in an inventory slot.
Determine the quantity of an item in an inventory slot.


Line 9: Line 8:


:;unit : String - The [[API TYPE UnitId|UnitId]] of the unit whose inventory is to be queried.
:;unit : String - The [[API TYPE UnitId|UnitId]] of the unit whose inventory is to be queried.
:;slotId : Numeric - The inventory slot to be queried, obtained via [[API GetInventorySlotInfo|GetInventorySlotInfo]].
:;slotId : Numeric - The [[API TYPE InventorySlotID|inventory slot]] to be queried, obtained via [[API GetInventorySlotInfo|GetInventorySlotInfo]].
 
=== Returns ===
=== Returns ===
:count
:count


:;count : Numeric - The number of the item in the specified slot. This returns 1 for normal items (AND for empty slots). For the ammo slot it returns the available quantity of that ammo type. BEWARE - An EMPTY ammo slot returns 1.
:;count : Numeric - Returns 1 on empty slots (Thus, on empty ammo slot, 1 is returned). For containers (Bags, etc.), this returns the number of items stored inside the container (Thus, empty containers return 0). Under all other conditions, this function returns the amount of items in the specified slot.
== Example ==
== Example ==
<!-- begin code -->
<!-- begin code -->
Line 24: Line 24:
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}
[[Category:API Inventory Functions|GetInventoryItemCount]]
Anonymous user