benilla-re systems structs docs

CGTradeInfo::HandleTradeMessage

function · ui · orchestration

Address
0x4bf720 · 743 bytes, up to 0x4bfa06
Signature
void __fastcall (uint32_t status, uint32_t inventoryResult, uint32_t sideByte, uint32_t unused, uint32_t slotByte)
Meaning
Answers a trade request, prints the status message and opens, closes or updates the trade window
Confidence
verified, proof one
Name from
the community database (idb)
Finding
ui/trade#answering-a-trade-request

Finding: Answering a trade request in ui: trade requests and status messages

A request arrives as status 1, with the requester's GUID (u64) stored by 0x5d47c0. The dispatcher answers at once, with no step that asks the player. It takes the first row of the table that applies.

#testanswer
1a trade this client asked for is pendingnothing sent
2the requester is on the ignore listCMSG_IGNORE_TRADE (0x119)
3the requester's player object is not knownnothing sent
4the requester is dead or a ghostCMSG_BUSY_TRADE (0x118)
5a cinematic is playingbusy
6the player does not control the characterbusy
7an auctioneer window is openbusy
8the BlockTrades CVar is nonzerobusy, then ERR_TRADE_BLOCKED_S with the requester's name
9none of the aboveCMSG_BEGIN_TRADE (0x117)

The derivation is in the doc.

Callers 1

Callees 18

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