From 624b1bdf0158659e223bbc6e48293f9ca9646e49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=90=E6=B2=90=E5=91=80?= <163636894+zimuya4153@users.noreply.github.com> Date: Mon, 16 Sep 2024 18:24:07 +0800 Subject: [PATCH] fill: fill BookEditAction and EmotePacket::Flags (#1575) --- src/mc/enums/BookEditAction.h | 8 +++++++- src/mc/network/packet/BookEditPacket.h | 2 +- src/mc/network/packet/EmotePacket.h | 8 +++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/mc/enums/BookEditAction.h b/src/mc/enums/BookEditAction.h index 2fce141c0f..ff39f26d17 100644 --- a/src/mc/enums/BookEditAction.h +++ b/src/mc/enums/BookEditAction.h @@ -2,4 +2,10 @@ #include "mc/_HeaderOutputPredefine.h" -enum class BookEditAction {}; +enum class BookEditAction : uchar { + Replace = 0x0, + Add = 0x1, + Delete = 0x2, + Swap = 0x3, + Sign = 0x4, +}; \ No newline at end of file diff --git a/src/mc/network/packet/BookEditPacket.h b/src/mc/network/packet/BookEditPacket.h index eaecf17894..03b9e13d81 100644 --- a/src/mc/network/packet/BookEditPacket.h +++ b/src/mc/network/packet/BookEditPacket.h @@ -16,7 +16,7 @@ class BookEditPacket : public ::Packet { int mPageIndex2; // this+0x3C std::string mText1; // this+0x40 std::string mText2; // this+0x60 - std::string mText3; // this+0x80 + std::string mXuid; // this+0x80 // prevent constructor by default BookEditPacket& operator=(BookEditPacket const&); diff --git a/src/mc/network/packet/EmotePacket.h b/src/mc/network/packet/EmotePacket.h index e28f1fb772..98c261126f 100644 --- a/src/mc/network/packet/EmotePacket.h +++ b/src/mc/network/packet/EmotePacket.h @@ -10,11 +10,17 @@ class EmotePacket : public ::Packet { public: + enum class Flags : uchar { + Invalid = 0x0, + ServerSide = 0x1, + MuteChat = 0x2, + }; + ActorRuntimeID mRuntimeId; // this+0x30 std::string mPieceId; // this+0x38 std::string mXuid; // this+0x58 std::string mPlatformId; // this+0x78 - uchar mFlags; // this+0x98 + Flags mFlags; // this+0x98 // prevent constructor by default EmotePacket& operator=(EmotePacket const&);