WoW API: GetContainerNumSlots

From AddOn Studio
Revision as of 22:37, 7 January 2007 by WoWWiki>Bytecrafter (returns 0 if no bag present)
Jump to navigation Jump to search

WoW API < GetContainerNumSlots

Return the number of slots available in the bag specified by the index.

numberOfSlots = GetContainerNumSlots(bagID);

Parameters

Arguments

bagID
Integer - the slot containing the bag, e.g. 0 for backpack, etc.

Returns

numberOfSlots
Integer - the number of slots in the specified bag, or 0 if there is no bag in the given slot.

Details

  • In 1.11.2, it appears that with the Key Ring, GetContainerNumSlots(-2) always returns zero, regardless of whether HasKey() is true or false.