WoW:BagId: Difference between revisions

16 bytes added ,  11 April 2007
no edit summary
m (Added bagid 11 for new bank slot)
No edit summary
Line 3: Line 3:
<center>''Documentation by [[user:Ebnusn|Ebnusn]]''</center>
<center>''Documentation by [[user:Ebnusn|Ebnusn]]''</center>
----
----
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 [[API GetContainerItemLink|GetContainerItemLink(bagID, slotID)]], [[API PickupContainerItem|PickupContainerItem(bagID, slotID)]]) with 5 as bagID for the first bank bag, 6 for the second ... until 10 for the sixth.
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 (28 after v2.0) 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 [[API GetContainerItemLink|GetContainerItemLink(bagID, slotID)]], [[API PickupContainerItem|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 :
To sum up, the possibilities for bagID are :
Anonymous user