diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-07 20:43:10 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-07 20:43:10 +0300 |
commit | 4c06de57e1fb092ff320ab933e7651724b757bf3 (patch) | |
tree | 578c73ad362f91ff6788f5851a63a4085932abe7 /src/net/eathena | |
parent | 4fc40c384a3423e43f2e589809c9bc9aa8bda495 (diff) | |
download | mv-4c06de57e1fb092ff320ab933e7651724b757bf3.tar.gz mv-4c06de57e1fb092ff320ab933e7651724b757bf3.tar.bz2 mv-4c06de57e1fb092ff320ab933e7651724b757bf3.tar.xz mv-4c06de57e1fb092ff320ab933e7651724b757bf3.zip |
eathena: fix sending packet CMSG_PARTY_MESSAGE.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 8cd864ea0..83dae97f5 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -196,8 +196,12 @@ void PartyHandler::kick(const std::string &name) const void PartyHandler::chat(const std::string &text) const { MessageOut outMsg(CMSG_PARTY_MESSAGE); - outMsg.writeInt16(static_cast<int16_t>(text.length() + 4)); - outMsg.writeString(text, static_cast<int>(text.length())); + const std::string mes = std::string(localPlayer->getName()).append( + " : ").append(text); + + outMsg.writeInt16(static_cast<int16_t>(mes.length() + 4 + 1), "len"); + outMsg.writeString(mes, static_cast<int>(mes.length()), "nick : message"); + outMsg.writeInt8(0, "null char"); } void PartyHandler::setShareExperience(const Net::PartyShare::Type share) const |