From b088123d1818b9b3585032906036778128c76bfc Mon Sep 17 00:00:00 2001 From: Lukas Pioch Date: Thu, 22 Sep 2016 11:51:22 +0200 Subject: Added SendMessageRaw for sending json string. --- src/Protocol/Protocol19x.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Protocol/Protocol19x.cpp') diff --git a/src/Protocol/Protocol19x.cpp b/src/Protocol/Protocol19x.cpp index 6e26b2012..5f3b9ec27 100644 --- a/src/Protocol/Protocol19x.cpp +++ b/src/Protocol/Protocol19x.cpp @@ -293,6 +293,20 @@ void cProtocol190::SendChat(const cCompositeChat & a_Message, eChatType a_Type, +void cProtocol190::SendChatRaw(const AString & a_MessageRaw, eChatType a_Type) +{ + ASSERT(m_State == 3); // In game mode? + + // Send the json string to the client: + cPacketizer Pkt(*this, 0x0f); // Chat Message packet + Pkt.WriteString(a_MessageRaw); + Pkt.WriteBEInt8(a_Type); +} + + + + + void cProtocol190::SendChunkData(int a_ChunkX, int a_ChunkZ, cChunkDataSerializer & a_Serializer) { ASSERT(m_State == 3); // In game mode? -- cgit v1.2.3