summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-23 20:23:04 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-23 20:23:04 +0300
commit4d02075c3daaefca2dcad72546e1e45b4219b5ad (patch)
tree9df679951e8c25efa1a0288a9b8105e8992f3c76 /src/net/eathena
parentb2683954e4574905ce3cc0cbf9afeeee35549009 (diff)
downloadplus-4d02075c3daaefca2dcad72546e1e45b4219b5ad.tar.gz
plus-4d02075c3daaefca2dcad72546e1e45b4219b5ad.tar.bz2
plus-4d02075c3daaefca2dcad72546e1e45b4219b5ad.tar.xz
plus-4d02075c3daaefca2dcad72546e1e45b4219b5ad.zip
Add packet fields comments in tradehandler.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/tradehandler.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/net/eathena/tradehandler.cpp b/src/net/eathena/tradehandler.cpp
index 15eb5c4bf..3d76d9e78 100644
--- a/src/net/eathena/tradehandler.cpp
+++ b/src/net/eathena/tradehandler.cpp
@@ -123,7 +123,7 @@ void TradeHandler::request(const Being *const being) const
return;
createOutPacket(CMSG_TRADE_REQUEST);
- outMsg.writeInt32(being->getId());
+ outMsg.writeInt32(being->getId(), "player id");
}
void TradeHandler::respond(const bool accept) const
@@ -132,7 +132,7 @@ void TradeHandler::respond(const bool accept) const
PlayerInfo::setTrading(false);
createOutPacket(CMSG_TRADE_RESPONSE);
- outMsg.writeInt8(static_cast<int8_t>(accept ? 3 : 4));
+ outMsg.writeInt8(static_cast<int8_t>(accept ? 3 : 4), "accept");
}
void TradeHandler::addItem(const Item *const item, const int amount) const
@@ -143,15 +143,16 @@ void TradeHandler::addItem(const Item *const item, const int amount) const
mItemIndex = item->getInvIndex();
mQuantity = amount;
createOutPacket(CMSG_TRADE_ITEM_ADD_REQUEST);
- outMsg.writeInt16(static_cast<int16_t>(mItemIndex + INVENTORY_OFFSET));
- outMsg.writeInt32(amount);
+ outMsg.writeInt16(static_cast<int16_t>(mItemIndex + INVENTORY_OFFSET),
+ "index");
+ outMsg.writeInt32(amount, "amount");
}
void TradeHandler::setMoney(const int amount) const
{
createOutPacket(CMSG_TRADE_ITEM_ADD_REQUEST);
- outMsg.writeInt16(0);
- outMsg.writeInt32(amount);
+ outMsg.writeInt16(0, "index");
+ outMsg.writeInt32(amount, "amount");
}
void TradeHandler::confirm() const