benilla-re systems structs docs

s_tradeDone

global · ui

Address
0xb71748 · 4 bytes, up to 0xb7174b
Type
uint32_t
Meaning
Holds 1 when the closing trade completed
Confidence
verified, proof one
Finding
ui/trade#opening-and-closing-the-window

Finding: Opening and closing the window in ui: trade requests and status messages

0x4bf4e0(done, partner GUID) is the one place the window changes. A nonzero GUID makes the partner the interaction object, stores the GUID, clears the seven offer slots, the accept flags and the money cells, offers what the cursor holds when the trade was started by a drop, and signals TRADE_SHOW (0x13f). A zero GUID with a partner stored stores done, ends the interaction, clears the partner and signals TRADE_CLOSED (0x140). It then sends CMSG_CANCEL_TRADE (0x11c) whether or not a partner was stored. When the partner is still the interaction target the close runs twice (below). Statuses 3, 8 and 12 close, and status 8 passes done 1; 2 opens. CloseTrade() first signals PLAYER_TRADE_MONEY (0x146) when done is 0, then closes.

The derivation is in the doc.