summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 20:43:10 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 20:43:10 +0300
commit4c06de57e1fb092ff320ab933e7651724b757bf3 (patch)
tree578c73ad362f91ff6788f5851a63a4085932abe7 /src/net/eathena
parent4fc40c384a3423e43f2e589809c9bc9aa8bda495 (diff)
downloadplus-4c06de57e1fb092ff320ab933e7651724b757bf3.tar.gz
plus-4c06de57e1fb092ff320ab933e7651724b757bf3.tar.bz2
plus-4c06de57e1fb092ff320ab933e7651724b757bf3.tar.xz
plus-4c06de57e1fb092ff320ab933e7651724b757bf3.zip
eathena: fix sending packet CMSG_PARTY_MESSAGE.
Diffstat (limited to 'src/net/eathena')
-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 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