nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::TradeWindow Class Reference

#include <trade_window.h>

Public Member Functions

 TradeWindow (ItemTable items)
std::optional< protocol::TradeAction > Build (const protocol::Trade &trade)

Detailed Description

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.

Constructor & Destructor Documentation

◆ TradeWindow()

nanommo::TradeWindow::TradeWindow ( ItemTable items)
inlineexplicit

Definition at line 25 of file trade_window.h.

Member Function Documentation

◆ Build()

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.


The documentation for this class was generated from the following files: