summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-25 22:14:49 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-25 22:14:49 +0300
commit9c7134fb1991509f9795fb8cd8eec4cf818a93fc (patch)
tree0667306b2a2a22c8519ceac568828af92a1a2f3f /src/net
parent9793b9e60f2ca5a163fce8e284d20c36c74ea094 (diff)
downloadmv-9c7134fb1991509f9795fb8cd8eec4cf818a93fc.tar.gz
mv-9c7134fb1991509f9795fb8cd8eec4cf818a93fc.tar.bz2
mv-9c7134fb1991509f9795fb8cd8eec4cf818a93fc.tar.xz
mv-9c7134fb1991509f9795fb8cd8eec4cf818a93fc.zip
Add packet SMSG_GUILD_SET_POSITION 0x0afd.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/guildrecv.cpp17
-rw-r--r--src/net/eathena/guildrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc6
3 files changed, 24 insertions, 0 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp
index 574090c8f..b5450e1aa 100644
--- a/src/net/eathena/guildrecv.cpp
+++ b/src/net/eathena/guildrecv.cpp
@@ -802,4 +802,21 @@ void GuildRecv::processOnlineInfo(Net::MessageIn &msg)
msg.readInt32("online");
}
+void GuildRecv::processGuildSetPosition(Net::MessageIn &msg)
+{
+ const int positionLen = msg.readInt16("len") - 8;
+ const BeingId beingId = msg.readBeingId("being id");
+ std::string position;
+ if (positionLen > 0)
+ {
+ position = msg.readString(positionLen, "position");
+ }
+ Being *const dstBeing = actorManager->findBeing(beingId);
+ if (dstBeing != nullptr)
+ {
+ dstBeing->setGuildPos(position);
+ dstBeing->addToCache();
+ }
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/guildrecv.h b/src/net/eathena/guildrecv.h
index 35548048d..a9ce1251c 100644
--- a/src/net/eathena/guildrecv.h
+++ b/src/net/eathena/guildrecv.h
@@ -69,6 +69,7 @@ namespace EAthena
void processGuildExpulsionList(Net::MessageIn &msg);
void processGuildEmblem(Net::MessageIn &msg);
void processOnlineInfo(Net::MessageIn &msg);
+ void processGuildSetPosition(Net::MessageIn &msg);
} // namespace GuildRecv
extern Guild *taGuild;
} // namespace EAthena
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 194798849..b1a7475bb 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -1195,6 +1195,12 @@ if (packetVersion >= 20180418)
packet(SMSG_ITEM_DROPPED, 0x0add, 22, &ItemRecv::processItemDropped, 20180418);
}
+// 20180605
+if (packetVersion >= 20180605)
+{
+ packet(SMSG_GUILD_SET_POSITION, 0x0afd, -1, &GuildRecv::processGuildSetPosition, 20180605);
+}
+
// re 20180620
if (packetVersionMain >= 20180620)
{