summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-02 18:09:38 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:56 +0300
commitc8002e43c3fd32152ae5b26e6568d35c2861b6fd (patch)
tree7c51a4f312b1a15ac68f75d1baa45f80375b5116 /src/net/tmwa
parent148bafe5950332613068f60543e5a1833e661587 (diff)
downloadmanaplus-c8002e43c3fd32152ae5b26e6568d35c2861b6fd.tar.gz
manaplus-c8002e43c3fd32152ae5b26e6568d35c2861b6fd.tar.bz2
manaplus-c8002e43c3fd32152ae5b26e6568d35c2861b6fd.tar.xz
manaplus-c8002e43c3fd32152ae5b26e6568d35c2861b6fd.zip
add packet comments in gamehandler.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/gamehandler.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/tmwa/gamehandler.cpp b/src/net/tmwa/gamehandler.cpp
index ae60a0874..f0c3c0d5d 100644
--- a/src/net/tmwa/gamehandler.cpp
+++ b/src/net/tmwa/gamehandler.cpp
@@ -122,11 +122,11 @@ void GameHandler::connect()
// Send login infos
MessageOut outMsg(CMSG_MAP_SERVER_CONNECT);
- outMsg.writeInt32(token.account_ID);
- outMsg.writeInt32(mCharID);
- outMsg.writeInt32(token.session_ID1);
- outMsg.writeInt32(token.session_ID2);
- outMsg.writeInt8(Being::genderToInt(token.sex));
+ outMsg.writeInt32(token.account_ID, "account id");
+ outMsg.writeInt32(mCharID, "char id");
+ outMsg.writeInt32(token.session_ID1, "session id1");
+ outMsg.writeInt32(token.session_ID2, "session id2");
+ outMsg.writeInt8(Being::genderToInt(token.sex), "gender");
/*
if (localPlayer)
@@ -163,7 +163,7 @@ void GameHandler::quit() const
void GameHandler::ping(const int tick) const
{
MessageOut msg(CMSG_CLIENT_PING);
- msg.writeInt32(tick);
+ msg.writeInt32(tick, "tick");
}
void GameHandler::disconnect2() const
@@ -175,9 +175,9 @@ void GameHandler::processMapLogin(Net::MessageIn &msg) const
{
unsigned char direction;
uint16_t x, y;
- msg.readInt32(); // server tick
- msg.readCoordinates(x, y, direction);
- msg.skip(2); // 0x0505
+ msg.readInt32("tick");
+ msg.readCoordinates(x, y, direction, "position");
+ msg.skip(2, "unknown?");
logger->log("Protocol: Player start position: (%d, %d),"
" Direction: %d", x, y, direction);