benilla-re systems structs docs

Script::PickupContainerItem

function · ui · orchestration

Address
0x4f9b30 · 1085 bytes, up to 0x4f9f6c
Signature
int __fastcall (lua_State *L)
Meaning
Clicks a bag slot: drops, swaps, splits, buys into, repairs, wraps or picks up its item by the cursor payload
Confidence
verified, proof one
Finding
ui/bags#pickup-of-a-container-item

Finding: Pickup of a container item in ui: bags and bag slots

PickupContainerItem(index, slot) is 0x4f9b30 and returns nothing. A non-number argument raises Usage: PickupContainerItem(index, slot). It does nothing with no active player, with neither control (0xb4b3e4) nor bit 20 of the player's flags, when 0x4f9820 does not resolve the pair, or for a bank slot (39 to 68) of a bank-flagged list while no banker is open. Otherwise the cursor decides, a held item first, then a preview payload, then the slot's item, as the rows say.

cursor and slotdoes
holds the slot's own itemClearCursor(1, 1)
holds an item, split count 0xb4b40c setsend the split, ClearCursor(0, 1)
holds an item; the slot is occupied and the held item has no source container GUID, or the slot's item is lockednothing
holds an item, otherwiselock the slot's item, send the swap, ClearCursor(0, 1)
a preview, kind 5with a vendor open, buy into the slot (0x1a3), ClearCursor(1, 1); else nothing, the payload stays
a preview, kind 6send 0x109, ClearCursor(1, 1); no setter makes kind 6
a preview, kind 7 or 9ClearCursor(1, 1)
neither, the slot emptynothing
neither, a spell wants an item (0x6e48a0, 0x6e6330)0x495d60(0, GUID), no pickup
neither, repair cursor 0x11 and a repairing vendorrepair (ui/merchant#repair-clicks)
neither, wrapping paper heldsend the wrap
neither, otherwisea locked item: nothing; else it goes on the cursor and is locked

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 30

Calls and jumps by a bare address, from tables/calls.tsv.