diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-28 01:34:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-28 02:33:43 +0300 |
commit | b013c695838bb3c26687f230b6d33d68fc844448 (patch) | |
tree | acb593afe03223a34af5182973b9e9df12533bd6 /src/net/eathena/guildrecv.cpp | |
parent | 6c8aa7542d4b133eaeb32855c6ab4a3006d95f8d (diff) | |
download | mv-b013c695838bb3c26687f230b6d33d68fc844448.tar.gz mv-b013c695838bb3c26687f230b6d33d68fc844448.tar.bz2 mv-b013c695838bb3c26687f230b6d33d68fc844448.tar.xz mv-b013c695838bb3c26687f230b6d33d68fc844448.zip |
Add packet SMSG_GUILD_BASIC_INFO 0x0a84.
Diffstat (limited to 'src/net/eathena/guildrecv.cpp')
-rw-r--r-- | src/net/eathena/guildrecv.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index cb31788b6..2b3c2b9e2 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -105,19 +105,34 @@ void GuildRecv::processGuildBasicInfo(Net::MessageIn &msg) 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"); + std::string castle; + std::string master; + if (msg.getVersion() >= 20160622) + { + castle = msg.readString(16, "castles"); + msg.readInt32("money, unused"); + msg.readBeingId("leader char id"); + } + else + { + master = msg.readString(24, "master name"); + castle = msg.readString(16, "castles"); + msg.readInt32("money, unused"); + } - if ((guildTab != nullptr) && showBasicInfo) + if (guildTab != nullptr && + showBasicInfo) { showBasicInfo = false; // TRANSLATORS: guild info message guildTab->chatLog(strprintf(_("Guild name: %s"), name.c_str()), ChatMsgType::BY_SERVER); - // TRANSLATORS: guild info message - guildTab->chatLog(strprintf(_("Guild master: %s"), - master.c_str()), ChatMsgType::BY_SERVER); + if (!master.empty()) + { + // TRANSLATORS: guild info message + guildTab->chatLog(strprintf(_("Guild master: %s"), + master.c_str()), ChatMsgType::BY_SERVER); + } // TRANSLATORS: guild info message guildTab->chatLog(strprintf(_("Guild level: %d"), level), ChatMsgType::BY_SERVER); |