From 4c06de57e1fb092ff320ab933e7651724b757bf3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Sep 2014 20:43:10 +0300 Subject: eathena: fix sending packet CMSG_PARTY_MESSAGE. --- src/net/eathena/partyhandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/net') 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(text.length() + 4)); - outMsg.writeString(text, static_cast(text.length())); + const std::string mes = std::string(localPlayer->getName()).append( + " : ").append(text); + + outMsg.writeInt16(static_cast(mes.length() + 4 + 1), "len"); + outMsg.writeString(mes, static_cast(mes.length()), "nick : message"); + outMsg.writeInt8(0, "null char"); } void PartyHandler::setShareExperience(const Net::PartyShare::Type share) const -- cgit v1.2.3-60-g2f50