diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-13 23:47:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-13 23:47:39 +0300 |
commit | c037b2b49f9967a269032753c7b24961313c723f (patch) | |
tree | 8d405ed457ff805fd25543534036ace7ad28554d /src/net/eathena/chathandler.cpp | |
parent | 564fa0de49a384284868eaddbbdb9f87c58a3661 (diff) | |
download | manaplus-c037b2b49f9967a269032753c7b24961313c723f.tar.gz manaplus-c037b2b49f9967a269032753c7b24961313c723f.tar.bz2 manaplus-c037b2b49f9967a269032753c7b24961313c723f.tar.xz manaplus-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.cpp | 15 |
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") |