From eb351e02c9796a94d70734e54c5eb0f01ff623e7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 18 Mar 2015 12:55:28 +0300 Subject: eathena: add partial support for packet SMSG_SCRIPT_MESSAGE 0x08b3. --- src/net/eathena/chathandler.cpp | 12 ++++++++++++ src/net/eathena/chathandler.h | 2 ++ src/net/eathena/packets.h | 2 +- src/net/eathena/protocol.h | 1 + 4 files changed, 16 insertions(+), 1 deletion(-) (limited to 'src/net/eathena') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 1748f0c7a..fad5f2c1b 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -90,6 +90,7 @@ ChatHandler::ChatHandler() : SMSG_CHAT_SILENCE, SMSG_CHAT_TALKIE_BOX, SMSG_BATTLE_CHAT_MESSAGE, + SMSG_SCRIPT_MESSAGE, 0 }; handledMessages = _messages; @@ -226,6 +227,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg) processBattleChatMessage(msg); break; + case SMSG_SCRIPT_MESSAGE: + processScriptMessage(msg); + break; + default: break; } @@ -926,5 +931,12 @@ void ChatHandler::processBattleChatMessage(Net::MessageIn &msg) msg.readString(sz, "message"); } +void ChatHandler::processScriptMessage(Net::MessageIn &msg) +{ + UNIMPLIMENTEDPACKET; + const int sz = msg.readInt16("len") - 8; + msg.readInt32("being id"); + msg.readString(sz, "message"); +} } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index c8e5dd3e6..37ad3ad5e 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -153,6 +153,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler static void processChatTalkieBox(Net::MessageIn &msg); static void processBattleChatMessage(Net::MessageIn &msg); + + static void processScriptMessage(Net::MessageIn &msg); }; } // namespace EAthena diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h index a349fb33f..31100d73b 100644 --- a/src/net/eathena/packets.h +++ b/src/net/eathena/packets.h @@ -228,7 +228,7 @@ int16_t packet_lengths[] = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 10, 0, 0, 0, 0, 0, + 0, 0, 0, -1, 0, 0, 0, 0, 0, 12, 10, 0, 0, 0, 0, 0, // #0x08C0 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, -1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 394103ca9..2af772dc6 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -307,6 +307,7 @@ #define SMSG_MONSTER_INFO 0x018c #define SMSG_PLAYER_HP 0x080e #define SMSG_PVP_INFO 0x0210 +#define SMSG_SCRIPT_MESSAGE 0x08b3 #define SMSG_CHAT_IGNORE_LIST 0x00d4 #define SMSG_CHAT_CREATE_ACK 0x00d6 -- cgit v1.2.3-70-g09d2