CGTradeInfo::HandleTradeMessage
function · ui · orchestration
- Address
0x4bf720· 743 bytes, up to0x4bfa06- 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.
| # | test | answer |
|---|---|---|
| 1 | a trade this client asked for is pending | nothing sent |
| 2 | the requester is on the ignore list | CMSG_IGNORE_TRADE (0x119) |
| 3 | the requester's player object is not known | nothing sent |
| 4 | the requester is dead or a ghost | CMSG_BUSY_TRADE (0x118) |
| 5 | a cinematic is playing | busy |
| 6 | the player does not control the character | busy |
| 7 | an auctioneer window is open | busy |
| 8 | the BlockTrades CVar is nonzero | busy, then ERR_TRADE_BLOCKED_S with the requester's name |
| 9 | none of the above | CMSG_BEGIN_TRADE (0x117) |
The derivation is in the doc.
Callers 1
- TradeStatusHandler objectlayer
Callees 18
- ClntObjMgrObjectPtr objectlayer
- CGGameUI::DisplayError ui
- CGTradeInfo::PlayerAccept ui
- CGTradeInfo::TargetAccept ui
- CGTradeInfo::SetTradePartner ui
- TradeInfoClearPlayerItem ui
- CGTradeInfo::UnlockTradeItems ui
- CGTradeInfo::GetGameError ui
- FriendList::IsIgnored net
- Trade_C_GetTradeTarget objectlayer
- Trade_C_IsInitiator objectlayer
- Trade_C_BeginTrade objectlayer
- Trade_C_PlayerBusy objectlayer
- Trade_C_PlayerIgnored objectlayer
- IsDeadOrGhost objectlayer
- CGUnit_C::GetUnitName objectlayer
- CVar::Lookup cvar
- FrameScript_SignalEvent ui
Calls and jumps by a bare address, from tables/calls.tsv.