diff --git a/src/client/hook/impl/PacketHooks.cpp b/src/client/hook/impl/PacketHooks.cpp index 3cb9bdd8..a67337b0 100644 --- a/src/client/hook/impl/PacketHooks.cpp +++ b/src/client/hook/impl/PacketHooks.cpp @@ -133,7 +133,7 @@ void PacketHooks::PacketHandlerDispatcherInstance_handle(void* instance, void* n val2.val = util::StrToWStr(pkt->source); PluginManager::Event::Value val3{ L"xuid" }; - val3.val = L""; // No longer exists + val3.val = util::StrToWStr(pkt->xboxUserId); PluginManager::Event::Value isChat{ L"isChat" }; isChat.val = (pkt->type == SDK::TextPacketType::CHAT || pkt->type == SDK::TextPacketType::RAW diff --git a/src/sdk/common/network/packet/TextPacket.cpp b/src/sdk/common/network/packet/TextPacket.cpp index a0df9cb3..62e8502f 100644 --- a/src/sdk/common/network/packet/TextPacket.cpp +++ b/src/sdk/common/network/packet/TextPacket.cpp @@ -9,5 +9,6 @@ void SDK::TextPacket::chat(std::string const& message) { this->str = message; this->source = SDK::ClientInstance::get()->getLocalPlayer()->playerName; + this->xboxUserId = SDK::ClientInstance::get()->minecraftGame->xuid; this->type = TextPacketType::CHAT; } diff --git a/src/sdk/common/network/packet/TextPacket.h b/src/sdk/common/network/packet/TextPacket.h index 777693b5..8f43decb 100644 --- a/src/sdk/common/network/packet/TextPacket.h +++ b/src/sdk/common/network/packet/TextPacket.h @@ -22,6 +22,11 @@ namespace SDK { TextPacketType type; std::string source; std::string str; + std::optional filteredMessage; + std::vector params; + bool translationNeeded = false; + std::string xboxUserId; + std::string platformChatId; TextPacket() = default;