diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-28 00:51:53 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-28 02:33:42 +0300 |
commit | e24f650a1271ecabe5ffa0a1f810cf0fa133f395 (patch) | |
tree | 936f6ae0915a552199efaf0a334384a6d4f2673f /src/net/eathena/partyrecv.cpp | |
parent | 4d94a44a3acf77653b4e4782009a49293b96c35d (diff) | |
download | manaverse-e24f650a1271ecabe5ffa0a1f810cf0fa133f395.tar.gz manaverse-e24f650a1271ecabe5ffa0a1f810cf0fa133f395.tar.bz2 manaverse-e24f650a1271ecabe5ffa0a1f810cf0fa133f395.tar.xz manaverse-e24f650a1271ecabe5ffa0a1f810cf0fa133f395.zip |
Add packet SMSG_PARTY_INFO 0x0a44.
Diffstat (limited to 'src/net/eathena/partyrecv.cpp')
-rw-r--r-- | src/net/eathena/partyrecv.cpp | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/src/net/eathena/partyrecv.cpp b/src/net/eathena/partyrecv.cpp index a7d25ef32..c3cbd102c 100644 --- a/src/net/eathena/partyrecv.cpp +++ b/src/net/eathena/partyrecv.cpp @@ -155,8 +155,22 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg) if (Ea::taParty != nullptr) Ea::taParty->setName(name); - const int count = (length - 28) / 46; - if ((localPlayer != nullptr) && (Ea::taParty != nullptr)) + int partySize = 0; + int offset = 0; + if (msg.getVersion() >= 20170502) + { + partySize = 50; + offset = 28 + 6; + } + else + { + partySize = 46; + offset = 28; + } + + const int count = (length - offset) / partySize; + if (localPlayer != nullptr && + Ea::taParty != nullptr) { localPlayer->setParty(Ea::taParty); localPlayer->setPartyName(Ea::taParty->getName()); @@ -169,6 +183,12 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg) std::string map = msg.readString(16, "map name"); const bool leader = msg.readUInt8("leader") == 0U; const bool online = msg.readUInt8("online") == 0U; + int level = 0; + if (msg.getVersion() >= 20170502) + { + msg.readInt16("class"); + level = msg.readInt16("level"); + } if (Ea::taParty != nullptr) { @@ -195,21 +215,23 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg) { partyTab->showOnline(nick, fromBool(online, Online)); } - - member->setLeader(leader); - member->setOnline(online); - member->setMap(map); - } - else - { - member->setLeader(leader); - member->setOnline(online); - member->setMap(map); } + member->setLeader(leader); + member->setOnline(online); + member->setMap(map); + if (level != 0) + member->setLevel(level); } } } + if (msg.getVersion() >= 20170502) + { + msg.readInt8("pickup item share (&1)"); + msg.readInt8("get item share (&2)"); + msg.readInt32("unknown"); + } + if (Ea::taParty != nullptr) Ea::taParty->sort(); |