summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-17 21:53:11 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-17 21:53:11 +0300
commit3c7ea10478b5cfa3ca6433e096630c3cb35b5f68 (patch)
tree3ff368ba4a69c9583ea08c6e7c2a2850ec28d2e0
parent67d2b4560247210d6b20d36ba725be6bf5d4fd53 (diff)
downloadmanaverse-3c7ea10478b5cfa3ca6433e096630c3cb35b5f68.tar.gz
manaverse-3c7ea10478b5cfa3ca6433e096630c3cb35b5f68.tar.bz2
manaverse-3c7ea10478b5cfa3ca6433e096630c3cb35b5f68.tar.xz
manaverse-3c7ea10478b5cfa3ca6433e096630c3cb35b5f68.zip
eathena: add partial support for packet SMSG_BATTLE_CHAT_MESSAGE 0x02dc.
-rw-r--r--src/net/eathena/chathandler.cpp15
-rw-r--r--src/net/eathena/chathandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h2
4 files changed, 20 insertions, 1 deletions
diff --git a/src/net/eathena/chathandler.cpp b/src/net/eathena/chathandler.cpp
index e8d857cf2..1748f0c7a 100644
--- a/src/net/eathena/chathandler.cpp
+++ b/src/net/eathena/chathandler.cpp
@@ -89,6 +89,7 @@ ChatHandler::ChatHandler() :
SMSG_MANNER_MESSAGE,
SMSG_CHAT_SILENCE,
SMSG_CHAT_TALKIE_BOX,
+ SMSG_BATTLE_CHAT_MESSAGE,
0
};
handledMessages = _messages;
@@ -221,6 +222,10 @@ void ChatHandler::handleMessage(Net::MessageIn &msg)
processChatTalkieBox(msg);
break;
+ case SMSG_BATTLE_CHAT_MESSAGE:
+ processBattleChatMessage(msg);
+ break;
+
default:
break;
}
@@ -912,4 +917,14 @@ void ChatHandler::processChatTalkieBox(Net::MessageIn &msg)
msg.readString(80, "message");
}
+void ChatHandler::processBattleChatMessage(Net::MessageIn &msg)
+{
+ UNIMPLIMENTEDPACKET;
+ const int sz = msg.readInt16("len") - 24 - 8;
+ msg.readInt32("account id");
+ msg.readString(24, "nick");
+ msg.readString(sz, "message");
+}
+
+
} // namespace EAthena
diff --git a/src/net/eathena/chathandler.h b/src/net/eathena/chathandler.h
index 257df525c..c8e5dd3e6 100644
--- a/src/net/eathena/chathandler.h
+++ b/src/net/eathena/chathandler.h
@@ -151,6 +151,8 @@ class ChatHandler final : public MessageHandler, public Ea::ChatHandler
static void processChatSilence(Net::MessageIn &msg);
static void processChatTalkieBox(Net::MessageIn &msg);
+
+ static void processBattleChatMessage(Net::MessageIn &msg);
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index 63b41c21c..3a1a4729f 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -99,7 +99,7 @@ int16_t packet_lengths[] =
0, -1, -1, 107, 6, -1, 0, 7, 22, 191, 0, 8, 0, 0, 0, 0,
// #0x02C0
0, -1, 0, 0, 0, 30, 30, 0, 0, 3, 0, 65, 4, 71, 10, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 3, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 3, 0, -1, 0, 0, 0,
0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//0 1 2 3 4 5 6 7 8 9 a b c d e f
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index 5779d743a..578017b52 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -420,6 +420,8 @@
#define SMSG_INSTANCE_INFO 0x02cd
#define SMSG_INSTANCE_DELETE 0x02ce
+#define SMSG_BATTLE_CHAT_MESSAGE 0x02dc
+
/**********************************
* Packets from client to server *
**********************************/