From 78d916e95061fb3bec4ba7791a2f20bcbeaecb3c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 19 Sep 2014 11:05:44 +0300 Subject: eathena: add packet CMSG_CHAT_JOIN 0x00d9. --- src/net/eathena/chathandler.cpp | 11 +++++++++++ src/net/eathena/chathandler.h | 3 +++ src/net/eathena/protocol.h | 1 + 3 files changed, 15 insertions(+) (limited to 'src/net/eathena') diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp index 7c08cbc28..d09234af3 100644 --- a/src/net/eathena/chathandler.cpp +++ b/src/net/eathena/chathandler.cpp @@ -469,4 +469,15 @@ void ChatHandler::processChatDisplay(Net::MessageIn &msg) dstBeing->setChat(obj); } +void ChatHandler::joinChat(const ChatObject *const chat, + const std::string &password) const +{ + if (!chat) + return; + + MessageOut outMsg(CMSG_CHAT_JOIN); + outMsg.writeInt32(chat->chatId, "chat id"); + outMsg.writeString(password, 8, "password"); +} + } // namespace EAthena diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h index 590d461ca..ad66c9303 100644 --- a/src/net/eathena/chathandler.h +++ b/src/net/eathena/chathandler.h @@ -72,6 +72,9 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler void battleTalk(const std::string &text) const override final; + void joinChat(const ChatObject *const chat, + const std::string &password) const override final; + protected: void processChat(Net::MessageIn &msg); diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h index 3bf1b08a8..2d32d6f54 100644 --- a/src/net/eathena/protocol.h +++ b/src/net/eathena/protocol.h @@ -247,6 +247,7 @@ #define CMSG_CHAT_MESSAGE 0x00f3 #define CMSG_CHAT_WHISPER 0x0096 #define CMSG_CHAT_WHO 0x00c1 +#define CMSG_CHAT_JOIN 0x00d9 #define CMSG_BATTLE_CHAT_MESSAGE 0x02db #define CMSG_CREAYE_CHAT_ROOM 0x00d5 -- cgit v1.2.3-70-g09d2