Script::GetContainerNumSlots
function · ui · primitive
- Address
0x4f9560· 263 bytes, up to0x4f9666- Signature
int __fastcall (lua_State *L)- Meaning
- Returns the number of slots of a bag
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/inventoryverbs#bag-contents
Finding: Bag contents in ui: inventory, container, bank and vendor getters
GetContainerNumSlots(bag) returns 16 for the backpack (0), 24 for the bank (-1), the slot count of the bag object for 1 to
10, and 0 for anything else, the keyring included; with no active player it returns 0 for every bag (0x4f95ab). GetContainerItemInfo(bag, slot) resolves the pair as ui/bags describes and,
for an item in it, returns the icon path, the stack count, 1 when it is locked (bit 0 of +0x314) else nil, the quality (the
record's, or -1 for an inventory type of 0) and 1 when the item can be read (a page text from its virtual +0x74 or an item text id
at +0x9c) else nil. It returns nothing for an empty slot, as GetContainerItemLink does.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 8
- __ftol crt
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- GetContainerGuid ui
- lua_isnumber lua
- lua_tonumber lua
- lua_pushnumber lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.