Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
(BAG0SLOT)
Tag: WoW API docs
(GetContainerItemInfo)
Tag: WoW API docs
Line 1: Line 1:
 
{{wowapitype}}
 
{{wowapitype}}
Inventory Slot IDs refer to equipment or bag slots. See also '''FrameXML\Constants.lua''' ([https://github.com/Gethe/wow-ui-source/blob/163ac1f68d1026f4faad2eb27a54838f080bc21a/FrameXML/Constants.lua#L311 Classic] / [https://github.com/Gethe/wow-ui-source/blob/f8064cb645d378926142b95e43e36c1298c426a6/FrameXML/Constants.lua#L336 Retail])
+
Inventory Slot IDs refer to equipment or bag slots. See '''FrameXML\Constants.lua''' ([https://github.com/Gethe/wow-ui-source/blob/163ac1f68d1026f4faad2eb27a54838f080bc21a/FrameXML/Constants.lua#L311 Classic] / [https://github.com/Gethe/wow-ui-source/blob/f8064cb645d378926142b95e43e36c1298c426a6/FrameXML/Constants.lua#L336 Retail])
   
 
[[Image:InventorySlots.jpg|thumb|Graphical Explanation]]
 
[[Image:InventorySlots.jpg|thumb|Graphical Explanation]]
Line 118: Line 118:
 
==See also==
 
==See also==
 
* {{api|UseInventoryItem}}(), {{api|PickupInventoryItem}}()
 
* {{api|UseInventoryItem}}(), {{api|PickupInventoryItem}}()
* {{api|GetContainerItemID}}()
+
* {{api|GetContainerItemInfo}}()
   
 
==Patch changes==
 
==Patch changes==

Revision as of 21:56, 22 February 2020

Inventory Slot IDs refer to equipment or bag slots. See FrameXML\Constants.lua (Classic / Retail)

InventorySlots

Graphical Explanation

Values

Equipment

Inventory Slot IDs for equipment are returned from GetInventorySlotInfo(invSlotName)

Example: Returns the head slot ID

GetInventorySlotInfo("HEADSLOT") => 1
invSlotName ID Constant
"AMMOSLOT"
0
INVSLOT_AMMO
"HEADSLOT"
1
INVSLOT_HEAD
"NECKSLOT"
2
INVSLOT_NECK
"SHOULDERSLOT"
3
INVSLOT_SHOULDER
"SHIRTSLOT"
4
INVSLOT_BODY
"CHESTSLOT"
5
INVSLOT_CHEST
"WAISTSLOT"
6
INVSLOT_WAIS
"LEGSSLOT"
7
INVSLOT_LEGS
"FEETSLOT"
8
INVSLOT_FEET
"WRISTSLOT"
9
INVSLOT_WRIST
"HANDSSLOT"
10
INVSLOT_HAND
"FINGER0SLOT"
11
INVSLOT_FINGER1
"FINGER1SLOT"
12
INVSLOT_FINGER2
"TRINKET0SLOT"
13
INVSLOT_TRINKET1
"TRINKET1SLOT"
14
INVSLOT_TRINKET2
"BACKSLOT"
15
INVSLOT_BACK
"MAINHANDSLOT"
16
INVSLOT_MAINHAND
"SECONDARYHANDSLOT"
17
INVSLOT_OFFHAND
"RANGEDSLOT" WoW Icon update
18
INVSLOT_RANGED
"TABARDSLOT"
19
INVSLOT_TABARD
"BAG0SLOT"
20
"BAG1SLOT"
21
"BAG2SLOT"
22
"BAG3SLOT"
23

Bags

Inventory Slot IDs for character/bank bags are returned from ContainerIDToInventoryID()

Constants:

CONTAINER_BAG_OFFSET = 19; -- Used for PutItemInBag 
NUM_BAG_SLOTS = 4;
NUM_BANKBAGSLOTS = 7; -- 6 in classic

Examples: (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
ID Classic Retail Description
1
20
20
1st character bag
2
21
21
2nd character bag
3
22
22
3rd character bag
4
23
23
4th character bag
48-71
52-79
bank slots (classic: 24, retail: 28)
5
72
80
1st bank bag
6
73
81
2nd bank bag
7
74
82
3rd bank bag
8
75
83
4th bank bag
9
76
84
5th bank bag
10
77
85
6th bank bag
11
86
7th bank bag

Bank slots

Inventory Slot IDs for bank bag slots are returned from BankButtonIDToInvSlotID()

Constants:

NUM_BANKGENERIC_SLOTS = 28; -- 24 in classic

Examples: (retail)

BankButtonIDToInvSlotID(1) => 52                     -- first bank bag slot
BankButtonIDToInvSlotID(NUM_BANKGENERIC_SLOTS) => 79 -- last bank bag slot

See also

Patch changes

  • Battle for Azeroth Patch 8.3.0 (2020-01-14): Bank bag slot IDs changed from starting at 76 to starting at 80.