From dbf8165f63583e7cefd1e0e982f0cb62e725cdae Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Sep 2018 20:44:11 +0300 Subject: Update packet versions for packets SMSG_PARTY_MEMBER_INFO and SMSG_PARTY_INFO. --- src/net/eathena/packetsin.inc | 16 ++++++++++++++++ src/net/eathena/partyrecv.cpp | 15 ++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) (limited to 'src/net/eathena') 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)"); -- cgit v1.2.3-70-g09d2