benilla-re systems structs docs

TradeInfoAddCursorItem

function · ui · orchestration

Address
0x4bfc50 · 153 bytes, up to 0x4bfce8
Signature
void __fastcall (uint32_t bound)
Meaning
Offers the cursor item in slot 6 when bound, else in the first empty of slots 0 to 5, and clears the cursor
Confidence
verified, proof one
Finding
ui/trade#placing-and-finding-offered-items

Finding: Placing and finding offered items in ui: trade requests and status messages

0x4bfb10(item) clears the own slot that holds the item through 0x4bfa70; an item being deactivated calls it. 0x4bfb60(item) places it again from its stored container and slot byte, which sends CMSG_SET_TRADE_ITEM anew; the stack count and enchantment watchers call it. Both do nothing for a zero GUID or an item not offered. 0x4bfc50(bound) offers the cursor's item: with bound, slot 6 when it is empty; without, nothing when slots 0 to 5 hold the item, else the first empty of them. On success it clears the cursor, leaving the item locked. Both callers pass CGItem_C::IsBound of the cursor item. 0x4bfd20(item) answers 1 when a trade window is open and one of the seven slots holds the item, else 0.

The derivation is in the doc.

Callers 2

Callees 3

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