Inventory slots refer to a unique equipment or bag slot.
- For equipment, slot names are resolved to a slot id constant with GetInventorySlotInfo()
- InventorySlotName also doubles as a GlobalString
Equipment
Graphical Explanation (Classic)
Example: prints the InventorySlotId for an InventorySlotName, and the related globalstring and constant.
/dump GetInventorySlotInfo("SHOULDERSLOT") -- 3
/dump SHOULDERSLOT -- "Shoulders" (slot name doubles as a globalstring)
/dump INVSLOT_SHOULDER -- 3 (the related constant)
Bags
Slot ids for bags are returned from ContainerIDToInventoryID()
-- Constants
NUM_BAG_SLOTS = 4;
NUM_BANKBAGSLOTS = 7; -- 6 in vanilla
-- Example (retail)
ContainerIDToInventoryID(1) -- 20 (1st character bag, the rightmost one)
ContainerIDToInventoryID(NUM_BAG_SLOTS) -- 23 (4th character bag, the leftmost one)
ContainerIDToInventoryID(NUM_BAG_SLOTS + 1) -- 80 (1st bank bag)
ContainerIDToInventoryID(NUM_BAG_SLOTS + NUM_BANKBAGSLOTS) -- 86 (7th bank bag)
Slot ids for the stock containers in the bank are returned from BankButtonIDToInvSlotID()
-- Constants
NUM_BANKGENERIC_SLOTS = 28; -- 24 in classic
-- Example (retail)
BankButtonIDToInvSlotID(1) -- 52 (first bank container slot)
BankButtonIDToInvSlotID(NUM_BANKGENERIC_SLOTS) -- 79 (last bank container slot)
| ID | Vanilla 1.13.7 |
Vanilla 1.14.0 |
TBC 2.5.2 |
Retail | Description |
|---|---|---|---|---|---|
| 1st character bag | |||||
| 2nd character bag | |||||
| 3rd character bag | |||||
| 4th character bag | |||||
| bank slots (vanilla: 24, bcc/retail: 28) | |||||
| 1st bank bag | |||||
| 2nd bank bag | |||||
| 3rd bank bag | |||||
| 4th bank bag | |||||
| 5th bank bag | |||||
| 6th bank bag | |||||
| 7th bank bag | |||||
Bag InvSlotNames
/dump GetInventorySlotInfo("BAG0SLOT") -- 20
| InvSlotName | InvSlotId |
|---|---|
| BAG0SLOT | 20 |
| BAG1SLOT | 21 |
| BAG2SLOT | 22 |
| BAG3SLOT | 23 |
/dump GetInventorySlotInfo("BAG1") -- 64
| InvSlotName | InvSlotId |
|---|---|
| BAG1 | 64 |
| BAG2 | 65 |
| BAG3 | 66 |
| BAG4 | 67 |
| BAG5 | 68 |
| BAG6 | 69 |
| BAG7 | 70 |
| BAG8 | 71 |
| BAG9 | 72 |
| BAG10 | 73 |
| BAG11 | 74 |
| BAG12 | 75 |
Patch changes
Patch 8.3.0 (2020-01-14): Slot ids for bank bags start from 80 instead of 76.