|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <trade_window.h>
Public Member Functions | |
| TradeWindow (ItemTable items) | |
| std::optional< protocol::TradeAction > | Build (const protocol::Trade &trade) |
A trade with another player, in a window of its own, which is open while the trade is. What you offer is on the left: drag items onto it from the bag, click one to take it back, and type the gold. What they offer is on the right. A side's slots light green once it's ready, Ready says you are, and a change to either offer makes neither side ready. Closing the window calls the trade off.
Definition at line 23 of file trade_window.h.
|
inlineexplicit |
Definition at line 25 of file trade_window.h.
| std::optional< protocol::TradeAction > nanommo::TradeWindow::Build | ( | const protocol::Trade & | trade | ) |
Draws it while there's a trade. Returns what the player does, which the server does, or says in the chat why not.
Definition at line 54 of file trade_window.cc.