summaryrefslogtreecommitdiff
path: root/src/net/eathena/chathandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-13 23:47:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-13 23:47:39 +0300
commitc037b2b49f9967a269032753c7b24961313c723f (patch)
tree8d405ed457ff805fd25543534036ace7ad28554d /src/net/eathena/chathandler.cpp
parent564fa0de49a384284868eaddbbdb9f87c58a3661 (diff)
downloadplus-c037b2b49f9967a269032753c7b24961313c723f.tar.gz
plus-c037b2b49f9967a269032753c7b24961313c723f.tar.bz2
plus-c037b2b49f9967a269032753c7b24961313c723f.tar.xz
plus-c037b2b49f9967a269032753c7b24961313c723f.zip
eathena: add partial support for packet SMSG_FORMAT_MESSAGE_SKILL 0x07e6.
Diffstat (limited to 'src/net/eathena/chathandler.cpp')
-rw-r--r--src/net/eathena/chathandler.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index 1e5d343e7..0dc632252 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -62,6 +62,7 @@ ChatHandler::ChatHandler() :
SMSG_CHAT_IGNORE_LIST,
SMSG_FORMAT_MESSAGE,
SMSG_FORMAT_MESSAGE_NUMBER,
+ SMSG_FORMAT_MESSAGE_SKILL,
0
};
handledMessages = _messages;
@@ -98,6 +99,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processFormatMessageNumber(msg);
break;
+ case SMSG_FORMAT_MESSAGE_SKILL:
+ processFormatMessageSkill(msg);
+ break;
+
case SMSG_COLOR_MESSAGE:
processColorChat(msg);
break;
@@ -307,6 +312,16 @@ void ChatHandler::processFormatMessageNumber(Net::MessageIn &msg)
processChatContinue(chatMsg);
}
+void ChatHandler::processFormatMessageSkill(Net::MessageIn &msg)
+{
+ const int skillId = msg.readInt16("skill id");
+ const int msgId = msg.readInt32("msg id");
+ // +++ here need load message from configuration file
+ const std::string chatMsg = strprintf(
+ "Message #%d, skill: %d", msgId, skillId);
+ processChatContinue(chatMsg);
+}
+
void ChatHandler::processColorChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")