From b38db454f1d19cb7de2029619700dedcb55baf40 Mon Sep 17 00:00:00 2001 From: Aivan Monceller Date: Sat, 27 Jan 2024 16:18:43 +0800 Subject: [PATCH 1/2] Fix inifinitely expanding Exploit tab replace GetWindowContentRegionMax with GetContentRegionAvail --- src/Menu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Menu.cpp b/src/Menu.cpp index 6ba4f14..f86f819 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -271,7 +271,7 @@ namespace DX11_Base { // this does not work lol // std::stringstream AddItemsString; // AddItemsString << "Give " << Config.AddItemCount << " items from slot" << Config.AddItemSlot; - if (ImGui::Button("Unlock All Effigies", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20))) + if (ImGui::Button("Unlock All Effigies", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) { UnlockAllEffigies(); } @@ -297,7 +297,7 @@ namespace DX11_Base { } } }*/ - if (ImGui::Button("HomeTP", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20))) + if (ImGui::Button("HomeTP", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) { SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter(); if (p_appc != NULL) @@ -333,7 +333,7 @@ namespace DX11_Base { } } }*/ - if (ImGui::Button("ToggleFly", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20))) + if (ImGui::Button("ToggleFly", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) { Config.IsToggledFly = !Config.IsToggledFly; ExploitFly(Config.IsToggledFly); @@ -352,7 +352,7 @@ namespace DX11_Base { } } }*/ - if (ImGui::Button("GodHealth", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20))) + if (ImGui::Button("GodHealth", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) { SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter(); if (p_appc != NULL) @@ -387,7 +387,7 @@ namespace DX11_Base { } } } - if (ImGui::Button("Equivalent", ImVec2(ImGui::GetWindowContentRegionMax().x - 3, 20))) + if (ImGui::Button("Equivalent", ImVec2(ImGui::GetContentRegionAvail().x - 3, 20))) { Config.isEq = !Config.isEq; ToggleEqui(Config.isEq); From f65714b24f944a552447902f8df4d29a1319150d Mon Sep 17 00:00:00 2001 From: Aivan Monceller Date: Sat, 27 Jan 2024 16:33:33 +0800 Subject: [PATCH 2/2] Fix compiler error --- feature.cpp | 39 --------------------------------------- feature.h | 6 ++---- src/Menu.cpp | 2 +- 3 files changed, 3 insertions(+), 44 deletions(-) diff --git a/feature.cpp b/feature.cpp index 6f07323..72af8de 100644 --- a/feature.cpp +++ b/feature.cpp @@ -88,45 +88,6 @@ void DrawUActorComponent(SDK::TArray Comps,ImColor color) } } - -void AddToInventoryContainer(__int32 mCount, __int32 mIndex) -{ - SDK::APalPlayerCharacter* p_appc = Config.GetPalPlayerCharacter(); - if (!p_appc != NULL) - return; - - SDK::APalPlayerController* p_apc = static_cast(p_appc->Controller); - if (!p_apc) - return; - - SDK::APalPlayerState* p_apps = static_cast(p_apc->PlayerState); - if (!p_apps) - return; - - SDK::UPalPlayerInventoryData* InventoryData = p_apps->GetInventoryData(); - if (!InventoryData) - return; - - SDK::UPalItemContainerMultiHelper* InventoryMultiHelper = InventoryData->InventoryMultiHelper; - if (!InventoryMultiHelper) - return; - - SDK::TArray Containers = InventoryMultiHelper->Containers; - if (Containers.Num() <= 0) - return; - - SDK::UPalItemSlot* pSelectedSlot = Containers[0]->Get(mIndex); - - if (!pSelectedSlot != NULL) - return; - - SDK::FPalItemId FirstItemId = pSelectedSlot->GetItemId(); - int32 StackCount = pSelectedSlot->GetStackCount(); - __int32 mNewCount = StackCount += mCount; - InventoryData->RequestAddItem(FirstItemId.StaticId, mNewCount, true); -} - - void UnlockAllEffigies() { SDK::APalPlayerCharacter* pPalCharacter = Config.GetPalPlayerCharacter(); if (!pPalCharacter) diff --git a/feature.h b/feature.h index 13295fa..4c65e56 100644 --- a/feature.h +++ b/feature.h @@ -5,7 +5,7 @@ void ESP(); -void ESP_DEBUG(double mDist, SDK::UClass* mEntType = SDK::AActor::StaticClass()); +void ESP_DEBUG(float mDist, ImVec4 color, SDK::UClass* mEntType = SDK::AActor::StaticClass()); void DrawUActorComponent(SDK::TArray Comps, ImColor color); @@ -25,6 +25,4 @@ void AddAncientTechPoints(__int32 mPoints); void RemoveTechPoints(__int32 mPoints); -void RemoveAncientTechPoint(__int32 mPoints); - -void AddToInventoryContainer(__int32 mCount, __int32 mIndex = 0); \ No newline at end of file +void RemoveAncientTechPoint(__int32 mPoints); \ No newline at end of file diff --git a/src/Menu.cpp b/src/Menu.cpp index f86f819..f8a38fb 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -466,7 +466,7 @@ namespace DX11_Base { ImGui::ShowDemoWindow(); if (Config.isDebugESP) - ESP_DEBUG(Config.mDebugESPDistance); + ESP_DEBUG(Config.mDebugESPDistance, ImVec4(0,1,0,1)); } void Menu::MainMenu()