summaryrefslogtreecommitdiff
path: root/src/net/eathena/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/eathena/partyrecv.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/partyrecv.cpp')
-rw-r--r--src/net/eathena/partyrecv.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/net/eathena/partyrecv.cpp b/src/net/eathena/partyrecv.cpp
index 2f6482ac1..9ce0dbdce 100644
--- a/src/net/eathena/partyrecv.cpp
+++ b/src/net/eathena/partyrecv.cpp
@@ -176,9 +176,15 @@ void PartyRecv::processPartyInfo(Net::MessageIn &msg)
Ea::taParty->clearMembers();
const int length = msg.readInt16("len");
- const std::string name = msg.readString(24, "party name");
if (Ea::taParty != nullptr)
+ {
+ const std::string name = msg.readString(24, "party name");
Ea::taParty->setName(name);
+ }
+ else
+ {
+ msg.readString(24, "party name");
+ }
int partySize = 0;
int offset = 0;
@@ -370,6 +376,12 @@ void PartyRecv::processPartyLeader(Net::MessageIn &msg)
void PartyRecv::processPartyInvited(Net::MessageIn &msg)
{
+ if (socialWindow == nullptr)
+ {
+ msg.readInt32("party id");
+ msg.readString(24, "party name");
+ return;
+ }
const int id = msg.readInt32("party id");
const std::string partyName = msg.readString(24, "party name");