summaryrefslogtreecommitdiff
path: root/src/net/eathena/guildrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-30 22:51:23 +0300
commitef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2 (patch)
treec3d7c79fca18ac387d0c90512ef3201c92da5890 /src/net/eathena/guildrecv.cpp
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadplus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
plus-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/net/eathena/guildrecv.cpp')
-rw-r--r--src/net/eathena/guildrecv.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp
index 7f17f57db..d235c23bb 100644
--- a/src/net/eathena/guildrecv.cpp
+++ b/src/net/eathena/guildrecv.cpp
@@ -377,22 +377,33 @@ void GuildRecv::processGuildSkillInfo(Net::MessageIn &msg)
void GuildRecv::processGuildNotice(Net::MessageIn &msg)
{
- const std::string msg1 = msg.readString(60, "msg1");
- const std::string msg2 = msg.readString(120, "msg2");
if (guildTab != nullptr)
{
+ const std::string msg1 = msg.readString(60, "msg1");
+ const std::string msg2 = msg.readString(120, "msg2");
guildTab->chatLog(msg1, ChatMsgType::BY_SERVER);
guildTab->chatLog(msg2, ChatMsgType::BY_SERVER);
}
+ else
+ {
+ msg.readString(60, "msg1");
+ msg.readString(120, "msg2");
+ }
}
void GuildRecv::processGuildInvite(Net::MessageIn &msg)
{
const int guildId = msg.readInt32("guild id");
- const std::string guildName = msg.readString(24, "guild name");
if (socialWindow != nullptr)
+ {
+ const std::string guildName = msg.readString(24, "guild name");
socialWindow->showGuildInvite(guildName, guildId, "");
+ }
+ else
+ {
+ msg.readString(24, "guild name");
+ }
}
void GuildRecv::processGuildInviteAck(Net::MessageIn &msg)