WowAddons

World of Warcraft Forever API · C_Container.md, for your AI

C_Container

47 functions, 17 events, 5 tables, as Blizzard documents them for Forever 1.60.1 (70959).

Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.

Functions

C_Container.CalculateTotalNumberOfFreeBagSlots

totalFreeSlots = C_Container.CalculateTotalNumberOfFreeBagSlots()

Returns

totalFreeSlotsnumber

C_Container.ContainerIDToInventoryID

inventoryID = C_Container.ContainerIDToInventoryID(containerID)

May return nothing.

Arguments

containerIDBagIndex

Returns

inventoryIDluaIndex

C_Container.ContainerRefundItemPurchase

C_Container.ContainerRefundItemPurchase(containerIndex, slotIndex, [isEquipped])

Arguments

containerIndexBagIndex
slotIndexluaIndex
isEquippedbool default false

C_Container.GetBackpackAutosortDisabled

isDisabled = C_Container.GetBackpackAutosortDisabled()

Returns

isDisabledbool

C_Container.GetBackpackSellJunkDisabled

isDisabled = C_Container.GetBackpackSellJunkDisabled()

Returns

isDisabledbool

C_Container.GetBagName

name = C_Container.GetBagName(bagIndex)

Arguments

bagIndexBagIndex

Returns

namecstring

C_Container.GetBagSlotFlag

isSet = C_Container.GetBagSlotFlag(bagIndex, flag)

Arguments

bagIndexBagIndex
flagBagSlotFlags

Returns

isSetbool

C_Container.GetBankAutosortDisabled

isDisabled = C_Container.GetBankAutosortDisabled()

Returns

isDisabledbool

C_Container.GetContainerFreeSlots

freeSlots = C_Container.GetContainerFreeSlots(containerIndex)

May return nothing.

Arguments

containerIndexBagIndex

Returns

freeSlotsluaIndex[]

C_Container.GetContainerItemCooldown

