summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-09 01:52:51 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-09 01:52:51 +0200
commit4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7 (patch)
treea824a63e816dcb45140322cb2b15047b9e89b035 /src/Protocol
parentMore fixes. (diff)
downloadcuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.tar
cuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.tar.gz
cuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.tar.bz2
cuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.tar.lz
cuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.tar.xz
cuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.tar.zst
cuberite-4b1f4e8d7ecaed0cc9c4dffbf58c5665183297c7.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol18x.cpp17
-rw-r--r--src/Protocol/Protocol18x.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 46773a438..60501a5b5 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -2586,6 +2586,23 @@ cProtocol180::cPacketizer::~cPacketizer()
+void cProtocol180::cPacketizer::WriteUUID(const AString & a_UUID)
+{
+ AString UUID_1 = a_UUID.substr(0, a_UUID.length() / 2);
+ AString UUID_2 = a_UUID.substr(a_UUID.length() / 2);
+
+ UInt64 Value_1, Value_2;
+ sscanf(UUID_1.c_str(), "%llx", &Value_1);
+ sscanf(UUID_2.c_str(), "%llx", &Value_2);
+
+ WriteInt64((Int64)Value_1);
+ WriteInt64((Int64)Value_2);
+}
+
+
+
+
+
void cProtocol180::cPacketizer::WriteItem(const cItem & a_Item)
{
short ItemType = a_Item.m_ItemType;
diff --git a/src/Protocol/Protocol18x.h b/src/Protocol/Protocol18x.h
index f9d5a24dd..207af0b44 100644
--- a/src/Protocol/Protocol18x.h
+++ b/src/Protocol/Protocol18x.h
@@ -204,6 +204,8 @@ protected:
m_Out.WritePosition(a_BlockX, a_BlockY, a_BlockZ);
}
+ void WriteUUID(const AString & a_UUID);
+
void WriteBuf(const char * a_Data, size_t a_Size)
{
m_Out.Write(a_Data, a_Size);