From 07a6569f4a6ec44d80b04ffd1e13d1faed1df126 Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Sat, 16 Mar 2024 23:17:09 -0400 Subject: [PATCH] Someone order me popeyes --- Project Reboot 3.0/FortGameModeAthena.cpp | 2 +- Project Reboot 3.0/addresses.cpp | 2 ++ Project Reboot 3.0/dllmain.cpp | 2 +- Project Reboot 3.0/events.h | 23 +++++++++++++++++++++-- Project Reboot 3.0/finder.h | 14 ++++++++++++-- Project Reboot 3.0/gui.h | 4 ++-- 6 files changed, 39 insertions(+), 8 deletions(-) diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index 049be2f..c711a45 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -419,7 +419,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game if (Fortnite_Season == 7) { ShowFoundation(FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_POI_25x36")); // Polar Peak - ShowFoundation(FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.ShopsNew")); // Tilted Tower Shops, is this 7.40 specific? + ShowFoundation(FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.ShopsNew")); // Tilted Tower Shops, is this 7.40 specific? (not on 7.20) } // not sure what other build is needed idrc else if (Fortnite_Season == 8 || Fortnite_Version == 9.10) diff --git a/Project Reboot 3.0/addresses.cpp b/Project Reboot 3.0/addresses.cpp index 175f551..7e06497 100644 --- a/Project Reboot 3.0/addresses.cpp +++ b/Project Reboot 3.0/addresses.cpp @@ -521,6 +521,8 @@ void Offsets::Print() LOG_INFO(LogDev, "Func: 0x{:x}", Func); LOG_INFO(LogDev, "ServerReplicateActors: 0x{:x}", ServerReplicateActors); LOG_INFO(LogDev, "ReplicationFrame: 0x{:x}", ReplicationFrame); + LOG_INFO(LogDev, "ClientWorldPackageName: 0x{:x}", ClientWorldPackageName); + LOG_INFO(LogDev, "NetworkObjectList: 0x{:x}", NetworkObjectList); LOG_INFO(LogDev, "Script: 0x{:x}", Script); LOG_INFO(LogDev, "PropertyClass: 0x{:x}", PropertyClass); } diff --git a/Project Reboot 3.0/dllmain.cpp b/Project Reboot 3.0/dllmain.cpp index 8755a82..37e1a51 100644 --- a/Project Reboot 3.0/dllmain.cpp +++ b/Project Reboot 3.0/dllmain.cpp @@ -1148,7 +1148,7 @@ DWORD WINAPI Main(LPVOID) AFortWeapon::ServerReleaseWeaponAbilityHook, (PVOID*)&AFortWeapon::ServerReleaseWeaponAbilityOriginal, false, true); Hooking::MinHook::Hook(FindObject(L"/Script/Engine.Default__KismetSystemLibrary"), FindObject(L"/Script/Engine.KismetSystemLibrary.PrintString"), - UKismetSystemLibrary::PrintStringHook, (PVOID*)&UKismetSystemLibrary::PrintStringOriginal, false, true); + UKismetSystemLibrary::PrintStringHook, (PVOID*)&UKismetSystemLibrary::PrintStringOriginal, false, true); // todo FortShippingLog Hooking::MinHook::Hook((PVOID)Addresses::GetSquadIdForCurrentPlayer, (PVOID)AFortGameSessionDedicatedAthena::GetSquadIdForCurrentPlayerHook); diff --git a/Project Reboot 3.0/events.h b/Project Reboot 3.0/events.h index 2e68b0b..89d84e4 100644 --- a/Project Reboot 3.0/events.h +++ b/Project Reboot 3.0/events.h @@ -594,7 +594,7 @@ static inline std::string GetEventName() return ""; } -static inline void LoadEvent(bool* bWereAllSuccessful = nullptr) +static inline void LoadEvent(bool* bWereAllSuccessful = nullptr) // did i forget return values existed { if (bWereAllSuccessful) *bWereAllSuccessful = false; @@ -638,7 +638,26 @@ static inline void LoadEvent(bool* bWereAllSuccessful = nullptr) return; // GetEventLoader handles the printing } - Loader->ProcessEvent(LoaderFunction, &OurEvent.AdditionalLoaderParams); + if (Fortnite_Version == 7.20) + { + static auto LoadMooneyMapOffset = Loader->GetOffset("LoadMooneyMap"); + static auto OnRep_LoadMooneyMapFn = FindObject("/Game/Athena/Prototype/Blueprints/Mooney/BP_MooneyLoader.BP_MooneyLoader_C.OnRep_LoadMooneyMap"); + + if (LoadMooneyMapOffset == -1 || !OnRep_LoadMooneyMapFn) + { + if (bWereAllSuccessful) + *bWereAllSuccessful = false; + + return; + } + + Loader->Get(LoadMooneyMapOffset) = true; + Loader->ProcessEvent(OnRep_LoadMooneyMapFn); + } + else + { + Loader->ProcessEvent(LoaderFunction, &OurEvent.AdditionalLoaderParams); + } } static inline bool CallOnReadys(bool* bWereAllSuccessful = nullptr) diff --git a/Project Reboot 3.0/finder.h b/Project Reboot 3.0/finder.h index a63660b..d4ca055 100644 --- a/Project Reboot 3.0/finder.h +++ b/Project Reboot 3.0/finder.h @@ -859,8 +859,18 @@ static inline uint64 FindNoMCP() return 0; auto scanner = Memcury::Scanner(__int64(fn->GetFunc())); - auto noMcpIthink = Memcury::Scanner(FindBytes(scanner, { 0xE8 })).RelativeOffset(1).Get(); // GetFunctionIdxOrPtr(fn); - return noMcpIthink; + auto noMcpIthink = Memcury::Scanner(FindBytes(scanner, { 0xE8 })).RelativeOffset(1); // GetFunctionIdxOrPtr(fn); + + if (noMcpIthink.Get()) + { + if (*noMcpIthink.GetAs() == 0xE8 || *noMcpIthink.GetAs() == 0xE9) // ex 7.20 + { + LOG_INFO(LogDev, "Weird MCP thing!"); + noMcpIthink.RelativeOffset(1); // we are in the weird thing that compiler does when the func is just in a jmp + } + } + + return noMcpIthink.Get(); if (Engine_Version == 421 || Engine_Version == 422) return Memcury::Scanner::FindPattern("E8 ? ? ? ? 84 C0 75 CE").RelativeOffset(1).Get(); diff --git a/Project Reboot 3.0/gui.h b/Project Reboot 3.0/gui.h index a9965c9..e191ae9 100644 --- a/Project Reboot 3.0/gui.h +++ b/Project Reboot 3.0/gui.h @@ -711,13 +711,13 @@ static inline void MainUI() SetIsLategame(bWillBeLategame); } + ImGui::Text(std::format("Joinable {}", Globals::bStartedListening).c_str()); + if (!Globals::bStartedListening) // hm { ImGui::SliderInt("Players required to start the match", &WarmupRequiredPlayerCount, 1, 100); } - ImGui::Text(std::format("Joinable {}", Globals::bStartedListening).c_str()); - static std::string ConsoleCommand; ImGui::InputText("Console command", &ConsoleCommand);