diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-19 17:33:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-19 17:33:16 +0300 |
commit | b7addc0a9a519cf9dcc3e804d9918ce4934a3e83 (patch) | |
tree | eed5cd349f7e9db512fd1e940ed7b070df1c6a35 /src/net/eathena/tradehandler.cpp | |
parent | 403792db7d005066273bcbe138afcd1a98b3144c (diff) | |
download | mv-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.gz mv-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.bz2 mv-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.tar.xz mv-b7addc0a9a519cf9dcc3e804d9918ce4934a3e83.zip |
Add comments for all output packets header.
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 f81d80e24..02968fa5b 100644 --- a/src/net/eathena/tradehandler.cpp +++ b/src/net/eathena/tradehandler.cpp @@ -107,7 +107,7 @@ void TradeHandler::request(const Being *const being) const if (!being) return; - MessageOut outMsg(CMSG_TRADE_REQUEST); + createOutPacket(CMSG_TRADE_REQUEST); outMsg.writeInt32(being->getId()); } @@ -116,7 +116,7 @@ void TradeHandler::respond(const bool accept) const if (!accept) PlayerInfo::setTrading(false); - MessageOut outMsg(CMSG_TRADE_RESPONSE); + createOutPacket(CMSG_TRADE_RESPONSE); outMsg.writeInt8(static_cast<int8_t>(accept ? 3 : 4)); } @@ -125,7 +125,7 @@ void TradeHandler::addItem(const Item *const item, const int amount) const if (!item) return; - MessageOut outMsg(CMSG_TRADE_ITEM_ADD_REQUEST); + createOutPacket(CMSG_TRADE_ITEM_ADD_REQUEST); outMsg.writeInt16(static_cast<int16_t>( item->getInvIndex() + INVENTORY_OFFSET)); outMsg.writeInt32(amount); @@ -133,24 +133,24 @@ void TradeHandler::addItem(const Item *const item, const int amount) const void TradeHandler::setMoney(const int amount) const { - MessageOut outMsg(CMSG_TRADE_ITEM_ADD_REQUEST); + createOutPacket(CMSG_TRADE_ITEM_ADD_REQUEST); outMsg.writeInt16(0); outMsg.writeInt32(amount); } void TradeHandler::confirm() const { - MessageOut outMsg(CMSG_TRADE_ADD_COMPLETE); + createOutPacket(CMSG_TRADE_ADD_COMPLETE); } void TradeHandler::finish() const { - MessageOut outMsg(CMSG_TRADE_OK); + createOutPacket(CMSG_TRADE_OK); } void TradeHandler::cancel() const { - MessageOut outMsg(CMSG_TRADE_CANCEL_REQUEST); + createOutPacket(CMSG_TRADE_CANCEL_REQUEST); } void TradeHandler::processTradeRequest(Net::MessageIn &msg) const |