diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-09-25 22:46:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-09-25 22:46:52 +0300 |
commit | f726b2f2e39711fc043a36518601d81b57294efd (patch) | |
tree | 97c3c1f33e8f13689de3c02fc7eddf4cfae1ead8 /src/net/eathena/chatrecv.cpp | |
parent | d1e4efbd2f0dedf93a0d711eba97298a290a32cd (diff) | |
download | manaplus-f726b2f2e39711fc043a36518601d81b57294efd.tar.gz manaplus-f726b2f2e39711fc043a36518601d81b57294efd.tar.bz2 manaplus-f726b2f2e39711fc043a36518601d81b57294efd.tar.xz manaplus-f726b2f2e39711fc043a36518601d81b57294efd.zip |
Add packet SMSG_FORMAT_MESSAGE_STRING_COLOR 0x0a6f.
Diffstat (limited to 'src/net/eathena/chatrecv.cpp')
-rw-r--r-- | src/net/eathena/chatrecv.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp index fdcdfe8ed..092fc0589 100644 --- a/src/net/eathena/chatrecv.cpp +++ b/src/net/eathena/chatrecv.cpp @@ -194,6 +194,18 @@ void ChatRecv::processFormatMessageString(Net::MessageIn &msg) processChatContinue(chatMsg, ChatMsgType::BY_SERVER); } +void ChatRecv::processFormatMessageStringColor(Net::MessageIn &msg) +{ + const int strLen = msg.readInt16("len") - 10; + const int msgId = msg.readInt16("msg id"); + msg.readInt32("color"); + 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"); |