diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-04-11 01:09:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-04-11 01:09:29 +0300 |
commit | 9ce9d5563195bf9d7d22356252f38bc95b247527 (patch) | |
tree | 984014cbb799fefaa62d3e8f8c7820ed2b6407c1 /src/net/eathena/tradehandler.cpp | |
parent | fc199c3ae60d4c4cf76236c7f4891113daa3cbc4 (diff) | |
download | mv-9ce9d5563195bf9d7d22356252f38bc95b247527.tar.gz mv-9ce9d5563195bf9d7d22356252f38bc95b247527.tar.bz2 mv-9ce9d5563195bf9d7d22356252f38bc95b247527.tar.xz mv-9ce9d5563195bf9d7d22356252f38bc95b247527.zip |
imporve tradehandler class.
Diffstat (limited to 'src/net/eathena/tradehandler.cpp')
-rw-r--r-- | src/net/eathena/tradehandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp index 6db01aa67..aa11b1233 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -93,7 +93,7 @@ void TradeHandler::handleMessage(Net::MessageIn &msg) } } -void TradeHandler::request(const Being *const being) +void TradeHandler::request(const Being *const being) const { if (!being) return; @@ -102,7 +102,7 @@ void TradeHandler::request(const Being *const being) outMsg.writeInt32(being->getId()); } -void TradeHandler::respond(bool accept) +void TradeHandler::respond(const bool accept) const { if (!accept) PlayerInfo::setTrading(false); @@ -111,7 +111,7 @@ void TradeHandler::respond(bool accept) outMsg.writeInt8(accept ? 3 : 4); } -void TradeHandler::addItem(Item *item, int amount) +void TradeHandler::addItem(const Item *const item, const int amount) const { if (!item) return; @@ -122,24 +122,24 @@ void TradeHandler::addItem(Item *item, int amount) outMsg.writeInt32(amount); } -void TradeHandler::setMoney(int amount) +void TradeHandler::setMoney(const int amount) const { MessageOut outMsg(CMSG_TRADE_ITEM_ADD_REQUEST); outMsg.writeInt16(0); outMsg.writeInt32(amount); } -void TradeHandler::confirm() +void TradeHandler::confirm() const { MessageOut outMsg(CMSG_TRADE_ADD_COMPLETE); } -void TradeHandler::finish() +void TradeHandler::finish() const { MessageOut outMsg(CMSG_TRADE_OK); } -void TradeHandler::cancel() +void TradeHandler::cancel() const { MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST); } |