summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/net/eathena/packetsin.inc1
-rw-r--r--src/net/eathena/partyrecv.cpp46
2 files changed, 35 insertions, 12 deletions
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 0c2695589..d087611ac 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -910,6 +910,7 @@ if (packetVersion >= 20170329)
if (packetVersion >= 20170502)
{
packet(SMSG_PARTY_MEMBER_INFO, 0x0a43, 85, &PartyRecv::processPartyMemberInfo, 20170502);
+ packet(SMSG_PARTY_INFO, 0x0a44, -1, &PartyRecv::processPartyInfo, 20170502);
}
// 0
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();