From ef97a848220a03010db9373f09817ea58bcf9fe9 Mon Sep 17 00:00:00 2001 From: Gray <84999745+Milxnor@users.noreply.github.com> Date: Mon, 18 Mar 2024 21:35:01 -0400 Subject: [PATCH] If its not scuffed its not reboot --- .../FortAthenaAIBotCustomizationData.h | 2 ++ Project Reboot 3.0/FortGameModeAthena.cpp | 2 +- Project Reboot 3.0/FortLootPackage.cpp | 5 ++++- .../FortServerBotManagerAthena.cpp | 10 ++++++++++ .../FortServerBotManagerAthena.h | 20 +++++++++++++++++++ Project Reboot 3.0/Project Reboot 3.0.vcxproj | 2 ++ .../Project Reboot 3.0.vcxproj.filters | 13 +++++++++--- Project Reboot 3.0/addresses.cpp | 7 +++---- Project Reboot 3.0/dllmain.cpp | 18 +++++++++++++---- Project Reboot 3.0/gui.h | 5 +++-- 10 files changed, 69 insertions(+), 15 deletions(-) create mode 100644 Project Reboot 3.0/FortServerBotManagerAthena.cpp create mode 100644 Project Reboot 3.0/FortServerBotManagerAthena.h diff --git a/Project Reboot 3.0/FortAthenaAIBotCustomizationData.h b/Project Reboot 3.0/FortAthenaAIBotCustomizationData.h index ae2ac00..c4791a8 100644 --- a/Project Reboot 3.0/FortAthenaAIBotCustomizationData.h +++ b/Project Reboot 3.0/FortAthenaAIBotCustomizationData.h @@ -2,6 +2,8 @@ #include "reboot.h" #include "FortAthenaAIBotCharacterCustomization.h" +#include "FortPlayerController.h" +#include "FortPlayerState.h" class UFortAthenaAIBotCustomizationData : public UObject // UPrimaryDataAsset { diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index 1696003..0d314dd 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -1528,7 +1528,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena auto PlayerAbilitySet = GetPlayerAbilitySet(); auto AbilitySystemComponent = PlayerStateAthena->GetAbilitySystemComponent(); - if (PlayerAbilitySet) + if (PlayerAbilitySet && Fortnite_Version != 12.00) { PlayerAbilitySet->GiveToAbilitySystem(AbilitySystemComponent); } diff --git a/Project Reboot 3.0/FortLootPackage.cpp b/Project Reboot 3.0/FortLootPackage.cpp index 1d73bdf..ac67824 100644 --- a/Project Reboot 3.0/FortLootPackage.cpp +++ b/Project Reboot 3.0/FortLootPackage.cpp @@ -394,6 +394,9 @@ std::vector PickLootDrops(FName TierGroupName, int WorldLevel, int For LTDTables.clear(); LPTables.clear(); + if (Fortnite_Version == 12.00) + return LootDrops; + bool bFoundPlaylistTable = false; if (CurrentPlaylist) @@ -622,7 +625,7 @@ std::vector PickLootDrops(FName TierGroupName, int WorldLevel, int For if (!Addresses::LoadAsset) { - if (Fortnite_Version <= 6 || std::floor(Fortnite_Version) == 9) // ahhh + if (Fortnite_Version <= 6 || std::floor(Fortnite_Version) == 9) // the tables unload! { LTDTables.clear(); LPTables.clear(); diff --git a/Project Reboot 3.0/FortServerBotManagerAthena.cpp b/Project Reboot 3.0/FortServerBotManagerAthena.cpp new file mode 100644 index 0000000..a6be9fe --- /dev/null +++ b/Project Reboot 3.0/FortServerBotManagerAthena.cpp @@ -0,0 +1,10 @@ +#include "FortServerBotManagerAthena.h" +#include "bots.h" + +AFortPlayerPawnAthena* UFortServerBotManagerAthena::SpawnBotHook(UFortServerBotManagerAthena* BotManager, FVector& InSpawnLocation, FRotator& InSpawnRotation, + UFortAthenaAIBotCustomizationData* InBotData, FFortAthenaAIBotRunTimeCustomizationData* InRuntimeBotData) +{ + LOG_INFO(LogBots, "SpawnBotHook!"); + + return nullptr; +} \ No newline at end of file diff --git a/Project Reboot 3.0/FortServerBotManagerAthena.h b/Project Reboot 3.0/FortServerBotManagerAthena.h new file mode 100644 index 0000000..67e409e --- /dev/null +++ b/Project Reboot 3.0/FortServerBotManagerAthena.h @@ -0,0 +1,20 @@ +#pragma once + +#include "Object.h" +#include "FortPlayerPawnAthena.h" +#include "FortAthenaAIBotCustomizationData.h" + +struct FFortAthenaAIBotRunTimeCustomizationData +{ + +}; + +static inline void (*BotManagerSetupStuffIdk)(__int64 BotManaager, __int64 Pawn, __int64 BehaviorTree, __int64 a4, DWORD* SkillLevel, __int64 idk, __int64 StartupInventory, __int64 BotNameSettings, __int64 idk_1, BYTE* CanRespawnOnDeath, unsigned __int8 BitFieldDataThing, BYTE* CustomSquadId, FFortAthenaAIBotRunTimeCustomizationData InRuntimeBotData) = decltype(BotManagerSetupStuffIdk)(__int64(GetModuleHandleW(0)) + 0x19D93F0); + +class UFortServerBotManagerAthena : public UObject +{ +public: + static inline AFortPlayerPawnAthena* (*SpawnBotOriginal)(UFortServerBotManagerAthena* BotManager, FVector InSpawnLocation, FRotator InSpawnRotation, UFortAthenaAIBotCustomizationData* InBotData, FFortAthenaAIBotRunTimeCustomizationData InRuntimeBotData); + + static AFortPlayerPawnAthena* SpawnBotHook(UFortServerBotManagerAthena* BotManager, FVector& InSpawnLocation, FRotator& InSpawnRotation, UFortAthenaAIBotCustomizationData* InBotData, FFortAthenaAIBotRunTimeCustomizationData* InRuntimeBotData); +}; \ No newline at end of file diff --git a/Project Reboot 3.0/Project Reboot 3.0.vcxproj b/Project Reboot 3.0/Project Reboot 3.0.vcxproj index 0dfaf06..a3e5014 100644 --- a/Project Reboot 3.0/Project Reboot 3.0.vcxproj +++ b/Project Reboot 3.0/Project Reboot 3.0.vcxproj @@ -233,6 +233,7 @@ + @@ -386,6 +387,7 @@ + diff --git a/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters b/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters index d4f44cb..c9c40ca 100644 --- a/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters +++ b/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters @@ -235,9 +235,6 @@ Engine\Source\Runtime\Engine\Private - - Reboot\Public - Engine\Source\Runtime\CoreUObject\Private @@ -304,6 +301,10 @@ Reboot\Private + + + FortniteGame\Source\FortniteGame\Private\AI + @@ -974,6 +975,9 @@ FortniteGame\Source\FortniteGame\Public\AI + + FortniteGame\Source\FortniteGame\Public\AI + @@ -1243,6 +1247,9 @@ {3c8e3f87-8a4c-4220-b952-39b0e0315e85} + + {4aadfbef-7320-4457-9f5c-e5fd53b97367} + diff --git a/Project Reboot 3.0/addresses.cpp b/Project Reboot 3.0/addresses.cpp index 998fc2a..8653875 100644 --- a/Project Reboot 3.0/addresses.cpp +++ b/Project Reboot 3.0/addresses.cpp @@ -611,12 +611,11 @@ std::vector Addresses::GetFunctionsToNull() toNull.push_back(Memcury::Scanner::FindStringRef(L"Widget Class %s - Running Initialize On Archetype, %s.").ScanFor({ 0x40, 0x55 }, false).Get()); // Widget class } - if (Engine_Version == 422 - || Engine_Version == 423 - || Engine_Version == 424 // guessed + if (Engine_Version >= 422 + && Fortnite_Version <= 12.00 // guessed ) { - // This sig is valid on 7.40, 8.51, 11.31 (3 refs), but on 12.41 it has 1 ref which isn't widget class + // This sig is valid on 7.40, 8.51, 11.31 (3 refs), but on 12.41 it has 1 ref which isn't widget class (12.00 is right). // Also this isn't the actual function but something the widget class thing calls toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 57 48 83 EC 30 48 8B 41 28 48 8B DA 48 8B F9 48 85 C0 74 34 48 8B 4B 08 48 8D").Get()); // widget class } diff --git a/Project Reboot 3.0/dllmain.cpp b/Project Reboot 3.0/dllmain.cpp index d21498d..9d5dfc4 100644 --- a/Project Reboot 3.0/dllmain.cpp +++ b/Project Reboot 3.0/dllmain.cpp @@ -45,6 +45,7 @@ #include "FortAthenaVehicleSpawner.h" #include "FortGameSessionDedicatedAthena.h" #include "FortAIEncounterInfo.h" +#include "FortServerBotManagerAthena.h" enum class EMeshNetworkNodeType : uint8_t { @@ -874,7 +875,7 @@ DWORD WINAPI Main(LPVOID) static auto FortOctopusVehicleDefault = FindObject(L"/Script/FortniteGame.Default__FortOctopusVehicle"); static auto FortPlayerControllerAthenaDefault = FindObject(L"/Script/FortniteGame.Default__FortPlayerControllerAthena"); // FindObject(L"/Game/Athena/Athena_PlayerController.Default__Athena_PlayerController_C"); - if (Fortnite_Version >= 20) + if (Fortnite_Version >= 20 || Fortnite_Version == 12.00) ApplyNullAndRetTrues(); // UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNetPackageMap VeryVerbose", nullptr); @@ -964,10 +965,16 @@ DWORD WINAPI Main(LPVOID) } */ + /* + if (Fortnite_Version >= 16 && Fortnite_Version < 19) + { + // Bus crash (only needed if we are calling StartAircraftPhase on seperate thread I THINK) (sometimes) + Hooking::MinHook::Hook(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 54 41 56 41 57 48 83 EC 40 48 8B 59 28 45 33 E4").GetAs(), (PVOID)EmptyHook); // also on 16.50 + } + */ + if (Fortnite_Version == 17.30) // Rift Tour stuff { - auto busCrash = Hooking::MinHook::Hook(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 56 57 41 54 41 56 41 57 48 83 EC 40 48 8B 59 28 45 33 E4").GetAs(), (PVOID)EmptyHook); - Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E07910), (PVOID)GetMeshNetworkNodeTypeHook, nullptr); Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DED158), (PVOID)ReturnTrueHook, nullptr); // 7FF7E556D158 Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DECFC8), (PVOID)ReturnTrueHook, nullptr); // 7FF7E556CFC8 @@ -1025,7 +1032,7 @@ DWORD WINAPI Main(LPVOID) LOG_INFO(LogDev, "Switch levels."); - if (Fortnite_Version < 20) + if (Fortnite_Version < 20 && Fortnite_Version != 12) ApplyNullAndRetTrues(); if (Fortnite_Version != 22.4) @@ -1098,6 +1105,9 @@ DWORD WINAPI Main(LPVOID) (PVOID*)&AFortGameModeAthena::OnAircraftEnteredDropZoneOriginal, false, false, true, true); } + // Hooking::MinHook::Hook(FindObject(L"/Script/FortniteGame.Default__FortServerBotManagerAthena"), FindObject(L"/Script/FortniteGame.FortServerBotManagerAthena.SpawnBot"), + // UFortServerBotManagerAthena::SpawnBotHook, (PVOID*)&UFortServerBotManagerAthena::SpawnBotOriginal, false); + Hooking::MinHook::Hook(GameModeDefault, FindObject(L"/Script/Engine.GameModeBase.SpawnDefaultPawnFor"), AGameModeBase::SpawnDefaultPawnForHook, nullptr, false); // Hooking::MinHook::Hook(GameModeDefault, FindObject(L"/Script/Engine.GameModeBase.PlayerCanRestart"), diff --git a/Project Reboot 3.0/gui.h b/Project Reboot 3.0/gui.h index ecf6442..27a997d 100644 --- a/Project Reboot 3.0/gui.h +++ b/Project Reboot 3.0/gui.h @@ -801,8 +801,9 @@ static inline void MainUI() if (!bStartedBus) { if (Globals::bLateGame.load() - || Fortnite_Version >= 11 // Its been a minute but iirc it just wouldnt start when countdown ended or crash? cant remember - ) + || (Fortnite_Version >= 11 // Its been a minute but iirc it just wouldnt start when countdown ended or crash? cant remember + && false + )) { if (ImGui::Button("Start Bus")) {