InventorySlotID

From Warcraft Wiki
(Redirected from InventorySlotId)
Jump to navigation Jump to search

inventorySlotIDs 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

Graphical Explanation (Classic)

For equipment slots, an inventorySlotName also doubles as a GlobalString. Most equipment inventorySlotIDs 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)
inventorySlotName GlobalString (enUS) inventorySlotID containerID bankButtonID Description
WoW Icon update.png Wrath-Logo-Small.png Dragonflight WoW Icon update.png Wrath-Logo-Small.png Dragonflight
1st-20th backpack slots
(no corresponding inventorySlotIDs)
BAG0SLOT BAG_NAME_BAG_1 Bag 1 31
20
31
1
1st character bag slot
BAG1SLOT BAG_NAME_BAG_2 Bag 2 32
21
32
2
2nd character bag slot
BAG2SLOT BAG_NAME_BAG_3 Bag 3 33
22
33
3
3rd character bag slot
BAG3SLOT BAG_NAME_BAG_4 Bag 4 34
23
34
4
4th character bag slot
35
5
Reagent bag slot
BAG1 60 (BAG1 returns 64)
48
64
1
1st bank slot
BAG2 61 (BAG2 returns 65)
49
65
2
2nd bank slot
BAG3 62 (BAG3 returns 66)
50
66
3
3rd bank slot
BAG4 63 (BAG4 returns 67)
51
67
4
4th bank slot
BAG5 64 (BAG5 returns 68)
52
68
5
5th bank slot
BAG6 65 (BAG6 returns 69)
53
69
6
6th bank slot
BAG7 66 (BAG7 returns 70)
54
70
7
7th bank slot
BAG8 67 (BAG8 returns 71)
55
71
8
8th bank slot
BAG9 68 (BAG9 returns 72)
56
72
9
9th bank slot
BAG10 69 (BAG10 returns 73)
57
73
10
10th bank slot
BAG11 70 (BAG11 returns 74)
58
74
11
11th bank slot
BAG12 71 (BAG12 returns 75)
59
75
12
12th bank slot
72-83
60-71
75-91
13-28
13th-28th bank slots (13th-24th in Classic Era)
1st-98th reagent bank slots
(no corresponding inventorySlotIDs)
88
76
92
5
6
1st bank bag slot
89
77
93
6
7
2nd bank bag slot
90
78
94
7
8
3rd bank bag slot
91
79
95
8
9
4th bank bag slot
92
80
96
9
10
5th bank bag slot
93
81
97
10
11
6th bank bag slot
82
98
11
12
7th bank bag 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.
  • Battle for Azeroth Patch 8.3.0 (2020-01-14): Slot IDs for bank bags start from 80 instead of 76.

See also