WoW:API ContainerIDToInventoryID: Difference between revisions
Jump to navigation
Jump to search
ContainerIDToInventoryID -Documentation by Luke1410-
No edit summary |
mNo edit summary |
||
Line 9: | Line 9: | ||
:;inventoryID | :;inventoryID | ||
:: inventoryID - the bag's inventory ID used in | :: inventoryID - the bag's inventory ID used in functions like [[API PutItemInBag|PutItemInBag(inventoryId)]] and [[API GetInventoryItemLink|GetInventoryItemLink("player",inventoryId)]] | ||
---- | ---- | ||
;''Examples'' | ;''Examples'' | ||
local invID = ContainerIDToInventoryID(1) | local invID = ContainerIDToInventoryID(1) | ||
DEFAULT_CHAT_FRAME:AddMessage("Bag slot 1 is inventory slot "..invID) | |||
---- | ---- | ||
;''Result'' | ;''Result'' | ||
Bag slot 1 is inventory slot 20 | |||
---- | |||
;''Notes'' | |||
:The return of container IDs -2 (key ring), -1 (bank) and 0 (backpack) aren't actual Inventory slots usable by most Inventory functions. | |||
:The player bags begin at container 1 and inventory 20. | |||
:The bank bags begin at container 5 and inventory 64. | |||
---- | ---- | ||
{{WoW API}} | {{WoW API}} |
Revision as of 19:19, 27 May 2006
- Arguments
-
- (bagID)
-
- bagID
- number - number of the bag to get the inventoryID for
- Returns
- inventoryID
- inventoryID - the bag's inventory ID used in functions like PutItemInBag(inventoryId) and GetInventoryItemLink("player",inventoryId)
- Examples
local invID = ContainerIDToInventoryID(1) DEFAULT_CHAT_FRAME:AddMessage("Bag slot 1 is inventory slot "..invID)
- Result
Bag slot 1 is inventory slot 20
- Notes
- The return of container IDs -2 (key ring), -1 (bank) and 0 (backpack) aren't actual Inventory slots usable by most Inventory functions.
- The player bags begin at container 1 and inventory 20.
- The bank bags begin at container 5 and inventory 64.