Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ add_library(selaura_client SHARED
memory/sdk/renderer/bgfx/bgfx.cpp
memory/sdk/core/RenderItemInHandDescription.cpp
memory/sdk/client/ClientInstanceScreenModel.cpp
memory/sdk/gui/GuiData.cpp
memory/sdk/game/network/MinecraftPackets.cpp
feature/impl/render/fullbright.cpp
feature/impl/render/paperdoll.cpp
Expand Down
3 changes: 2 additions & 1 deletion src/client/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ namespace selaura {
&Dimension::getTimeOfDay_hk,
&bgfx::d3d11::RendererContextD3D11::submit_hk,
&bgfx::d3d12::RendererContextD3D12::submit_hk,
&ClientInstanceScreenModel::executeCommand_hk
&ClientInstanceScreenModel::executeCommand_hk,
&GuiData::displayClientMessage_hk
>();

magic_enum::enum_for_each<MinecraftPacketIds>([](auto val) {
Expand Down
7 changes: 7 additions & 0 deletions src/client/memory/sdk/gui/GuiData.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "GuiData.hpp"
#include "../../patcher.hpp"

void GuiData::displayClientMessage_hk(const std::string& message) {
selaura::call_fn<&GuiData::displayClientMessage_hk>(this, message);
}

6 changes: 6 additions & 0 deletions src/client/memory/sdk/gui/GuiData.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once
#include <string>

struct GuiData {
void displayClientMessage_hk(const std::string& message);
};
6 changes: 6 additions & 0 deletions src/client/memory/signatures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "sdk/world/BaseLightTextureImageBuilder.hpp"
#include "sdk/world/Dimension.hpp"
#include "sdk/client/ClientInstanceScreenModel.hpp"
#include "sdk/gui/GuiData.hpp"
#include "sdk/game/network/MinecraftPackets.hpp"

namespace selaura {
Expand Down Expand Up @@ -101,6 +102,11 @@ namespace selaura {
static constexpr auto value = hat::compile_signature<"48 89 5C 24 ? 55 56 57 41 54 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 85 ? ? ? ? 4C 8B EA 48 8B F1 C7 44 24">();
};

template <>
struct selaura::signature<&GuiData::displayClientMessage_hk> {
static constexpr auto value = hat::compile_signature<"40 55 53 56 57 41 56 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 0F 29 B4 24 ? ? ? ? 48 8B 05 ? ? ? ? 48 33 C4 48 89 85 ? ? ? ? 49 8B F8 48 8B DA 48 8B F1 0F 57 C0">();
};

template <>
struct selaura::signature<&MinecraftPackets::createPacket_hk> {
static constexpr auto value = hat::compile_signature<"48 89 5C 24 10 48 89 74 24 18 57 48 83 EC 50 48 8B 05 ? ? ? ? 48 33 C4 48 89 44 24 48 48 8B D9 48 89">();
Expand Down
Loading