As part of the Unified Community Platform project, your wiki will be migrated to the new platform in the next few weeks. Read more here.

ContainerIDToInventoryID

From Wowpedia
Jump to: navigation, search
bagID = ContainerIDToInventoryID(containerID)

Arguments

bagID 
number - BagID between 1 and NUM_BAG_SLOTS + NUM_BANKBAGSLOTS

Returns

inventoryID 
number - InventorySlotId used in functions like PutItemInBag() and GetInventoryItemLink()

Example

Prints all bag container IDs and their respective inventory IDs
(You need to be at the bank for bank inventory IDs to return valid results)

for i = 1, NUM_BAG_SLOTS + NUM_BANKBAGSLOTS do
    local invID = ContainerIDToInventoryID(i)
    print(i, invID, GetInventoryItemLink("player", invID))
end

Values

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