WoW:BagId: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{wowapitype}})
(info for patch 1.11)
Line 9: Line 9:
: 0 for the backpack
: 0 for the backpack
: 1 to 4 for the bags on the character (numbered right to left)
: 1 to 4 for the bags on the character (numbered right to left)
: -2 for the keyring
WHILE THE BANK IS OPENED :
WHILE THE BANK IS OPENED :
: -1 for the bank content
: -1 for the bank content
: 5 to 10 for bank bags (numbered left to right)
: 5 to 10 for bank bags (numbered left to right)

Revision as of 19:10, 20 June 2006

API types

Documentation by Ebnusn

While dealing with container and inventory items, many developers use a bag/slot couple and set bag to -1 for the case of an inventory item. But a problem occurs when the bank is opened (after BANKFRAME_OPENED event being fired) because the 24 slots of the bank count as a container with -1 as bagID. In the same idea, items in the bank bags can be accessed via container item functions (like GetContainerItemLink(bagID, slotID), PickupContainerItem(bagID, slotID)) with 5 as bagID for the first bank bag, 6 for the second ... until 10 for the sixth.

To sum up, the possibilities for bagID are :

0 for the backpack
1 to 4 for the bags on the character (numbered right to left)
-2 for the keyring

WHILE THE BANK IS OPENED :

-1 for the bank content
5 to 10 for bank bags (numbered left to right)