From 6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 28 Jun 2017 01:18:36 +0300 Subject: Add packet SMSG_PARTY_MEMBER_JOB_LEVEL 0x0abd. --- src/net/eathena/packetsin.inc | 1 + src/net/eathena/partyrecv.cpp | 24 ++++++++++++++++++++++++ src/net/eathena/partyrecv.h | 1 + 3 files changed, 26 insertions(+) (limited to 'src') diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index d087611ac..3ceb26a70 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -911,6 +911,7 @@ if (packetVersion >= 20170502) { packet(SMSG_PARTY_MEMBER_INFO, 0x0a43, 85, &PartyRecv::processPartyMemberInfo, 20170502); packet(SMSG_PARTY_INFO, 0x0a44, -1, &PartyRecv::processPartyInfo, 20170502); + packet(SMSG_PARTY_MEMBER_JOB_LEVEL, 0x0abd, 10, &PartyRecv::processPartyMemberJobLevel, 20170502); } // 0 diff --git a/src/net/eathena/partyrecv.cpp b/src/net/eathena/partyrecv.cpp index c3cbd102c..e820a0eac 100644 --- a/src/net/eathena/partyrecv.cpp +++ b/src/net/eathena/partyrecv.cpp @@ -37,6 +37,8 @@ #include "net/ea/partyrecv.h" +#include "utils/checkutils.h" + #include "debug.h" namespace EAthena @@ -90,6 +92,28 @@ void PartyRecv::processPartyMemberInfo(Net::MessageIn &msg) } } +void PartyRecv::processPartyMemberJobLevel(Net::MessageIn &msg) +{ + const BeingId id = msg.readBeingId("account id"); + msg.readInt16("class"); + const int level = msg.readInt16("level"); + + if (Ea::taParty == nullptr) + return; + + PartyMember *const member = Ea::taParty->getMember(id); + if (member != nullptr) + { + member->setOnline(true); + if (level != 0) + member->setLevel(level); + } + else + { + reportAlways("processPartyMemberJobLevel: party member not exists."); + } +} + void PartyRecv::processPartySettings(Net::MessageIn &msg) { if (partyTab == nullptr) diff --git a/src/net/eathena/partyrecv.h b/src/net/eathena/partyrecv.h index d0e7537e7..d89413297 100644 --- a/src/net/eathena/partyrecv.h +++ b/src/net/eathena/partyrecv.h @@ -44,6 +44,7 @@ namespace EAthena void processPartyItemPickup(Net::MessageIn &msg); void processPartyLeader(Net::MessageIn &msg); void processPartyInvited(Net::MessageIn &msg); + void processPartyMemberJobLevel(Net::MessageIn &msg); void processPartyAutoItemSettingsContinue(Net::MessageIn &msg, const PartyShareT item); -- cgit v1.2.3-70-g09d2