InventorySlotID
(Redirected from InventorySlotId)
Jump to navigation
Jump to search
inventorySlotID
s refer to a unique ID for a specific equipment, bag, or bank slot. For equipment, character bag, and some bank slots, an inventorySlotName
can be resolved to an inventorySlotID
with GetInventorySlotInfo().
Equipment
For equipment slots, an inventorySlotName
also doubles as a GlobalString. Most equipment inventorySlotID
s also have a corresponding constant.
/dump GetInventorySlotInfo("SHOULDERSLOT") -- 3
/dump SHOULDERSLOT -- "Shoulders" (slot name doubles as a globalstring)
/dump INVSLOT_SHOULDER -- 3 (the related constant)
inventorySlotName | GlobalString (enUS) | inventorySlotID | Constant |
---|---|---|---|
AMMOSLOT | Ammo | 0 | INVSLOT_AMMO |
HEADSLOT | Head | 1 | INVSLOT_HEAD |
NECKSLOT | Neck | 2 | INVSLOT_NECK |
SHOULDERSLOT | Shoulders | 3 | INVSLOT_SHOULDER |
SHIRTSLOT | Shirt | 4 | INVSLOT_BODY |
CHESTSLOT | Chest | 5 | INVSLOT_CHEST |
WAISTSLOT | Waist | 6 | INVSLOT_WAIST |
LEGSSLOT | Legs | 7 | INVSLOT_LEGS |
FEETSLOT | Feet | 8 | INVSLOT_FEET |
WRISTSLOT | Wrist | 9 | INVSLOT_WRIST |
HANDSSLOT | Hands | 10 | INVSLOT_HAND |
FINGER0SLOT | Finger | 11 | INVSLOT_FINGER1 |
FINGER1SLOT | Finger | 12 | INVSLOT_FINGER2 |
TRINKET0SLOT | Trinket | 13 | INVSLOT_TRINKET1 |
TRINKET1SLOT | Trinket | 14 | INVSLOT_TRINKET2 |
BACKSLOT | Back | 15 | INVSLOT_BACK |
MAINHANDSLOT | Main Hand | 16 | INVSLOT_MAINHAND |
SECONDARYHANDSLOT | Off Hand | 17 | INVSLOT_OFFHAND |
RANGEDSLOT | Ranged | 18 | INVSLOT_RANGED |
TABARDSLOT | Tabard | 19 | INVSLOT_TABARD |
PROF0TOOLSLOT | Profession Tool | 20 | |
PROF0GEAR0SLOT | Profession Accessory | 21 | |
PROF0GEAR1SLOT | Profession Accessory | 22 | |
PROF1TOOLSLOT | Profession Tool | 23 | |
PROF1GEAR0SLOT | Profession Accessory | 24 | |
PROF1GEAR1SLOT | Profession Accessory | 25 | |
COOKINGTOOLSLOT | Cooking Tool | 26 | |
COOKINGGEAR0SLOT | Cooking Accessory | 27 | |
FISHINGTOOLSLOT | Fishing Rod | 28 | |
FISHINGGEAR0SLOT | Fishing Accessory | 29 | |
FISHINGGEAR1SLOT | Fishing Accessory | 30 |
Bags
-- Example (Retail)
/dump GetInventorySlotInfo("BAG0SLOT") -- 31 (1st character bag slot, the rightmost one)
/dump GetInventorySlotInfo("BAG3SLOT") -- 34 (4th character bag slot, the leftmost one)
/dump GetInventorySlotInfo("BAG1") -- 64 (1st bank slot)
/dump GetInventorySlotInfo("BAG12") -- 75 (12th bank slot)
IDs for most container IDs can be returned from C_Container.ContainerIDToInventoryID().
-- Constants
NUM_BAG_SLOTS = 4;
NUM_BANKBAGSLOTS = 7; -- 6 in Classic Era
-- Example (Retail)
/dump C_Container.ContainerIDToInventoryID(1) -- 31 (1st character bag slot, the rightmost one)
/dump C_Container.ContainerIDToInventoryID(NUM_BAG_SLOTS) -- 34 (4th character bag slot)
/dump C_Container.ContainerIDToInventoryID(NUM_BAG_SLOTS + 1) -- 35 (reagent bag slot, the leftmost one)
IDs for the bank container can be returned from BankButtonIDToInvSlotID(); however, bankButtonIDs
above NUM_BANKGENERIC_SLOTS
return invalid values.
-- Constants
NUM_BANKGENERIC_SLOTS = 28; -- 24 in Classic Era
-- Example (Retail)
/dump BankButtonIDToInvSlotID(1) -- 64 (1st bank slot)
/dump BankButtonIDToInvSlotID(NUM_BANKGENERIC_SLOTS) -- 91 (28th bank slot)
Patch changes
- As early as Patch 10.2.5 and 1.15.0 - The character bag slots (1 to 4) inventorySlotIDs were changed from 20-23 to 31-34.
- Patch 8.3.0 (2020-01-14): Slot IDs for bank bags start from 80 instead of 76.