Open main menu
Home
Random
Log in
Settings
About AddOn Studio
Disclaimers
AddOn Studio
Search
Editing
WoW:API ContainerIDToInventoryID
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{wowapi}} __NOTOC__ inventoryId = ContainerIDToInventoryID(bagID) == Arguments == :;:(bagID) :::;bagID : [[API TYPE bagID|bagID]] - number of the bag (1 -- NUM_BAG_SLOTS+NUM_BANKBAGSLOTS) to get the inventoryID for. == Returns == :;inventoryID :: inventoryID - the bag's inventory ID used in functions like [[API PutItemInBag|PutItemInBag(inventoryId)]] and [[API GetInventoryItemLink|GetInventoryItemLink("player",inventoryId)]] == Example == local invID = ContainerIDToInventoryID(1) local bagLink = GetInventoryItemLink("player",invID) DEFAULT_CHAT_FRAME:AddMessage("Bag slot 1 is inventory slot "..invID..", a "..bagLink) === Result === Bag slot 1 is inventory slot 20, a [Imbued Netherweave Bag] == Notes == :Querying for items outside the range 1 -- (NUM_BAG_SLOTS+NUM_BANKBAGSLOTS) throws an error. :The player bags begin at container 1 -- currently inventory slot 20. :The bank bags begin at container 5 (1+NUM_BAG_SLOTS) -- currently inventory slot 68.
Summary:
Please note that all contributions to AddOn Studio are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
AddOn Studio Wiki:Copyrights
for details).
Submissions must be written by you, or copied from a public domain or similar free resource (see
AddOn Studio Wiki:Copyrights
for details).
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Apinav
(
edit
)
Template:Editlink
(
edit
)
Template:Tocright
(
edit
)
Template:Wowapi
(
edit
)