summaryrefslogtreecommitdiff
path: root/src/net/eathena/chatrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-25 22:46:52 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-25 22:46:52 +0300
commitf726b2f2e39711fc043a36518601d81b57294efd (patch)
tree97c3c1f33e8f13689de3c02fc7eddf4cfae1ead8 /src/net/eathena/chatrecv.cpp
parentd1e4efbd2f0dedf93a0d711eba97298a290a32cd (diff)
downloadplus-f726b2f2e39711fc043a36518601d81b57294efd.tar.gz
plus-f726b2f2e39711fc043a36518601d81b57294efd.tar.bz2
plus-f726b2f2e39711fc043a36518601d81b57294efd.tar.xz
plus-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.cpp12
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");