summaryrefslogtreecommitdiff
path: root/src/net
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
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')
-rw-r--r--src/net/eathena/chatrecv.cpp12
-rw-r--r--src/net/eathena/chatrecv.h1
-rw-r--r--src/net/eathena/packetsin.inc1
3 files changed, 14 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");
diff --git a/src/net/eathena/chatrecv.h b/src/net/eathena/chatrecv.h
index ec8b0528d..cf306056f 100644
--- a/src/net/eathena/chatrecv.h
+++ b/src/net/eathena/chatrecv.h
@@ -50,6 +50,7 @@ namespace EAthena
void processFormatMessageNumber(Net::MessageIn &msg);
void processFormatColor(Net::MessageIn &msg);
void processFormatMessageString(Net::MessageIn &msg);
+ void processFormatMessageStringColor(Net::MessageIn &msg);
void processFormatMessageSkill(Net::MessageIn &msg);
void processChatDisplay(Net::MessageIn &msg);
void processChatRoomJoinAck(Net::MessageIn &msg);
diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc
index 191e801f5..b11b20fbd 100644
--- a/src/net/eathena/packetsin.inc
+++ b/src/net/eathena/packetsin.inc
@@ -981,6 +981,7 @@ if (packetVersion >= 20151223)
if (packetVersion >= 20160330)
{
packet(SMSG_MAP_LOGIN_SUCCESS, 0x02eb, 13, &GameRecv::processMapLogin, 20160330);
+ packet(SMSG_FORMAT_MESSAGE_STRING_COLOR, 0x0a6f, -1, &ChatRecv::processFormatMessageStringColor, 20160330);
}
// 20160622