diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt index 6ec7ad5..2c26aa0 100644 --- a/src/client/CMakeLists.txt +++ b/src/client/CMakeLists.txt @@ -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 diff --git a/src/client/client.cpp b/src/client/client.cpp index cba3051..f12359a 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -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([](auto val) { diff --git a/src/client/memory/sdk/gui/GuiData.cpp b/src/client/memory/sdk/gui/GuiData.cpp new file mode 100644 index 0000000..cc4e6f6 --- /dev/null +++ b/src/client/memory/sdk/gui/GuiData.cpp @@ -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); +} + diff --git a/src/client/memory/sdk/gui/GuiData.hpp b/src/client/memory/sdk/gui/GuiData.hpp new file mode 100644 index 0000000..980850b --- /dev/null +++ b/src/client/memory/sdk/gui/GuiData.hpp @@ -0,0 +1,6 @@ +#pragma once +#include + +struct GuiData { + void displayClientMessage_hk(const std::string& message); +}; \ No newline at end of file diff --git a/src/client/memory/signatures.hpp b/src/client/memory/signatures.hpp index 9191592..fcb6722 100644 --- a/src/client/memory/signatures.hpp +++ b/src/client/memory/signatures.hpp @@ -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 { @@ -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">();