Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:AcceptTrade

From RoR Wiki

UI Lua API · Trade functions
Version: WAR 1.4.8

Tells the server that the player accepts the current trade.

AcceptTrade()

Arguments

None.

Returns

Nothing.

Details

  • Sends an "accept" trade status to the server for the trade partner the client has stored (for example by InitiateTrade).
  • The client does not check that a trade is open. The window logic in ea_tradewindow keeps track of that itself.
  • Does nothing if the player object does not exist yet (for example before entering the world).
  • Arguments are not checked; anything passed is ignored.
  • To take back an acceptance, the stock UI sends an update with ChangeTrade (ChangeTrade(0, 0, 0, money)).

Errors

None.

Example

From default/ea_tradewindow/source/tradewindow.lua:

function EA_Window_Trade.AcceptTrade()
	EA_Window_Trade.DisplayIHaveAccepted()
	AcceptTrade()
	...
end

See also