summaryrefslogtreecommitdiff
path: root/src/net/tmwa/partyrecv.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/tmwa/partyrecv.cpp
parent22b64d16b613c1e5b26632237879b167024788ab (diff)
downloadmv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.gz
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.bz2
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.tar.xz
mv-ef8ef35d28daa3ea7dd542078ac9c0d3f7a9a5e2.zip
Move some variables to better scope.
Diffstat (limited to 'src/net/tmwa/partyrecv.cpp')
-rw-r--r--src/net/tmwa/partyrecv.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/net/tmwa/partyrecv.cpp b/src/net/tmwa/partyrecv.cpp
index 819b891d3..b25a501c8 100644
--- a/src/net/tmwa/partyrecv.cpp
+++ b/src/net/tmwa/partyrecv.cpp
@@ -224,7 +224,6 @@ void PartyRecv::processPartyInviteResponse(Net::MessageIn &msg)
void PartyRecv::processPartyInvited(Net::MessageIn &msg)
{
const BeingId id = msg.readBeingId("account id");
- const std::string partyName = msg.readString(24, "party name");
std::string nick;
if (actorManager != nullptr)
@@ -238,7 +237,14 @@ void PartyRecv::processPartyInvited(Net::MessageIn &msg)
}
if (socialWindow != nullptr)
+ {
+ const std::string partyName = msg.readString(24, "party name");
socialWindow->showPartyInvite(partyName, nick, 0);
+ }
+ else
+ {
+ msg.readString(24, "party name");
+ }
}
void PartyRecv::processPartyMove(Net::MessageIn &msg)