From d82994bca93b4278c4751a2a4c1313ba2f41bd4b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 30 Sep 2014 22:14:53 +0300 Subject: eathena: add packet SMSG_GUILD_UPDATE_COORDS 0x01eb. --- src/net/eathena/guildhandler.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/net/eathena/guildhandler.cpp') diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 5508b13d9..27d848e74 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -68,6 +68,7 @@ GuildHandler::GuildHandler() : SMSG_GUILD_DEL_ALLIANCE, SMSG_GUILD_OPPOSITION_ACK, SMSG_GUILD_BROKEN, + SMSG_GUILD_UPDATE_COORDS, 0 }; handledMessages = _messages; @@ -187,11 +188,28 @@ void GuildHandler::handleMessage(Net::MessageIn &msg) processGuildBroken(msg); break; + case SMSG_GUILD_UPDATE_COORDS: + processGuildUpdateCoords(msg); + break; + default: break; } } +void GuildHandler::processGuildUpdateCoords(Net::MessageIn &msg) const +{ + const int id = msg.readInt32("account id"); + const int x = msg.readInt16("x"); + const int y = msg.readInt16("y"); + if (Ea::taGuild) + { + GuildMember *const m = Ea::taGuild->getMember(id); + m->setX(x); + m->setY(y); + } +} + void GuildHandler::create(const std::string &name) const { MessageOut msg(CMSG_GUILD_CREATE); -- cgit v1.2.3-70-g09d2