diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-07 17:00:08 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-07 17:00:08 +0300 |
commit | f50f6794a7e22ef496185cc874d14813236cdca0 (patch) | |
tree | d0357abfc7173ceb5dec662a52bf32e86caa6dda | |
parent | 201d66ca502db6602911ce69288d2adb975bba2d (diff) | |
download | manaverse-f50f6794a7e22ef496185cc874d14813236cdca0.tar.gz manaverse-f50f6794a7e22ef496185cc874d14813236cdca0.tar.bz2 manaverse-f50f6794a7e22ef496185cc874d14813236cdca0.tar.xz manaverse-f50f6794a7e22ef496185cc874d14813236cdca0.zip |
eathena: fix packet SMSG_WHISPER 0x0097.
-rw-r--r-- | src/net/eathena/chathandler.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index f10f8fcfb..69e6eae9a 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -127,9 +127,10 @@ void ChatHandler::privateMessage(const std::string &restrict recipient, const std::string &restrict text) { MessageOut outMsg(CMSG_CHAT_WHISPER); - outMsg.writeInt16(static_cast<int16_t>(text.length() + 28), "len"); + outMsg.writeInt16(static_cast<int16_t>(text.length() + 28 + 1), "len"); outMsg.writeString(recipient, 24, "recipient nick"); outMsg.writeString(text, static_cast<int>(text.length()), "message"); + outMsg.writeInt8(0, "null char"); mSentWhispers.push(recipient); } @@ -315,8 +316,9 @@ void ChatHandler::processChat(Net::MessageIn &msg) void ChatHandler::processWhisper(Net::MessageIn &msg) const { BLOCK_START("ChatHandler::processWhisper") - const int chatMsgLength = msg.readInt16("len") - 28; + const int chatMsgLength = msg.readInt16("len") - 32; std::string nick = msg.readString(24, "nick"); + msg.readInt32("admin flag"); if (chatMsgLength <= 0) { |