summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-30 22:14:53 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-30 22:14:53 +0300
commitd82994bca93b4278c4751a2a4c1313ba2f41bd4b (patch)
tree67917fb2dae7f57c62c75981dc62f5d9679241b0
parentcee0e9966fb9ec9068aa7483cf38ff128508193b (diff)
downloadmanaverse-d82994bca93b4278c4751a2a4c1313ba2f41bd4b.tar.gz
manaverse-d82994bca93b4278c4751a2a4c1313ba2f41bd4b.tar.bz2
manaverse-d82994bca93b4278c4751a2a4c1313ba2f41bd4b.tar.xz
manaverse-d82994bca93b4278c4751a2a4c1313ba2f41bd4b.zip
eathena: add packet SMSG_GUILD_UPDATE_COORDS 0x01eb.
-rw-r--r--src/net/eathena/guildhandler.cpp18
-rw-r--r--src/net/eathena/guildhandler.h3
-rw-r--r--src/net/eathena/protocol.h1
3 files changed, 22 insertions, 0 deletions
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);
diff --git a/src/net/eathena/guildhandler.h b/src/net/eathena/guildhandler.h
index aeda0c210..a32a398f5 100644
--- a/src/net/eathena/guildhandler.h
+++ b/src/net/eathena/guildhandler.h
@@ -72,6 +72,9 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler
const override final;
void checkMaster() const;
+
+ protected:
+ void processGuildUpdateCoords(Net::MessageIn &msg) const;
};
extern Ea::GuildTab *guildTab;
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 45356938e..005d1c863 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -204,6 +204,7 @@
#define SMSG_GUILD_DEL_ALLIANCE 0x0184
#define SMSG_GUILD_OPPOSITION_ACK 0x0181
#define SMSG_GUILD_BROKEN 0x015e
+#define SMSG_GUILD_UPDATE_COORDS 0x01eb
#define SMSG_QUEST_ADD 0x02b3
#define SMSG_QUEST_LIST 0x02b1