startTime, duration, enable = C_Container.GetContainerItemCooldown(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

startTimenumber
durationnumber
enablenumber

C_Container.GetContainerItemDurability

durability, maxDurability = C_Container.GetContainerItemDurability(containerIndex, slotIndex)

May return nothing.

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

durabilitynumber
maxDurabilitynumber

C_Container.GetContainerItemEquipmentSetInfo

inSet, setList = C_Container.GetContainerItemEquipmentSetInfo(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

inSetbool
setListstring

C_Container.GetContainerItemID

containerID = C_Container.GetContainerItemID(containerIndex, slotIndex)

May return nothing.

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

containerIDnumber

C_Container.GetContainerItemInfo

containerInfo = C_Container.GetContainerItemInfo(containerIndex, slotIndex)

May return nothing.

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

containerInfoContainerItemInfo

C_Container.GetContainerItemPurchaseCurrency

currencyInfo = C_Container.GetContainerItemPurchaseCurrency(containerIndex, slotIndex, itemIndex, isEquipped)

May return nothing.

Arguments

containerIndexBagIndex
slotIndexluaIndex
itemIndexluaIndex
isEquippedbool

Returns

currencyInfoItemPurchaseCurrency

C_Container.GetContainerItemPurchaseInfo

info = C_Container.GetContainerItemPurchaseInfo(containerIndex, slotIndex, isEquipped)

May return nothing.

Arguments

containerIndexBagIndex
slotIndexluaIndex
isEquippedbool

Returns

infoItemPurchaseInfo

C_Container.GetContainerItemPurchaseItem

itemInfo = C_Container.GetContainerItemPurchaseItem(containerIndex, slotIndex, itemIndex, isEquipped)

May return nothing.

Arguments

containerIndexBagIndex
slotIndexluaIndex
itemIndexluaIndex
isEquippedbool

Returns

itemInfoItemPurchaseItem

C_Container.GetContainerItemQuestInfo

questInfo = C_Container.GetContainerItemQuestInfo(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

questInfoItemQuestInfo

C_Container.GetContainerNumFreeSlots

numFreeSlots, bagFamily = C_Container.GetContainerNumFreeSlots(bagIndex)

Arguments

bagIndexBagIndex

Returns

numFreeSlotsnumber
bagFamilynumber may be nil

C_Container.GetContainerNumSlots

numSlots = C_Container.GetContainerNumSlots(containerIndex)

Arguments

containerIndexBagIndex

Returns

numSlotsnumber

C_Container.GetInsertItemsLeftToRight

isEnabled = C_Container.GetInsertItemsLeftToRight()

Returns

isEnabledbool

C_Container.GetItemCooldown

startTime, duration, enable = C_Container.GetItemCooldown(itemID)

May return nothing.

Arguments

itemIDnumber

Returns

startTimenumber
durationnumber
enablenumber

C_Container.GetMaxArenaCurrency

maxCurrency = C_Container.GetMaxArenaCurrency()

Returns

maxCurrencynumber

C_Container.GetSortBagsRightToLeft

isEnabled = C_Container.GetSortBagsRightToLeft()

Returns

isEnabledbool

C_Container.HasContainerItem

hasItem = C_Container.HasContainerItem(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

hasItembool

C_Container.IsBattlePayItem

isBattlePayItem = C_Container.IsBattlePayItem(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

isBattlePayItembool

C_Container.IsContainerFiltered

isFiltered = C_Container.IsContainerFiltered(containerIndex)

Arguments

containerIndexBagIndex

Returns

isFilteredbool

C_Container.PickupContainerItem

C_Container.PickupContainerItem(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

C_Container.PlayerHasHearthstone

itemID = C_Container.PlayerHasHearthstone()

Returns

itemIDnumber may be nil

C_Container.SetBackpackAutosortDisabled

C_Container.SetBackpackAutosortDisabled(disable)

Arguments

disablebool

C_Container.SetBackpackSellJunkDisabled

C_Container.SetBackpackSellJunkDisabled(disable)

Arguments

disablebool

C_Container.SetBagPortraitTexture

C_Container.SetBagPortraitTexture(texture, bagIndex)

Arguments

textureSimpleTexture
bagIndexBagIndex

C_Container.SetBagSlotFlag

C_Container.SetBagSlotFlag(bagIndex, flag, isSet)

Arguments

bagIndexBagIndex
flagBagSlotFlags
isSetbool

C_Container.SetBankAutosortDisabled

C_Container.SetBankAutosortDisabled(disable)

Arguments

disablebool

C_Container.SetInsertItemsLeftToRight

C_Container.SetInsertItemsLeftToRight(enable)

Arguments

enablebool

C_Container.SetItemSearch

C_Container.SetItemSearch(searchString)

Arguments

searchStringcstring

C_Container.SetSortBagsRightToLeft

C_Container.SetSortBagsRightToLeft(enable)

Arguments

enablebool

C_Container.ShowContainerSellCursor

C_Container.ShowContainerSellCursor(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

C_Container.SocketContainerItem

success = C_Container.SocketContainerItem(containerIndex, slotIndex)

Arguments

containerIndexBagIndex
slotIndexluaIndex

Returns

successbool

C_Container.SortAccountBankBags

C_Container.SortAccountBankBags()

C_Container.SortBags

C_Container.SortBags()

C_Container.SortBank

C_Container.SortBank(bankType)

Arguments

bankTypeBankType

C_Container.SortBankBags

C_Container.SortBankBags()

C_Container.SplitContainerItem

C_Container.SplitContainerItem(containerIndex, slotIndex, amount)

Arguments

containerIndexBagIndex
slotIndexluaIndex
amountnumber

C_Container.UseContainerItem

C_Container.UseContainerItem(containerIndex, slotIndex, [unitToken], [bankType], [reagentBankOpen])

Arguments

containerIndexBagIndex
slotIndexluaIndex
unitTokenUnitToken may be nil
bankTypeBankType may be nil
reagentBankOpenbool default false

C_Container.UseHearthstone

used = C_Container.UseHearthstone()

Returns

usedbool

Events

BAG_CLOSED

bagIDBagIndex

BAG_CONTAINER_UPDATE

No payload.

BAG_NEW_ITEMS_UPDATED

No payload.

BAG_OPEN

bagIDnumber

BAG_OVERFLOW_WITH_FULL_INVENTORY

No payload.

BAG_SLOT_FLAGS_UPDATED

slotnumber

BAG_UPDATE

bagIDBagIndex

BAG_UPDATE_COOLDOWN

No payload.

BAG_UPDATE_DELAYED

No payload.

EQUIP_BIND_REFUNDABLE_CONFIRM

slotnumber
itemLocationItemLocation

EQUIP_BIND_TRADEABLE_CONFIRM

slotnumber
itemLocationItemLocation

EXPAND_BAG_BAR_CHANGED

expandBagBarbool

INVENTORY_SEARCH_UPDATE

No payload.

ITEM_LOCK_CHANGED

bagOrSlotIndexBagIndex
slotIndexluaIndex may be nil

ITEM_LOCKED

bagOrSlotIndexBagIndex
slotIndexluaIndex may be nil

ITEM_UNLOCKED

bagOrSlotIndexBagIndex
slotIndexluaIndex may be nil

USE_COMBINED_BAGS_CHANGED

useCombinedBagsbool

Tables

ContainerItemInfo structure

iconFileIDfileID
stackCountnumber
isLockedbool
qualityItemQuality may be nil
isReadablebool
hasLootbool
hyperlinkstring
isFilteredbool
hasNoValuebool
itemIDnumber
isBoundbool
itemNamestring

ItemPurchaseCurrency structure

iconFileIDnumber may be nil
currencyCountnumber
namecstring

ItemPurchaseInfo structure

moneyWOWMONEY
itemCountnumber
refundSecondstime_t
currencyCountnumber
hasEnchantsbool

ItemPurchaseItem structure

iconFileIDnumber may be nil
itemCountnumber
hyperlinkstring

ItemQuestInfo structure

isQuestItembool
questIDnumber may be nil
isActivebool

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows