Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LatiteClient/Latite
Browse files Browse the repository at this point in the history
  • Loading branch information
Imrglop committed Oct 11, 2024
2 parents c0289b6 + 836a6eb commit af8ad0a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/hook/impl/PacketHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/sdk/common/network/packet/TextPacket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 5 additions & 0 deletions src/sdk/common/network/packet/TextPacket.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ namespace SDK {
TextPacketType type;
std::string source;
std::string str;
std::optional<std::string> filteredMessage;
std::vector<std::string> params;
bool translationNeeded = false;
std::string xboxUserId;
std::string platformChatId;

TextPacket() = default;

Expand Down

0 comments on commit af8ad0a

Please sign in to comment.