diff options
author | David Athay <ko2fan@gmail.com> | 2008-04-03 16:41:57 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-04-03 16:41:57 +0000 |
commit | bcf5c0057dfafbe56f6b83b7300016c57a98041d (patch) | |
tree | b8ce02b754ac1198a1e85b5a94ffa526ab5d76f7 /src/net | |
parent | f19980be3abfc418dfc1f1411e3a9fc161620afa (diff) | |
download | mana-client-bcf5c0057dfafbe56f6b83b7300016c57a98041d.tar.gz mana-client-bcf5c0057dfafbe56f6b83b7300016c57a98041d.tar.bz2 mana-client-bcf5c0057dfafbe56f6b83b7300016c57a98041d.tar.xz mana-client-bcf5c0057dfafbe56f6b83b7300016c57a98041d.zip |
Added updating guild member list
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/guildhandler.cpp | 17 | ||||
-rw-r--r-- | src/net/protocol.h | 13 |
2 files changed, 21 insertions, 9 deletions
diff --git a/src/net/guildhandler.cpp b/src/net/guildhandler.cpp index 70529121..494dcdc0 100644 --- a/src/net/guildhandler.cpp +++ b/src/net/guildhandler.cpp @@ -50,8 +50,7 @@ GuildHandler::GuildHandler() CPMSG_GUILD_INVITE_RESPONSE, CPMSG_GUILD_ACCEPT_RESPONSE, CPMSG_GUILD_GET_MEMBERS_RESPONSE, - CPMSG_GUILD_JOINED, - CPMSG_GUILD_LEFT, + CPMSG_GUILD_UPDATE_LIST, CPMSG_GUILD_INVITED, CPMSG_GUILD_REJOIN, CPMSG_GUILD_QUIT_RESPONSE, @@ -117,6 +116,20 @@ void GuildHandler::handleMessage(MessageIn &msg) } } break; + case CPMSG_GUILD_UPDATE_LIST: + { + logger->log("Received CPMSG_GUILD_UPDATE_LIST"); + short guildId = msg.readInt16(); + std::string guildMember = msg.readString(); + + Guild *guild = player_node->getGuild(guildId); + if (guild) + { + guild->addMember(guildMember); + } + guildWindow->updateTab(); + } break; + case CPMSG_GUILD_INVITED: { logger->log("Received CPMSG_GUILD_INVITED"); diff --git a/src/net/protocol.h b/src/net/protocol.h index acabb77b..748a4e11 100644 --- a/src/net/protocol.h +++ b/src/net/protocol.h @@ -133,20 +133,19 @@ enum { // Guild PCMSG_GUILD_CREATE = 0x0350, // S name - CPMSG_GUILD_CREATE_RESPONSE = 0x0351, // B error, W id, S name + CPMSG_GUILD_CREATE_RESPONSE = 0x0351, // B error, W guild, B rights, W channel PCMSG_GUILD_INVITE = 0x0352, // W id, S name CPMSG_GUILD_INVITE_RESPONSE = 0x0353, // B error PCMSG_GUILD_ACCEPT = 0x0354, // W id - CPMSG_GUILD_ACCEPT_RESPONSE = 0x0355, // B error, W id, S name, W leader + CPMSG_GUILD_ACCEPT_RESPONSE = 0x0355, // B error, W guild, B rights, W channel PCMSG_GUILD_GET_MEMBERS = 0x0356, // W id CPMSG_GUILD_GET_MEMBERS_RESPONSE = 0x0357, // S names + CPMSG_GUILD_UPDATE_LIST = 0x0358, // W id, S name PCMSG_GUILD_QUIT = 0x0360, // W id CPMSG_GUILD_QUIT_RESPONSE = 0x0361, // B error - - CPMSG_GUILD_INVITED = 0x0370, // S name, S name - CPMSG_GUILD_REJOIN = 0x0371, // S name, W id, W rights - CPMSG_GUILD_JOINED = 0x90, - CPMSG_GUILD_LEFT = 0x90, + + CPMSG_GUILD_INVITED = 0x0370, // S char name, S guild name, W id + CPMSG_GUILD_REJOIN = 0x0371, // S name, W guild, B rights, W channel // Chat CPMSG_ERROR = 0x0401, // B error |