summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beingrecv.cpp7
-rw-r--r--src/net/tmwa/chatrecv.cpp13
-rw-r--r--src/net/tmwa/partyrecv.cpp8
3 files changed, 21 insertions, 7 deletions
diff --git a/src/net/tmwa/beingrecv.cpp b/src/net/tmwa/beingrecv.cpp
index 7b37d1438..d73abccc1 100644
--- a/src/net/tmwa/beingrecv.cpp
+++ b/src/net/tmwa/beingrecv.cpp
@@ -1398,11 +1398,16 @@ void BeingRecv::processIpResponse(Net::MessageIn &msg)
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("being id"));
- const std::string ip = ipToString(msg.readInt32("ip address"));
if (dstBeing != nullptr)
+ {
+ const std::string ip = ipToString(msg.readInt32("ip address"));
dstBeing->setIp(ip);
+ }
else
+ {
+ ipToString(msg.readInt32("ip address"));
DEBUGLOGSTR("invisible player?");
+ }
BLOCK_END("BeingRecv::processIpResponse")
}
diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp
index d0ac861df..afa501004 100644
--- a/src/net/tmwa/chatrecv.cpp
+++ b/src/net/tmwa/chatrecv.cpp
@@ -129,12 +129,15 @@ void ChatRecv::processGmChat(Net::MessageIn &msg)
return;
}
- std::string chatMsg = msg.readRawString(chatMsgLength, "message");
-
- if (localChatTab != nullptr)
+ if (localChatTab != nullptr &&
+ chatWindow != nullptr)
+ {
+ std::string chatMsg = msg.readRawString(chatMsgLength, "message");
+ chatWindow->addGlobalMessage(chatMsg);
+ }
+ else
{
- if (chatWindow != nullptr)
- chatWindow->addGlobalMessage(chatMsg);
+ msg.readRawString(chatMsgLength, "message");
}
BLOCK_END("ChatRecv::processChat")
}
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)