From 683b6fd58920fe0d053f15290c5288a47fe7cf87 Mon Sep 17 00:00:00 2001 From: Qiuzhizhe <42761326+quizhizhe@users.noreply.github.com> Date: Mon, 20 Mar 2023 06:59:39 -0700 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D`SetScorePacket`=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LiteLoader/include/llapi/Offset.h | 8 ++++---- LiteLoader/include/llapi/mc/SetScorePacket.hpp | 8 +++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/LiteLoader/include/llapi/Offset.h b/LiteLoader/include/llapi/Offset.h index 9ba31fd..f185e10 100644 --- a/LiteLoader/include/llapi/Offset.h +++ b/LiteLoader/include/llapi/Offset.h @@ -142,10 +142,10 @@ namespace ll{ constexpr uint64_t PLAYERAPI_sendTransferPacket_port = 0X24; // Null constexpr uint64_t PLAYERAPI_sendTransferPacket_address = 0X28; - // Null - constexpr uint64_t PLAYERAPI_sendSetScorePacket_type = 0X30; - // Null - constexpr uint64_t PLAYERAPI_sendSetScorePacket_data = 0X38; + // SetScorePacket::mType + constexpr uint64_t PLAYERAPI_sendSetScorePacket_type = 0X28; + // SetScorePacket::mScoreInfo + constexpr uint64_t PLAYERAPI_sendSetScorePacket_data = 0X30; // Null constexpr uint64_t PLAYERAPI_sendCommandRequestPacket_cmd = 0X30; // Null diff --git a/LiteLoader/include/llapi/mc/SetScorePacket.hpp b/LiteLoader/include/llapi/mc/SetScorePacket.hpp index eee6a0e..2ba189b 100644 --- a/LiteLoader/include/llapi/mc/SetScorePacket.hpp +++ b/LiteLoader/include/llapi/mc/SetScorePacket.hpp @@ -6,12 +6,18 @@ #define BEFORE_EXTRA +enum ScorePacketType { + Change = 0x0, + Remove_2 = 0x1, +}; #undef BEFORE_EXTRA class SetScorePacket : public Packet { #define AFTER_EXTRA - +public: + ScorePacketType mType; + std::vector mScoreInfo; #undef AFTER_EXTRA #ifndef DISABLE_CONSTRUCTOR_PREVENTION_SETSCOREPACKET public: