summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 21:02:57 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 21:02:57 +0300
commitade52fa9b4255a9031ab4d567606f0d22ea6089c (patch)
tree29bd5e0759d967e67f73c0ebb76c05a5d31fe2b5
parent9ca0103f281a176af021197496fd2bd6f65ba05b (diff)
downloadmanaverse-ade52fa9b4255a9031ab4d567606f0d22ea6089c.tar.gz
manaverse-ade52fa9b4255a9031ab4d567606f0d22ea6089c.tar.bz2
manaverse-ade52fa9b4255a9031ab4d567606f0d22ea6089c.tar.xz
manaverse-ade52fa9b4255a9031ab4d567606f0d22ea6089c.zip
eathena: fix packet SMSG_PARTY_MESSAGE 0x0109.
-rw-r--r--src/net/eathena/partyhandler.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index 265f4cc0e..6748666c0 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -387,8 +387,12 @@ void PartyHandler::processPartyMessage(Net::MessageIn &msg) const
if (msgLength <= 0)
return;
- const int id = msg.readInt32();
- const std::string chatMsg = msg.readString(msgLength);
+ const int id = msg.readInt32("id");
+ std::string chatMsg = msg.readString(msgLength, "message");
+
+ const size_t pos = chatMsg.find(" : ", 0);
+ if (pos != std::string::npos)
+ chatMsg.erase(0, pos + 3);
if (Ea::taParty && Ea::partyTab)
{