summaryrefslogtreecommitdiffstats
path: root/source/Protocol/Protocol15x.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-14 21:34:37 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-03-14 21:34:37 +0100
commit75cc675bf2fe0bf69c819b47a3235bbb6c14baaa (patch)
tree6eb2509ab8a349147162673d5650ff04be62a43c /source/Protocol/Protocol15x.cpp
parentAdded a Noop fluid simulator that doesn't do anything with the fluid (fluid doesn't spread at all, behaves like a normal block) (diff)
downloadcuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.tar
cuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.tar.gz
cuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.tar.bz2
cuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.tar.lz
cuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.tar.xz
cuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.tar.zst
cuberite-75cc675bf2fe0bf69c819b47a3235bbb6c14baaa.zip
Diffstat (limited to 'source/Protocol/Protocol15x.cpp')
-rw-r--r--source/Protocol/Protocol15x.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/source/Protocol/Protocol15x.cpp b/source/Protocol/Protocol15x.cpp
new file mode 100644
index 000000000..61358fcdb
--- /dev/null
+++ b/source/Protocol/Protocol15x.cpp
@@ -0,0 +1,59 @@
+
+// Protocol15x.cpp
+
+/*
+Implements the 1.5.x protocol classes:
+ - cProtocol150
+ - release 1.5 protocol (#60)
+(others may be added later in the future for the 1.5 release series)
+*/
+
+#include "Globals.h"
+#include "Protocol15x.h"
+
+
+
+
+
+enum
+{
+ PACKET_WINDOW_OPEN = 0x64,
+} ;
+
+
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// cProtocol150:
+
+cProtocol150::cProtocol150(cClientHandle * a_Client) :
+ super(a_Client)
+{
+}
+
+
+
+
+
+void cProtocol150::SendWindowOpen(char a_WindowID, char a_WindowType, const AString & a_WindowTitle, char a_NumSlots)
+{
+ if (a_WindowType < 0)
+ {
+ // Do not send for inventory windows
+ return;
+ }
+ cCSLock Lock(m_CSPacket);
+ WriteByte (PACKET_WINDOW_OPEN);
+ WriteByte (a_WindowID);
+ WriteByte (a_WindowType);
+ WriteString(a_WindowTitle);
+ WriteByte (a_NumSlots);
+ WriteByte (1); // Use title
+ Flush();
+}
+
+
+
+