diff options
Diffstat (limited to 'src/net/eathena/guildrecv.cpp')
-rw-r--r-- | src/net/eathena/guildrecv.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 3d402c5b9..a07d28d2e 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -423,15 +423,9 @@ 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) @@ -564,9 +558,11 @@ void GuildRecv::processGuildMessage(Net::MessageIn &msg) if (msgLength <= 0) return; + + std::string chatMsg = msg.readString(msgLength, "message"); + if (guildTab != nullptr) { - std::string chatMsg = msg.readString(msgLength, "message"); const size_t pos = chatMsg.find(" : ", 0); if (pos != std::string::npos) { @@ -586,7 +582,6 @@ void GuildRecv::processGuildMessage(Net::MessageIn &msg) else { DEBUGLOGSTR("invisible guild?"); - msg.readString(msgLength, "message"); } } |