summaryrefslogtreecommitdiff
path: root/src/net/ea
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-07 11:47:21 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-07 11:47:21 +0300
commit5cdf6213512fae3f0f7eb960212a3b2eebe62b76 (patch)
tree79b9d4b8d5a5fbf1bf4cc1138e9f7cb61907cf3a /src/net/ea
parent74136eec9795d339421a569b774dd8486662e93e (diff)
downloadmanaplus-5cdf6213512fae3f0f7eb960212a3b2eebe62b76.tar.gz
manaplus-5cdf6213512fae3f0f7eb960212a3b2eebe62b76.tar.bz2
manaplus-5cdf6213512fae3f0f7eb960212a3b2eebe62b76.tar.xz
manaplus-5cdf6213512fae3f0f7eb960212a3b2eebe62b76.zip
Improve function processGuildBasicInfo.
Diffstat (limited to 'src/net/ea')
-rw-r--r--src/net/ea/guildhandler.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp
index b36b92c0d..bc6457765 100644
--- a/src/net/ea/guildhandler.cpp
+++ b/src/net/ea/guildhandler.cpp
@@ -112,18 +112,19 @@ void GuildHandler::processGuildMasterOrMember(Net::MessageIn &msg) const
void GuildHandler::processGuildBasicInfo(Net::MessageIn &msg)
{
- const int guildId = msg.readInt32(); // Guild ID
- const int level = msg.readInt32(); // Guild level
- const int members = msg.readInt32(); // 'Connect member'
- const int maxMembers = msg.readInt32(); // 'Max member'
- const int avgLevel = msg.readInt32(); // Average level
- const int exp = msg.readInt32(); // Exp
- const int nextExp = msg.readInt32(); // Next exp
- msg.skip(16); // 0 unused
- std::string name = msg.readString(24); // Name
- std::string master = msg.readString(24); // Master's name
- std::string castle = msg.readString(20); // Castles
- // (ie: "Six Castles" or "None Taken")
+ const int guildId = msg.readInt32("guild id");
+ const int level = msg.readInt32("guild level");
+ const int members = msg.readInt32("connect member");
+ const int maxMembers = msg.readInt32("max member");
+ const int avgLevel = msg.readInt32("average level");
+ const int exp = msg.readInt32("exp");
+ const int nextExp = msg.readInt32("next exp");
+ msg.skip(12, "unused");
+ const int emblem = msg.readInt32("emblem id");
+ std::string name = msg.readString(24, "guild name");
+ std::string master = msg.readString(24, "master name");
+ std::string castle = msg.readString(16, "castles");
+ msg.readInt32("unused");
if (guildTab && showBasicInfo)
{
@@ -161,6 +162,7 @@ void GuildHandler::processGuildBasicInfo(Net::MessageIn &msg)
if (!g)
return;
g->setName(name);
+ g->setEmblemId(emblem);
}
void GuildHandler::processGuildAlianceInfo(Net::MessageIn &msg) const