From 5370f99a9a17c6813c227655dd2bb3e1d924c2a2 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Sep 2018 22:29:49 +0300 Subject: Add packet SMSG_PLAYER_GUILD_PARTY_INFO 0x0a30. --- src/net/eathena/beingrecv.cpp | 36 ++++++++++++++++++++++++++++++++++++ src/net/eathena/beingrecv.h | 1 + src/net/eathena/packetsin.inc | 6 ++++++ 3 files changed, 43 insertions(+) diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index c5e0321f2..9a20c8357 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1651,6 +1651,42 @@ void BeingRecv::processPlayerGuilPartyInfo(Net::MessageIn &msg) BLOCK_END("BeingRecv::processPlayerGuilPartyInfo") } +void BeingRecv::processPlayerGuilPartyInfo2(Net::MessageIn &msg) +{ + BLOCK_START("BeingRecv::processPlayerGuilPartyInfo2") + if (actorManager == nullptr) + { + BLOCK_END("BeingRecv::processPlayerGuilPartyInfo2") + return; + } + + const BeingId beingId = msg.readBeingId("being id"); + const std::string name = msg.readString(24, "char name"); + actorManager->updateNameId(name, beingId); + Being *const dstBeing = actorManager->findBeing(beingId); + if (dstBeing != nullptr) + { + if (beingId == localPlayer->getId()) + { + localPlayer->pingResponse(); + } + dstBeing->setName(name); + dstBeing->setPartyName(msg.readString(24, "party name")); + dstBeing->setGuildName(msg.readString(24, "guild name")); + dstBeing->setGuildPos(msg.readString(24, "guild pos")); + dstBeing->addToCache(); + } + else + { + msg.readString(24, "party name"); + msg.readString(24, "guild name"); + msg.readString(24, "guild pos"); + } + // +++ need use it for show player title + msg.readInt32("title"); + BLOCK_END("BeingRecv::processPlayerGuilPartyInfo2") +} + void BeingRecv::processBeingRemoveSkill(Net::MessageIn &msg) { const BeingId id = msg.readBeingId("skill unit id"); diff --git a/src/net/eathena/beingrecv.h b/src/net/eathena/beingrecv.h index cef6653c8..f6ac6d78e 100644 --- a/src/net/eathena/beingrecv.h +++ b/src/net/eathena/beingrecv.h @@ -81,6 +81,7 @@ namespace EAthena void processPlayerStatusChange(Net::MessageIn &msg); void processBeingResurrect(Net::MessageIn &msg); void processPlayerGuilPartyInfo(Net::MessageIn &msg); + void processPlayerGuilPartyInfo2(Net::MessageIn &msg); void processBeingRemoveSkill(Net::MessageIn &msg); void processBeingFakeName(Net::MessageIn &msg); void processBeingStatUpdate1(Net::MessageIn &msg); diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index b1a7475bb..191e801f5 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -938,6 +938,12 @@ if (packetVersion >= 20150422) packet(SMSG_BEING_HAT_EFFECTS, 0x0a3b, -1, &BeingRecv::processBeingHatEffects, 20150422); } +// 20150503 +if (packetVersion >= 20150503) +{ + packet(SMSG_PLAYER_GUILD_PARTY_INFO, 0x0a30, 106, &BeingRecv::processPlayerGuilPartyInfo2, 20150503); +} + // 20150513 if (packetVersion >= 20150513) { -- cgit v1.2.3-70-g09d2