diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-23 17:03:26 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-23 19:46:20 +0300 |
commit | c47fd48bc3deefb774b0c809967f26632dce6a3a (patch) | |
tree | 9b3c9d2fa5113d77f815885488c60ab4c82d66b8 /src | |
parent | 2ddcddafa6dbac049cefef4ee105eaff5bb605fc (diff) | |
download | mv-c47fd48bc3deefb774b0c809967f26632dce6a3a.tar.gz mv-c47fd48bc3deefb774b0c809967f26632dce6a3a.tar.bz2 mv-c47fd48bc3deefb774b0c809967f26632dce6a3a.tar.xz mv-c47fd48bc3deefb774b0c809967f26632dce6a3a.zip |
Add packet fields comments in charserverhandler.
Diffstat (limited to 'src')
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 15 | ||||
-rw-r--r-- | src/net/tmwa/charserverhandler.cpp | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 3329f919b..760683073 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -183,10 +183,10 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, jobStat.base = temp; jobStat.mod = temp; - const int shoes = msg.readInt16(); // look like unused - const int gloves = msg.readInt16(); // look like unused - const int cape = msg.readInt16(); // look like unused - const int misc1 = msg.readInt16(); // look like unused + const int shoes = msg.readInt16("shoes"); + const int gloves = msg.readInt16("gloves"); + const int cape = msg.readInt16("cape"); + const int misc1 = msg.readInt16("misc1"); msg.readInt32("option"); tempPlayer->setKarma(msg.readInt32("karma")); @@ -196,7 +196,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, data.mAttributes[Attributes::HP] = msg.readInt16("hp"); data.mAttributes[Attributes::MAX_HP] = msg.readInt16("max hp"); - msg.skip(4, "unused"); + msg.readInt32("unused"); data.mAttributes[Attributes::MP] = msg.readInt16("mp/sp"); data.mAttributes[Attributes::MAX_MP] = msg.readInt16("max mp/sp"); @@ -221,7 +221,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, msg.readInt16("hair color"))); const int misc2 = msg.readInt16("clothes color"); - tempPlayer->setName(msg.readString(24)); + tempPlayer->setName(msg.readString(24, "name")); character->dummy = tempPlayer; @@ -261,7 +261,8 @@ void CharServerHandler::chooseCharacter(Net::Character *const character) mCharSelectDialog = nullptr; createOutPacket(CMSG_CHAR_SELECT); - outMsg.writeInt8(static_cast<unsigned char>(mSelectedCharacter->slot)); + outMsg.writeInt8(static_cast<unsigned char>( + mSelectedCharacter->slot), "slot"); } void CharServerHandler::newCharacter(const std::string &name, const int slot, diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp index 36fd99a5f..f4c3dc60e 100644 --- a/src/net/tmwa/charserverhandler.cpp +++ b/src/net/tmwa/charserverhandler.cpp @@ -380,7 +380,7 @@ void CharServerHandler::processCharLogin(Net::MessageIn &msg) { BLOCK_START("CharServerHandler::processCharLogin") - msg.skip(2, "len"); + msg.readInt16("len"); const int slots = msg.readInt16("slots"); if (slots > 0 && slots < 30) loginData.characterSlots = static_cast<uint16_t>(slots); |