diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-25 20:44:11 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-25 20:44:11 +0300 |
commit | dbf8165f63583e7cefd1e0e982f0cb62e725cdae (patch) | |
tree | 132be7e76de821740fa254827d8aa3b35627c927 | |
parent | 2d3051fc41bf717aeb9563ad607ac9dab58e87fe (diff) | |
download | manaverse-dbf8165f63583e7cefd1e0e982f0cb62e725cdae.tar.gz manaverse-dbf8165f63583e7cefd1e0e982f0cb62e725cdae.tar.bz2 manaverse-dbf8165f63583e7cefd1e0e982f0cb62e725cdae.tar.xz manaverse-dbf8165f63583e7cefd1e0e982f0cb62e725cdae.zip |
Update packet versions for packets SMSG_PARTY_MEMBER_INFO and SMSG_PARTY_INFO.
-rw-r--r-- | src/net/eathena/packetsin.inc | 16 | ||||
-rw-r--r-- | src/net/eathena/partyrecv.cpp | 15 |
2 files changed, 28 insertions, 3 deletions
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 928d6eeab..d22c2855e 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -1035,6 +1035,20 @@ if (packetVersion >= 20170502) packet(SMSG_PARTY_MEMBER_JOB_LEVEL, 0x0abd, 10, &PartyRecv::processPartyMemberJobLevel, 20170502); } +// 20170502 re +if (packetVersionRe >= 20170502) +{ + packet(SMSG_PARTY_MEMBER_INFO, 0x0a43, 85, &PartyRecv::processPartyMemberInfo, 20170502); + packet(SMSG_PARTY_INFO, 0x0a44, -1, &PartyRecv::processPartyInfo, 20170502); +} + +// 20170524 re +if (packetVersionMain >= 20170524) +{ + packet(SMSG_PARTY_MEMBER_INFO, 0x0a43, 85, &PartyRecv::processPartyMemberInfo, 20170524); + packet(SMSG_PARTY_INFO, 0x0a44, -1, &PartyRecv::processPartyInfo, 20170524); +} + // 20170315 if (packetVersion >= 20170315) { @@ -1063,6 +1077,8 @@ if (packets_zero == true) packet(SMSG_ITEM_DROPPED, 0x0add, 22, &ItemRecv::processItemDropped, 20171018); packet(SMSG_ITEM_MOVE_FAILED, 0x0aa7, 6, &InventoryRecv::processItemMoveFailed, 20171018); packet(SMSG_SKILL_WARP_POINT, 0x0abe, -1, &SkillRecv::processSkillWarpPoint2, 20171018); + packet(SMSG_PARTY_MEMBER_INFO, 0x0a43, 85, &PartyRecv::processPartyMemberInfo, 20171018); + packet(SMSG_PARTY_INFO, 0x0a44, -1, &PartyRecv::processPartyInfo, 20171018); } // 20171207 diff --git a/src/net/eathena/partyrecv.cpp b/src/net/eathena/partyrecv.cpp index 9333b3433..93e28e944 100644 --- a/src/net/eathena/partyrecv.cpp +++ b/src/net/eathena/partyrecv.cpp @@ -42,6 +42,8 @@ #include "debug.h" +extern bool packets_zero; + namespace EAthena { @@ -63,7 +65,9 @@ void PartyRecv::processPartyMemberInfo(Net::MessageIn &msg) msg.readBeingId("char id"); const bool leader = msg.readInt32("leader") == 0U; int level = 0; - if (msg.getVersion() >= 20170502) + if (msg.getVersionMain() >= 20170524 || + msg.getVersionRe() >= 20170502 || + packets_zero == true) { msg.readInt16("class"); level = msg.readInt16("level"); @@ -194,7 +198,9 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg) { partySize = 4 + 4 + 24 + 16 + 1 + 1 + 2 + 2; } - else if (msg.getVersion() >= 20170502) + else if (msg.getVersionMain() >= 20170524 || + msg.getVersionRe() >= 20170502 || + packets_zero == true) { partySize = 4 + 24 + 16 + 1 + 1 + 2 + 2; } @@ -221,7 +227,9 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg) const bool leader = msg.readUInt8("leader") == 0U; const bool online = msg.readUInt8("online") == 0U; int level = 0; - if (msg.getVersion() >= 20170502) + if (msg.getVersionMain() >= 20170524 || + msg.getVersionRe() >= 20170502 || + packets_zero == true) { msg.readInt16("class"); level = msg.readInt16("level"); @@ -262,6 +270,7 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg) } } + // fix for wrong data sent by old hercules. in future need delete it if (msg.getVersion() >= 20170502 && msg.getUnreadLength() >= 6) { msg.readInt8("pickup item share (&1)"); |