diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-04-06 22:53:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-04-06 22:53:18 +0300 |
commit | fbe1f9697c8a4f675d21c35a54d923fecd7af12e (patch) | |
tree | 010876080998bc3242ca1669497f4c26d04b33c5 /src/net/eathena/chatrecv.cpp | |
parent | 8ad5521d3bbb57040c746de4af2c82d0a8477936 (diff) | |
download | plus-fbe1f9697c8a4f675d21c35a54d923fecd7af12e.tar.gz plus-fbe1f9697c8a4f675d21c35a54d923fecd7af12e.tar.bz2 plus-fbe1f9697c8a4f675d21c35a54d923fecd7af12e.tar.xz plus-fbe1f9697c8a4f675d21c35a54d923fecd7af12e.zip |
Add packet SMSG_FORMAT_MESSAGE_STRING 0x02c2.
Diffstat (limited to 'src/net/eathena/chatrecv.cpp')
-rw-r--r-- | src/net/eathena/chatrecv.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp index eb6892545..faac6f014 100644 --- a/src/net/eathena/chatrecv.cpp +++ b/src/net/eathena/chatrecv.cpp @@ -173,6 +173,17 @@ void ChatRecv::processFormatMessageNumber(Net::MessageIn &msg) processChatContinue(chatMsg, ChatMsgType::BY_SERVER); } +void ChatRecv::processFormatMessageString(Net::MessageIn &msg) +{ + const int strLen = msg.readInt16("len") - 6; + const int msgId = msg.readInt16("msg id"); + const std::string message = msg.readString(strLen, "value"); + // +++ here need load message from configuration file + const std::string chatMsg = strprintf( + "Message #%d, value: %s", msgId, message.c_str()); + processChatContinue(chatMsg, ChatMsgType::BY_SERVER); +} + void ChatRecv::processFormatMessageSkill(Net::MessageIn &msg) { const int skillId = msg.readInt16("skill id"); |