diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-03 07:39:18 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-03 07:39:18 -0600 |
commit | 754cc498156371d0b6d32de0e58d7256236ed676 (patch) | |
tree | 54abf2170a48e72dffdf8a2ba7ded5386fc28813 /src/net/tmwserv/tradehandler.h | |
parent | d13b3eaca82e3547c84f60b9b135464ff3a51cf0 (diff) | |
download | mana-754cc498156371d0b6d32de0e58d7256236ed676.tar.gz mana-754cc498156371d0b6d32de0e58d7256236ed676.tar.bz2 mana-754cc498156371d0b6d32de0e58d7256236ed676.tar.xz mana-754cc498156371d0b6d32de0e58d7256236ed676.zip |
Fill in TMWServ's TradeHandler
Also started temparary implementation of the Net::getXHandler() methods
and started using them.
Diffstat (limited to 'src/net/tmwserv/tradehandler.h')
-rw-r--r-- | src/net/tmwserv/tradehandler.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/net/tmwserv/tradehandler.h b/src/net/tmwserv/tradehandler.h index a064bbce..1abb30e3 100644 --- a/src/net/tmwserv/tradehandler.h +++ b/src/net/tmwserv/tradehandler.h @@ -23,8 +23,9 @@ #define NET_TMWSERV_TRADEHANDLER_H #include "net/messagehandler.h" +#include "net/tradehandler.h" -class TradeHandler : public MessageHandler +class TradeHandler : public MessageHandler, public Net::TradeHandler { public: TradeHandler(); @@ -46,8 +47,26 @@ class TradeHandler : public MessageHandler */ void setAcceptTradeRequests(bool acceptTradeRequests); + void request(Being *being); + + void respond(bool accept); + + void addItem(Item *item, int amount); + + void removeItem(int slotNum, int amount); + + void setMoney(int amount); + + void confirm(); + + void finish(); + + void cancel(); + private: bool mAcceptTradeRequests; }; +extern Net::TradeHandler *tradeHandler; + #endif |