summaryrefslogtreecommitdiff
path: root/src/net/eathena/chatrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-06 22:53:18 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-06 22:53:18 +0300
commitfbe1f9697c8a4f675d21c35a54d923fecd7af12e (patch)
tree010876080998bc3242ca1669497f4c26d04b33c5 /src/net/eathena/chatrecv.cpp
parent8ad5521d3bbb57040c746de4af2c82d0a8477936 (diff)
downloadplus-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.cpp11
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");