summaryrefslogtreecommitdiffstats
path: root/src/Protocol/Protocol17x.cpp
diff options
context:
space:
mode:
authorandrew <xdotftw@gmail.com>2014-01-21 14:58:17 +0100
committerandrew <xdotftw@gmail.com>2014-01-21 14:58:17 +0100
commitaa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014 (patch)
tree42e227cd81bced9bc42b4f686753ccbde1b95caa /src/Protocol/Protocol17x.cpp
parentScoreboard serialization (diff)
downloadcuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.tar
cuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.tar.gz
cuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.tar.bz2
cuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.tar.lz
cuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.tar.xz
cuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.tar.zst
cuberite-aa61f55b743a8ecf3cd8e1f99e1d9a0308f6d014.zip
Diffstat (limited to 'src/Protocol/Protocol17x.cpp')
-rw-r--r--src/Protocol/Protocol17x.cpp40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 5b3a79555..d5ed1a0aa 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -705,6 +705,46 @@ void cProtocol172::SendExperienceOrb(const cExpOrb & a_ExpOrb)
+void cProtocol172::SendScoreboardObjective(const AString & a_Name, const AString & a_DisplayName, Byte a_Mode)
+{
+ cPacketizer Pkt(*this, 0x3b);
+ Pkt.WriteString(a_Name);
+ Pkt.WriteString(a_DisplayName);
+ Pkt.WriteByte(a_Mode);
+}
+
+
+
+
+
+void cProtocol172::SendScoreUpdate(const AString & a_Objective, const AString & a_Player, cObjective::Score a_Score, Byte a_Mode)
+{
+ cPacketizer Pkt(*this, 0x3c);
+ Pkt.WriteString(a_Player);
+ Pkt.WriteByte(a_Mode);
+
+ if (a_Mode != 1)
+ {
+ Pkt.WriteString(a_Objective);
+ Pkt.WriteInt((int) a_Score);
+ }
+}
+
+
+
+
+
+void cProtocol172::SendDisplayObjective(const AString & a_Objective, cScoreboard::eDisplaySlot a_Display)
+{
+ cPacketizer Pkt(*this, 0x3d);
+ Pkt.WriteByte((int) a_Display);
+ Pkt.WriteString(a_Objective);
+}
+
+
+
+
+
void cProtocol172::SendSoundEffect(const AString & a_SoundName, int a_SrcX, int a_SrcY, int a_SrcZ, float a_Volume, float a_Pitch) // a_Src coords are Block * 8
{
cPacketizer Pkt(*this, 0x29); // Sound Effect packet