summaryrefslogtreecommitdiff
path: root/src/net/ea/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-23 16:45:25 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-23 19:46:20 +0300
commit4957ee9dc5c0389ec1d45bf4553683e34a2e204e (patch)
tree3ddd9874a4b2c27b5fa462a256b4bf35d5c9498f /src/net/ea/partyhandler.cpp
parenta29fd5e8a4bca6b6a11c44bff33c79a5f7b44bd3 (diff)
downloadplus-4957ee9dc5c0389ec1d45bf4553683e34a2e204e.tar.gz
plus-4957ee9dc5c0389ec1d45bf4553683e34a2e204e.tar.bz2
plus-4957ee9dc5c0389ec1d45bf4553683e34a2e204e.tar.xz
plus-4957ee9dc5c0389ec1d45bf4553683e34a2e204e.zip
Add packet fields comments in partyhandler.
Diffstat (limited to 'src/net/ea/partyhandler.cpp')
-rw-r--r--src/net/ea/partyhandler.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp
index a04e4861c..806864324 100644
--- a/src/net/ea/partyhandler.cpp
+++ b/src/net/ea/partyhandler.cpp
@@ -159,32 +159,32 @@ void PartyHandler::processPartySettingsContinue(const int16_t exp,
void PartyHandler::processPartyMove(Net::MessageIn &msg)
{
- const int id = msg.readInt32(); // id
+ const int id = msg.readInt32("id");
PartyMember *m = nullptr;
if (Ea::taParty)
m = Ea::taParty->getMember(id);
if (m)
{
- msg.skip(4); // 0
- m->setX(msg.readInt16()); // x
- m->setY(msg.readInt16()); // y
- const bool online = msg.readUInt8() != 0;
+ msg.readInt32("unused");
+ m->setX(msg.readInt16("x"));
+ m->setY(msg.readInt16("y"));
+ const bool online = msg.readUInt8("online") != 0;
if (m->getOnline() != online)
partyTab->showOnline(m->getName(), online);
- m->setOnline(online); // online (if 0)
- msg.readString(24); // party
- msg.readString(24); // nick
- m->setMap(msg.readString(16)); // map
+ m->setOnline(online);
+ msg.readString(24, "party");
+ msg.readString(24, "nick");
+ m->setMap(msg.readString(16, "map"));
}
else
{
- msg.skip(4); // 0
- msg.readInt16(); // x
- msg.readInt16(); // y
- msg.readUInt8(); // online (if 0)
- msg.readString(24); // party
- msg.readString(24); // nick
- msg.readString(16); // map
+ msg.readInt32("unused");
+ msg.readInt16("x");
+ msg.readInt16("y");
+ msg.readUInt8("online");
+ msg.readString(24, "party");
+ msg.readString(24, "nick");
+ msg.readString(16, "map");
}
}
@@ -274,9 +274,9 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg)
void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg)
{
- const int id = msg.readInt32();
- const int hp = msg.readInt16();
- const int maxhp = msg.readInt16();
+ const int id = msg.readInt32("id");
+ const int hp = msg.readInt16("hp");
+ const int maxhp = msg.readInt16("max hp");
PartyMember *m = nullptr;
if (Ea::taParty)
m = Ea::taParty->getMember(id);
@@ -297,19 +297,19 @@ void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg)
void PartyHandler::processPartyUpdateCoords(Net::MessageIn &msg)
{
- const int id = msg.readInt32(); // id
+ const int id = msg.readInt32("id");
PartyMember *m = nullptr;
if (Ea::taParty)
m = Ea::taParty->getMember(id);
if (m)
{
- m->setX(msg.readInt16()); // x
- m->setY(msg.readInt16()); // y
+ m->setX(msg.readInt16("x"));
+ m->setY(msg.readInt16("y"));
}
else
{
- msg.readInt16(); // x
- msg.readInt16(); // y
+ msg.readInt16("x");
+ msg.readInt16("y");
}
}