Script::InitiateTrade
function · ui · primitive
- Address
0x48a120· 135 bytes, up to0x48a1a6- Signature
int __fastcall (lua_State *L)- Meaning
- Sends a trade request for a unit token unless the player is dead, showing ERR_PLAYER_DEAD
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/trade#starting-a-trade
Finding: Starting a trade in ui: trade requests and status messages
InitiateTrade("unit") raises Usage: InitiateTrade("unit") for a non-string. A token that names no unit does
nothing. If the active player's own object is dead or a ghost it shows ERR_PLAYER_DEAD and sends nothing;
otherwise it calls 0x5d3fb0 with mode 0. Nothing tests the target. BeginTrade() and CancelTrade() take no
arguments and send 0x117 and 0x11c. The other starters of 0x5d3fb0 are DropItemOnUnit and the world-click
drop, with mode 1. 0x117 has two callers (the script function and step 9 above), 0x118 two (steps 4 to 8), 0x119
one (step 2).
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 9
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- CGGameUI::DisplayError ui
- Script::GetGUIDFromName ui
- TradeInitiate objectlayer
- IsDeadOrGhost objectlayer
- lua_isstring lua
- lua_tostring lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.