Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
WoW
Talk
English
Views
Read
Edit
History
More
Search
Navigation
Home
Random page
Help using wiki
Editions
for WoW
for WildStar
for Solar2D
Documentation
for WoW
for WildStar
Reference
WoW
⦁ FrameXML
⦁ AddOns
⦁ API
⦁ WoW Lua
WildStar
⦁ AddOns
⦁ API
⦁ WildStar Lua
Engine
Tools
What links here
Related changes
Special pages
Page information
Site
Recent Changes
Editing
WoW:World of Warcraft API
(section)
Jump to navigation
Jump to search
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!
=== Container / Bag === These functions manage containers, bags, backpacks. See also [[#Inventory]] and [[#Bank]] sections. :{{id|API|ContainerIDToInventoryID}}([[bagId|bagID]]) :{{id|API|GetBagName}}([[bagId|bagID]]) - Get the name of one of the player's bags. :{{id|API|GetContainerItemCooldown}}([[bagId|bagID]], slot) :{{id|API|GetContainerItemDurability}}(bag, slot) - Get current and maximum durability of an item in the character's bags. :{{id|API|GetContainerItemGems}}(bag, slot) - Returns item IDs of gems inserted into the item in a specified container slot. :{{id|API|GetContainerItemID}}(bag, slot) - Returns the item ID of the item in a particular container slot. :{{id|API|GetContainerItemInfo}}([[bagId|bagID]], slot) - Get the info for an item in one of the player's bags. :{{id|API|GetContainerItemLink}}([[bagId|bagID]], slot) - Returns the [[itemLink]] of the item located in bag#, slot#. :{{id|API|GetContainerNumSlots}}([[bagId|bagID]]) - Returns the total number of slots in the bag specified by the index. :{{id|API|GetContainerItemQuestInfo}}(bag, slot) - Returns information about quest and quest-starting items in your bags. (added 3.3.3) :{{id|API|GetContainerNumFreeSlots}}([[bagId|bagID]]) - Returns the number of free slots and type of slots in the bag specified by the index. (added 2.4) :{{id|API|HasKey}}() - Returns 1 if the player has a keyring, nil otherwise. :UI {{id|API|OpenAllBags}}() - Open all bags :UI {{id|API|CloseAllBags}}() - Close all bags :{{id|API|PickupBagFromSlot}}(slot) - Picks up the bag from the specified slot, placing it in the cursor. :{{id|API|PickupContainerItem}}([[bagId|bagID]],slot) :{{id|API|PutItemInBackpack}}() - attempts to place item in backpack (bag slot 0). :{{id|API|PutItemInBag}}(inventoryId) - attempts to place item in a specific bag. :UI {{id|API|PutKeyInKeyRing}}() - attempts to place item in your keyring. :{{id|API|SplitContainerItem}}([[bagId|bagID]],slot,amount) :UI {{id|API|ToggleBackpack}}() - Toggles your backpack open/closed. :UI {{id|API|ToggleBag}}([[bagId|bagID]]) - Opens or closes the specified bag. :PROTECTED {{id|API|UseContainerItem}}([[bagId|bagID]], slot[, onSelf]) - Uses an item located in bag# and slot#. Warning: If a vendor window is open, using items in your pack may sell them - 'onSelf'! Protected situationally? (added 1.12)
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)