summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-28 01:18:36 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-28 02:33:43 +0300
commit6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d (patch)
tree11e9ac3c618606fea83108b18981867335616cbf
parente24f650a1271ecabe5ffa0a1f810cf0fa133f395 (diff)
downloadmanaplus-6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d.tar.gz
manaplus-6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d.tar.bz2
manaplus-6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d.tar.xz
manaplus-6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d.zip
Add packet SMSG_PARTY_MEMBER_JOB_LEVEL 0x0abd.
-rw-r--r--src/net/eathena/packetsin.inc1
-rw-r--r--src/net/eathena/partyrecv.cpp24
-rw-r--r--src/net/eathena/partyrecv.h1
3 files changed, 26 insertions, 0 deletions
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);