summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-09 16:52:53 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-09 16:52:53 +0300
commit0ff1cce3a289c2a813ed5db13250abbb23d2a9f0 (patch)
tree402329897036b7ce234088b176c6012e2a6f86a4 /src/net/eathena
parent6d76c23179a40662e5da9c04d3ddf578b8849c8d (diff)
downloadmv-0ff1cce3a289c2a813ed5db13250abbb23d2a9f0.tar.gz
mv-0ff1cce3a289c2a813ed5db13250abbb23d2a9f0.tar.bz2
mv-0ff1cce3a289c2a813ed5db13250abbb23d2a9f0.tar.xz
mv-0ff1cce3a289c2a813ed5db13250abbb23d2a9f0.zip
eathena: add packet CMSG_CREAYE_CHAT_ROOM 0x00d5.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/chathandler.cpp13
-rw-r--r--src/net/eathena/chathandler.h5
-rw-r--r--src/net/eathena/protocol.h2
3 files changed, 20 insertions, 0 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index d55a93dbb..414c6e4df 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -221,6 +221,19 @@ void ChatHandler::unIgnoreAll() const
outMsg.writeInt8(1, "flag");
}
+void ChatHandler::createChatRoom(const std::string &title,
+ const std::string &password,
+ const int limit,
+ const bool isPublic)
+{
+ MessageOut outMsg(CMSG_CREAYE_CHAT_ROOM);
+ outMsg.writeInt16(password.size() + title.size() + 5, "len");
+ outMsg.writeInt16(static_cast<int16_t>(limit), "limit");
+ outMsg.writeInt8(isPublic ? 1 : 0, "public");
+ outMsg.writeString(password, 8, "password");
+ outMsg.writeString(title, 36, "title");
+}
+
void ChatHandler::processChat(Net::MessageIn &msg)
{
BLOCK_START("ChatHandler::processChat")
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 05f2f7217..119651ef4 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -56,6 +56,11 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
void unIgnoreAll() const override final;
+ void createChatRoom(const std::string &title,
+ const std::string &password,
+ const int limit,
+ const bool isPublic) override final;
+
static void processRaw(MessageOut &restrict outMsg,
const std::string &restrict line);
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index c4042d7b7..82b0b0c8d 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -226,6 +226,8 @@
#define CMSG_CHAT_WHISPER 0x0096
#define CMSG_CHAT_WHO 0x00c1
+#define CMSG_CREAYE_CHAT_ROOM 0x00d5
+
#define CMSG_SKILL_LEVELUP_REQUEST 0x0112
#define CMSG_STAT_UPDATE_REQUEST 0x00bb
#define CMSG_SKILL_USE_BEING 0x083c