ReadInventorySlotArg
function · ui · primitive
- Address
0x4c8520· 104 bytes, up to0x4c8587- Signature
uint32_t __fastcall (lua_State *L, int32_t *out, int32_t index)- Meaning
- Reads a Lua slot number as a 0-based inventory slot, refusing numbers outside the slot bands
- Confidence
- verified, proof one
- Finding
- ui/bags#slot-arguments
Finding: Slot arguments in ui: bags and bag slots
0x4c8520(L, out, index) is the slot reader of this file. The argument must be a number (a numeric string passes). It
is truncated toward zero, reduced by 1, and accepted when the result is -1 (ammo), 0 to 22, 39 to 62, 63 to 68 or 81
to 112; in Lua terms 0, 1 to 23, 40 to 63, 64 to 69 and 82 to 113. The backpack (Lua 24 to 39) and the buy-back
slots (70 to 81) are refused. It stores the 0-based value and returns 1; on a refusal it returns 0 and the caller raises
its own error. Nothing is clamped, and the bound 112 is the last index of the 113-entry table.
The derivation is in the doc.
Callers 14
- Script::GetInventoryItemTexture ui
- Script::GetInventoryItemBroken ui
- Script::GetInventoryItemCount ui
- Script::GetInventoryItemQuality ui
- Script::GetInventoryItemCooldown ui
- Script::GetInventoryItemLink ui
- Script::PickupInventoryItem ui
- Script::UseInventoryItem ui
- Script::IsInventoryItemLocked ui
- Script::PutItemInBag ui
- Script::PickupBagFromSlot ui
- Script::CursorCanGoInSlot ui
- Script::ShowInventorySellCursor ui
- Script::SetInventoryPortaitTexture ui
Callees 3
- __ftol crt
- lua_isnumber lua
- lua_tonumber lua
Calls and jumps by a bare address, from tables/calls.tsv.