From 7d0813ce8c1be14bc1b9b706644bd4aa797244ee Mon Sep 17 00:00:00 2001 From: 12xx12 <44411062+12xx12@users.noreply.github.com> Date: Wed, 12 Aug 2020 09:54:36 +0100 Subject: Add Statistics and Achievements for newer Network standards --- src/Protocol/Protocol_1_8.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/Protocol/Protocol_1_8.h') diff --git a/src/Protocol/Protocol_1_8.h b/src/Protocol/Protocol_1_8.h index aec9e2e57..b813b16bf 100644 --- a/src/Protocol/Protocol_1_8.h +++ b/src/Protocol/Protocol_1_8.h @@ -15,6 +15,7 @@ Declares the 1.8 protocol classes: #include "Protocol.h" #include "../ByteBuffer.h" +#include "../Registries/Statistics.h" #include "../mbedTLS++/AesCfb128Decryptor.h" #include "../mbedTLS++/AesCfb128Encryptor.h" @@ -254,5 +255,10 @@ private: /** Converts an entity to a protocol-specific entity type. Only entities that the Send Spawn Entity packet supports are valid inputs to this method */ - UInt8 GetProtocolEntityType(const cEntity & a_Entity); + static UInt8 GetProtocolEntityType(const cEntity & a_Entity); + + /** Converts a statistic to a protocol-specific string. + Protocols <= 1.12 use strings, hence this is a static as the string-mapping was append-only for the versions that used it. + Returns an empty string, handled correctly by the client, for newer, unsupported statistics. */ + static const char * GetProtocolStatisticName(Statistic a_Statistic); } ; -- cgit v1.2.3