mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
wow release commit
This commit is contained in:
8
Project Reboot 3.0/EnvQuery.h
Normal file
8
Project Reboot 3.0/EnvQuery.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "Object.h"
|
||||
|
||||
class UEnvQuery : public UObject // UDataAsset
|
||||
{
|
||||
public:
|
||||
};
|
||||
18
Project Reboot 3.0/EnvQueryTypes.h
Normal file
18
Project Reboot 3.0/EnvQueryTypes.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "NameTypes.h"
|
||||
|
||||
enum class EAIParamType : uint8
|
||||
{
|
||||
Float,
|
||||
Int,
|
||||
Bool
|
||||
// MAX UMETA(Hidden)
|
||||
};
|
||||
|
||||
struct FEnvNamedValue // i dont thin kthis ever changes
|
||||
{
|
||||
FName ParamName;
|
||||
EAIParamType ParamType;
|
||||
float Value;
|
||||
};
|
||||
40
Project Reboot 3.0/FortAIEncounterInfo.h
Normal file
40
Project Reboot 3.0/FortAIEncounterInfo.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
#include "Actor.h"
|
||||
#include "EnvQuery.h"
|
||||
#include "reboot.h"
|
||||
#include "EnvQueryTypes.h"
|
||||
|
||||
struct FEncounterEnvironmentQueryInfo // idk what file this actually goes in or if this struct ever actaully changes
|
||||
{
|
||||
static UStruct* GetStruct()
|
||||
{
|
||||
static auto Struct = FindObject<UStruct>(L"/Script/FortniteGame.EncounterEnvironmentQueryInfo");
|
||||
return Struct;
|
||||
}
|
||||
|
||||
static int GetPropertiesSize() { return GetStruct()->GetPropertiesSize(); }
|
||||
|
||||
UEnvQuery*& GetEnvironmentQuery()
|
||||
{
|
||||
static auto EnvironmentQueryOffset = FindOffsetStruct("/Script/FortniteGame.EncounterEnvironmentQueryInfo", "EnvironmentQuery");
|
||||
return *(UEnvQuery**)(__int64(this) + EnvironmentQueryOffset);
|
||||
}
|
||||
|
||||
TArray<FEnvNamedValue>& GetQueryParams()
|
||||
{
|
||||
static auto QueryParamsOffset = FindOffsetStruct("/Script/FortniteGame.EncounterEnvironmentQueryInfo", "QueryParams");
|
||||
return *(TArray<FEnvNamedValue>*)(__int64(this) + QueryParamsOffset);
|
||||
}
|
||||
|
||||
bool& IsDirectional()
|
||||
{
|
||||
static auto bIsDirectionalOffset = FindOffsetStruct("/Script/FortniteGame.EncounterEnvironmentQueryInfo", "bIsDirectional");
|
||||
return *(bool*)(__int64(this) + bIsDirectionalOffset);
|
||||
}
|
||||
};
|
||||
|
||||
class UFortAIEncounterInfo : public UObject
|
||||
{
|
||||
public:
|
||||
};
|
||||
@@ -208,6 +208,11 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
|
||||
LOG_INFO(LogDev, "Presetup!");
|
||||
|
||||
SetupAIGoalManager();
|
||||
SetupAIDirector();
|
||||
SetupServerBotManager();
|
||||
// SetupNavConfig(UKismetStringLibrary::Conv_StringToName(L"MANG"));
|
||||
|
||||
static auto WarmupRequiredPlayerCountOffset = GameMode->GetOffset("WarmupRequiredPlayerCount");
|
||||
GameMode->Get<int>(WarmupRequiredPlayerCountOffset) = 1;
|
||||
|
||||
@@ -332,7 +337,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
|
||||
if (AdditionalLevelsServerOnlyOffset != -1)
|
||||
{
|
||||
TArray<TSoftObjectPtr<UWorld>>& AdditionalLevelsServerOnly = CurrentPlaylist->Get<TArray<TSoftObjectPtr<UWorld>>>(AdditionalLevelsServerOnlyOffset);
|
||||
/* TArray<TSoftObjectPtr<UWorld>>& AdditionalLevelsServerOnly = CurrentPlaylist->Get<TArray<TSoftObjectPtr<UWorld>>>(AdditionalLevelsServerOnlyOffset);
|
||||
LOG_INFO(LogPlaylist, "Loading {} playlist server levels.", AdditionalLevelsServerOnly.Num());
|
||||
|
||||
for (int i = 0; i < AdditionalLevelsServerOnly.Num(); i++)
|
||||
@@ -343,7 +348,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
auto LevelNameWStr = std::wstring(LevelNameStr.begin(), LevelNameStr.end());
|
||||
|
||||
GameState->AddToAdditionalPlaylistLevelsStreamed(LevelFName, true);
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
LOG_INFO(LogPlaylist, "Loading {} playlist levels.", AdditionalLevels.Num());
|
||||
@@ -450,10 +455,6 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
static auto bWorldIsReadyOffset = GameMode->GetOffset("bWorldIsReady");
|
||||
SetBitfield(GameMode->GetPtr<PlaceholderBitfield>(bWorldIsReadyOffset), 1, true); // idk when we actually set this (probably after we listen)
|
||||
|
||||
SetupAIDirector();
|
||||
SetupServerBotManager();
|
||||
// SetupNavConfig(UKismetStringLibrary::Conv_StringToName(L"MANG"));
|
||||
|
||||
// Calendar::SetSnow(1000);
|
||||
|
||||
Globals::bInitializedPlaylist = true;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "FortGameModeAthena.h"
|
||||
#include "FortAthenaMutator.h"
|
||||
#include "gui.h"
|
||||
#include "LevelStreamingDynamic.h"
|
||||
|
||||
/* void AFortGameStateAthena::AddPlayerStateToGameMemberInfo(class AFortPlayerStateAthena* PlayerState)
|
||||
{
|
||||
@@ -274,6 +275,12 @@ TeamsArrayContainer* AFortGameStateAthena::GetTeamsArrayContainer()
|
||||
|
||||
void AFortGameStateAthena::AddToAdditionalPlaylistLevelsStreamed(const FName& Name, bool bServerOnly)
|
||||
{
|
||||
auto NameStr = Name.ToString();
|
||||
auto NameWStr = std::wstring(NameStr.begin(), NameStr.end());
|
||||
|
||||
StreamLevel(Name.ToString()); // skunke bozo (I didn't test the next code too much soo)
|
||||
/* ULevelStreamingDynamic::LoadLevelInstance(GetWorld(), NameWStr.c_str(), FVector(), FRotator());
|
||||
|
||||
static auto AdditionalPlaylistLevelsStreamedOffset = this->GetOffset("AdditionalPlaylistLevelsStreamed", false);
|
||||
|
||||
if (!FAdditionalLevelStreamed::GetStruct())
|
||||
@@ -289,7 +296,7 @@ void AFortGameStateAthena::AddToAdditionalPlaylistLevelsStreamed(const FName& Na
|
||||
NewLevelStreamed->IsServerOnly() = bServerOnly;
|
||||
|
||||
AdditionalPlaylistLevelsStreamed.AddPtr(NewLevelStreamed, FAdditionalLevelStreamed::GetStructSize());
|
||||
}
|
||||
} */
|
||||
}
|
||||
|
||||
UClass* AFortGameStateAthena::StaticClass()
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "FortPickup.h"
|
||||
#include "FortLootPackage.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "FortGameModeAthena.h"
|
||||
|
||||
UFortResourceItemDefinition* UFortKismetLibrary::K2_GetResourceItemDefinition(EFortResourceType ResourceType)
|
||||
{
|
||||
@@ -524,6 +525,32 @@ AFortPickup* UFortKismetLibrary::K2_SpawnPickupInWorldWithClassHook(UObject* Con
|
||||
return *Ret;
|
||||
}
|
||||
|
||||
UObject* UFortKismetLibrary::GetAIDirectorHook(UObject* Context, FFrame& Stack, UObject** Ret)
|
||||
{
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
static auto AIDirectorOffset = GameMode->GetOffset("AIDirector");
|
||||
|
||||
auto AIDirector = GameMode->Get(AIDirectorOffset);
|
||||
|
||||
GetAIDirectorOriginal(Context, Stack, Ret);
|
||||
|
||||
*Ret = AIDirector;
|
||||
return *Ret;
|
||||
}
|
||||
|
||||
UObject* UFortKismetLibrary::GetAIGoalManagerHook(UObject* Context, FFrame& Stack, UObject** Ret)
|
||||
{
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
static auto AIGoalManagerOffset = GameMode->GetOffset("AIGoalManager");
|
||||
|
||||
auto GoalManager = GameMode->Get(AIGoalManagerOffset);
|
||||
|
||||
GetAIGoalManagerOriginal(Context, Stack, Ret);
|
||||
|
||||
*Ret = GoalManager;
|
||||
return *Ret;
|
||||
}
|
||||
|
||||
AFortPickup* UFortKismetLibrary::K2_SpawnPickupInWorldHook(UObject* Context, FFrame& Stack, AFortPickup** Ret)
|
||||
{
|
||||
UObject* WorldContextObject; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
|
||||
@@ -81,6 +81,8 @@ public:
|
||||
static inline void (*SpawnItemVariantPickupInWorldOriginal)(UObject* Context, FFrame& Stack, void* Ret);
|
||||
static inline void (*K2_GiveBuildingResourceOriginal)(UObject* Context, FFrame& Stack, void* Ret);
|
||||
static inline void (*PickLootDropsWithNamedWeightsOriginal)(UObject* Context, FFrame& Stack, void* Ret);
|
||||
static inline UObject* (*GetAIDirectorOriginal)(UObject* Context, FFrame& Stack, UObject** Ret);
|
||||
static inline UObject* (*GetAIGoalManagerOriginal)(UObject* Context, FFrame& Stack, UObject** Ret);
|
||||
|
||||
static UFortResourceItemDefinition* K2_GetResourceItemDefinition(EFortResourceType ResourceType);
|
||||
static void ApplyCharacterCosmetics(UObject* WorldContextObject, const TArray<UObject*>& CharacterParts, UObject* PlayerState, bool* bSuccess);
|
||||
@@ -99,6 +101,8 @@ public:
|
||||
static void K2_RemoveFortItemFromPlayerHook(UObject* Context, FFrame& Stack, void* Ret);
|
||||
static AFortPickup* K2_SpawnPickupInWorldHook(UObject* Context, FFrame& Stack, AFortPickup** Ret);
|
||||
static AFortPickup* K2_SpawnPickupInWorldWithClassHook(UObject* Context, FFrame& Stack, AFortPickup** Ret);
|
||||
static UObject* GetAIDirectorHook(UObject* Context, FFrame& Stack, UObject** Ret);
|
||||
static UObject* GetAIGoalManagerHook(UObject* Context, FFrame& Stack, UObject** Ret);
|
||||
static bool PickLootDropsHook(UObject* Context, FFrame& Stack, bool* Ret);
|
||||
|
||||
static UClass* StaticClass();
|
||||
|
||||
@@ -313,9 +313,12 @@
|
||||
<ClInclude Include="EnableIf.h" />
|
||||
<ClInclude Include="Engine.h" />
|
||||
<ClInclude Include="EngineTypes.h" />
|
||||
<ClInclude Include="EnvQuery.h" />
|
||||
<ClInclude Include="EnvQueryTypes.h" />
|
||||
<ClInclude Include="events.h" />
|
||||
<ClInclude Include="finder.h" />
|
||||
<ClInclude Include="FortAbilitySet.h" />
|
||||
<ClInclude Include="FortAIEncounterInfo.h" />
|
||||
<ClInclude Include="FortAthenaCreativePortal.h" />
|
||||
<ClInclude Include="FortAthenaMapInfo.h" />
|
||||
<ClInclude Include="FortAthenaMutator.h" />
|
||||
|
||||
@@ -904,6 +904,15 @@
|
||||
<ClInclude Include="FortAthenaVehicle.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public\Athena</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FortAIEncounterInfo.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public\AI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EnvQuery.h">
|
||||
<Filter>Engine\Source\Runtime\AIModule\Classes\EnvironmentQuery</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="EnvQueryTypes.h">
|
||||
<Filter>Engine\Source\Runtime\AIModule\Classes\EnvironmentQuery</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Engine">
|
||||
@@ -1149,6 +1158,15 @@
|
||||
<Filter Include="FortniteGame\Source\FortniteGame\Public\AI\Navigation">
|
||||
<UniqueIdentifier>{8953303f-bfb2-4d61-945e-994fb1761cd8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Engine\Source\Runtime\AIModule">
|
||||
<UniqueIdentifier>{7442549c-8d75-4bdb-a44a-df55140720c9}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Engine\Source\Runtime\AIModule\Classes">
|
||||
<UniqueIdentifier>{ababaf56-50f2-4d78-baa6-bad1b5ca1cf1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Engine\Source\Runtime\AIModule\Classes\EnvironmentQuery">
|
||||
<UniqueIdentifier>{9b5483b5-3984-4fe1-96d2-e37d72642efd}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="UnrealEngine.cpp">
|
||||
|
||||
@@ -132,6 +132,26 @@ static void SetupServerBotManager()
|
||||
}
|
||||
}
|
||||
|
||||
static void SetupAIGoalManager()
|
||||
{
|
||||
// There is some virtual function in the gamemode that calls a spawner for this, it gets the class from GameData, not sure why this doesn't work automatically or if we should even spawn this.
|
||||
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
static auto AIGoalManagerOffset = GameMode->GetOffset("AIGoalManager");
|
||||
|
||||
static auto AIGoalManagerClass = FindObject<UClass>(L"/Script.FortniteGame.FortAIGoalManager");
|
||||
|
||||
LOG_INFO(LogDev, "AIGoalManager Before: {}", __int64(GameMode->Get(AIGoalManagerOffset)));
|
||||
|
||||
if (!GameMode->Get(AIGoalManagerOffset))
|
||||
GameMode->Get(AIGoalManagerOffset) = GetWorld()->SpawnActor<AActor>(AIGoalManagerClass);
|
||||
|
||||
if (GameMode->Get(AIGoalManagerOffset))
|
||||
{
|
||||
LOG_INFO(LogAI, "Successfully spawned AIGoalManager!");
|
||||
}
|
||||
}
|
||||
|
||||
static void SetupAIDirector()
|
||||
{
|
||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||
@@ -144,6 +164,8 @@ static void SetupAIDirector()
|
||||
|
||||
static auto AIDirectorOffset = GameMode->GetOffset("AIDirector");
|
||||
|
||||
LOG_INFO(LogDev, "AIDirector Before: {}", __int64(GameMode->Get(AIDirectorOffset)));
|
||||
|
||||
if (!GameMode->Get(AIDirectorOffset))
|
||||
GameMode->Get(AIDirectorOffset) = GetWorld()->SpawnActor<AActor>(AIDirectorClass);
|
||||
|
||||
@@ -151,7 +173,14 @@ static void SetupAIDirector()
|
||||
{
|
||||
LOG_INFO(LogAI, "Successfully spawned AIDirector!");
|
||||
|
||||
static auto ActivateFn = FindObject<UFunction>("/Script/FortniteGame.FortAIDirector.Activate");
|
||||
// we have to set so much more from data tables..
|
||||
|
||||
static auto OurEncounterClass = FindObject<UClass>(L"/Script/FortniteGame.FortAIEncounterInfo"); // ???
|
||||
static auto BaseEncounterClassOffset = GameMode->Get(AIDirectorOffset)->GetOffset("BaseEncounterClass");
|
||||
|
||||
GameMode->Get(AIDirectorOffset)->Get(BaseEncounterClassOffset) = OurEncounterClass;
|
||||
|
||||
static auto ActivateFn = FindObject<UFunction>(L"/Script/FortniteGame.FortAIDirector.Activate");
|
||||
|
||||
if (ActivateFn) // ?
|
||||
GameMode->Get(AIDirectorOffset)->ProcessEvent(ActivateFn); // ?
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "PlaysetLevelStreamComponent.h"
|
||||
#include "FortAthenaVehicleSpawner.h"
|
||||
#include "FortGameSessionDedicatedAthena.h"
|
||||
#include "FortAIEncounterInfo.h"
|
||||
|
||||
enum class EMeshNetworkNodeType : uint8_t
|
||||
{
|
||||
@@ -82,6 +83,20 @@ static int Return2Hook() { return 2; }
|
||||
static bool NoMCPHook() { return Globals::bNoMCP; }
|
||||
static void CollectGarbageHook() { return; }
|
||||
|
||||
static __int64 (*ConstructEmptyQueryInfoOriginal)(FEncounterEnvironmentQueryInfo* a1);
|
||||
|
||||
static __int64 ConstructEmptyQueryInfoHook(FEncounterEnvironmentQueryInfo* a1)
|
||||
{
|
||||
auto ret = ConstructEmptyQueryInfoOriginal(a1);
|
||||
|
||||
a1->GetEnvironmentQuery() = FindObject<UEnvQuery>(L"/Game/Athena/Deimos/AIDirector/EQS/Deimos_EQS_RiftSlots.Deimos_EQS_RiftSlots");
|
||||
a1->IsDirectional() = true;
|
||||
|
||||
LOG_INFO(LogDev, "ConstructEmptyQueryInfoHook!");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static __int64 (*DispatchRequestOriginal)(__int64 a1, __int64* a2, int a3);
|
||||
|
||||
static __int64 DispatchRequestHook(__int64 a1, __int64* a2, int a3)
|
||||
@@ -207,7 +222,7 @@ __int64 FlowStep_SetPhaseToActiveHook(AActor* SpecialEventPhase)
|
||||
|
||||
auto ret = FlowStep_SetPhaseToActiveOriginal(SpecialEventPhase); // idk if three actually is a ret
|
||||
|
||||
static auto OnRep_PhaseState = FindObject<UFunction>("/Script/SpecialEventGameplayRuntime.SpecialEventPhase.OnRep_PhaseState");
|
||||
static auto OnRep_PhaseState = FindObject<UFunction>(L"/Script/SpecialEventGameplayRuntime.SpecialEventPhase.OnRep_PhaseState");
|
||||
SpecialEventPhase->ProcessEvent(OnRep_PhaseState);
|
||||
|
||||
SpecialEventPhase->ForceNetUpdate();
|
||||
@@ -215,6 +230,26 @@ __int64 FlowStep_SetPhaseToActiveHook(AActor* SpecialEventPhase)
|
||||
return ret;
|
||||
}
|
||||
|
||||
UObject* GetGoalManagerHook(UObject* WorldContextObject)
|
||||
{
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
static auto AIGoalManagerOffset = GameMode->GetOffset("AIGoalManager");
|
||||
|
||||
LOG_INFO(LogDev, "WHAT A BOZO GetGoalManagerHook RET: 0x{:x}", __int64(_ReturnAddress()) - __int64(GetModuleHandleW(0)));
|
||||
|
||||
return GameMode->Get(AIGoalManagerOffset);
|
||||
}
|
||||
|
||||
UObject* GetAIDirectorHook()
|
||||
{
|
||||
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
|
||||
static auto AIDirectorOffset = GameMode->GetOffset("AIDirector");
|
||||
|
||||
LOG_INFO(LogDev, "WHAT A BOZO GetAIDirectorHook RET: 0x{:x}", __int64(_ReturnAddress()) - __int64(GetModuleHandleW(0)));
|
||||
|
||||
return GameMode->Get(AIDirectorOffset);
|
||||
}
|
||||
|
||||
DWORD WINAPI Main(LPVOID)
|
||||
{
|
||||
InitLogger();
|
||||
@@ -273,14 +308,18 @@ DWORD WINAPI Main(LPVOID)
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNetPackageMap VeryVerbose", nullptr);
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNetTraffic VeryVerbose", nullptr);
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNet VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNavigation VeryVerbose", nullptr);
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNavigation VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortMission VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortAIGoalSelection VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogBuilding VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortAI VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortAIDirector VeryVerbose", nullptr);
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortQuest VeryVerbose", nullptr);
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortUIDirector NoLogging", nullptr);
|
||||
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogAbilitySystem VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogDataTable VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogMeshNetwork VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogEQS VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFort VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogGameMode VeryVerbose", nullptr);
|
||||
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogSpecialEvent VeryVerbose", nullptr);
|
||||
@@ -319,6 +358,39 @@ DWORD WINAPI Main(LPVOID)
|
||||
FindObject<UFunction>(L"/Script/FortniteGame.BuildingFoundation.SetDynamicFoundationEnabled"),
|
||||
ABuildingFoundation::SetDynamicFoundationEnabledHook, (PVOID*)&ABuildingFoundation::SetDynamicFoundationEnabledOriginal, false, true); */
|
||||
|
||||
/*
|
||||
if (Fortnite_Version == 6.21) // ur trolling
|
||||
{
|
||||
std::string AIDirectorFuncName = "/Script/Engine.PlayerController.FOV"; // "/Script/Engine.PlayerController.ClientVoiceHandshakeComplete";
|
||||
std::string GoalManagerFuncName = "/Script/Engine.PlayerController.EnableCheats";
|
||||
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0xAADD50), (PVOID)ConstructEmptyQueryInfoHook, (PVOID*)&ConstructEmptyQueryInfoOriginal); // 7FF7E556D158
|
||||
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB10480, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xABBAB9, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB1E2BC, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB25EAA, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xABFDC1, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xAEC76D, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xA9C62C, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xAA1165, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xA9F5C0, (PVOID)GetGoalManagerHook, GoalManagerFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0x10975EE, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xAC1C15, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB2096E, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0x107B6A5, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB213DC, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xAB51D2, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB21BB8, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xABE6AC, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0xB2247D, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0x10988B7, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0x107C7B6, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0x1096D21, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
HookInstruction(__int64(GetModuleHandleW(0)) + 0x1097982, (PVOID)GetAIDirectorHook, AIDirectorFuncName, ERelativeOffsets::CALL, FortPlayerControllerAthenaDefault);
|
||||
}
|
||||
*/
|
||||
|
||||
if (Fortnite_Version == 17.30) // Rift Tour stuff
|
||||
{
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E07910), (PVOID)GetMeshNetworkNodeTypeHook, nullptr);
|
||||
@@ -330,7 +402,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
}
|
||||
else if (Fortnite_Version == 18.40)
|
||||
{
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E07910), (PVOID)GetMeshNetworkNodeTypeHook, nullptr);
|
||||
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + ), (PVOID)GetMeshNetworkNodeTypeHook, nullptr);
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x416AAB8), (PVOID)ReturnTrueHook, nullptr); // 7FF79E3EAAB8
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x416A840), (PVOID)ReturnTrueHook, nullptr); // 7FF79E3EA840
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x416A93C), (PVOID)ReturnTrueHook, nullptr); // 7FF79E3EA93C
|
||||
@@ -549,7 +621,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
auto FortServerRestartPlayer = FortPlayerControllerDefault->VFTable[ServerReturnToMainMenuIdx];
|
||||
VirtualSwap(FortPlayerControllerAthenaDefault->VFTable, ServerReturnToMainMenuIdx, FortServerRestartPlayer);
|
||||
|
||||
HookInstruction(Addresses::UpdateTrackedAttributesLea, (PVOID)AFortPlayerControllerAthena::UpdateTrackedAttributesHook, "/Script/Engine.PlayerController.EnableCheats", ERelativeOffsets::LEA, FortPlayerControllerAthenaDefault);
|
||||
// HookInstruction(Addresses::UpdateTrackedAttributesLea, (PVOID)AFortPlayerControllerAthena::UpdateTrackedAttributesHook, "/Script/Engine.PlayerController.EnableCheats", ERelativeOffsets::LEA, FortPlayerControllerAthenaDefault);
|
||||
// HookInstruction(Addresses::CombinePickupLea, (PVOID)AFortPickup::CombinePickupHook, "/Script/Engine.PlayerController.SetVirtualJoystickVisibility", ERelativeOffsets::LEA, FortPlayerControllerAthenaDefault);
|
||||
|
||||
if (bEnableRebooting)
|
||||
@@ -696,6 +768,10 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_GiveItemsAtGamePhaseStep>(L"/Script/FortniteGame.Default__FortAthenaMutator_GiveItemsAtGamePhaseStep"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_GiveItemsAtGamePhaseStep.OnGamePhaseStepChanged"),
|
||||
AFortAthenaMutator_GiveItemsAtGamePhaseStep::OnGamePhaseStepChangedHook, (PVOID*)&AFortAthenaMutator_GiveItemsAtGamePhaseStep::OnGamePhaseStepChangedOriginal, false, true);
|
||||
|
||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.GetAIDirector"),
|
||||
UFortKismetLibrary::GetAIDirectorHook, (PVOID*)&UFortKismetLibrary::GetAIDirectorOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.GetAIGoalManager"),
|
||||
UFortKismetLibrary::GetAIGoalManagerHook, (PVOID*)&UFortKismetLibrary::GetAIGoalManagerOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.K2_GiveItemToPlayer"),
|
||||
UFortKismetLibrary::K2_GiveItemToPlayerHook, (PVOID*)&UFortKismetLibrary::K2_GiveItemToPlayerOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.K2_GiveBuildingResource"),
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Globals
|
||||
extern inline bool bHitReadyToStartMatch = false;
|
||||
extern inline bool bInitializedPlaylist = false;
|
||||
extern inline bool bStartedListening = false;
|
||||
extern inline bool bAutoRestart = true;
|
||||
extern inline bool bAutoRestart = true; // doesnt work fyi
|
||||
extern inline bool bFillVendingMachines = true;
|
||||
extern inline int AmountOfListens = 0; // TODO: Switch to this for LastNum
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ static inline void StaticUI()
|
||||
{
|
||||
if (IsRestartingSupported())
|
||||
{
|
||||
ImGui::Checkbox("Auto Restart", &Globals::bAutoRestart);
|
||||
// ImGui::Checkbox("Auto Restart", &Globals::bAutoRestart);
|
||||
|
||||
if (Globals::bAutoRestart)
|
||||
{
|
||||
@@ -517,23 +517,6 @@ static inline void MainUI()
|
||||
}
|
||||
*/
|
||||
|
||||
if (ImGui::Button("aaa"))
|
||||
{
|
||||
static auto Clasda = FindObject<UClass>(L"/Script/FortniteGame.FortMission_RiftSpawners");
|
||||
auto AllMissions = UGameplayStatics::GetAllActorsOfClass(GetWorld(), Clasda);
|
||||
|
||||
LOG_INFO(LogDev, "AllMissions.Num(): {}", AllMissions.Num());
|
||||
|
||||
for (int i = 0; i < AllMissions.Num(); i++)
|
||||
{
|
||||
auto Mission = AllMissions.at(i);
|
||||
|
||||
static auto bCalendarAllowsSpawningOffset = Mission->GetOffset("bCalendarAllowsSpawning");
|
||||
LOG_INFO(LogDev, "Mission->Get<bool>(bCalendarAllowsSpawningOffset) Original: {}", Mission->Get<bool>(bCalendarAllowsSpawningOffset));
|
||||
Mission->Get<bool>(bCalendarAllowsSpawningOffset) = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bIsInAutoRestart && (Engine_Version < 424 && ImGui::Button("Restart")))
|
||||
{
|
||||
if (Engine_Version < 424)
|
||||
@@ -935,6 +918,29 @@ static inline void MainUI()
|
||||
|
||||
ImGui::InputText("Function Name to mess with", &FunctionNameToDump);
|
||||
|
||||
if (ImGui::Button("Find all classes that inherit"))
|
||||
{
|
||||
auto ClassToScuff = FindObject<UClass>(ClassNameToDump);
|
||||
|
||||
if (ClassToScuff)
|
||||
{
|
||||
auto ObjectNum = ChunkedObjects ? ChunkedObjects->Num() : UnchunkedObjects ? UnchunkedObjects->Num() : 0;
|
||||
|
||||
for (int i = 0; i < ObjectNum; i++)
|
||||
{
|
||||
auto CurrentObject = GetObjectByIndex(i);
|
||||
|
||||
if (!CurrentObject || CurrentObject == ClassToScuff)
|
||||
continue;
|
||||
|
||||
if (!CurrentObject->IsA(ClassToScuff))
|
||||
continue;
|
||||
|
||||
LOG_INFO(LogDev, "Class Name: {}", CurrentObject->GetPathName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ImGui::Button("Print Class VFT"))
|
||||
{
|
||||
auto Class = FindObject<UClass>(ClassNameToDump);
|
||||
|
||||
@@ -381,7 +381,7 @@ static inline void HookInstruction(uint64 instrAddr, void* Detour, const std::st
|
||||
|
||||
if (__int64(instrAddr) - FunctionAddr < 0) // We do not want the FunctionAddr (detour) to be less than where we are replacing.
|
||||
{
|
||||
LOG_INFO(LogDev, "Hooking Instruction will not work! Function is after ({})!", FunctionToReplace);
|
||||
LOG_ERROR(LogDev, "Hooking Instruction will not work! Function is after ({})!", FunctionToReplace);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ extern inline int Engine_Version = 0; // For example, 420, 421, etc. // Prevent
|
||||
extern inline double Fortnite_Version = 0; // For example, 4.1, 6.21, etc. // Prevent using this when possible.
|
||||
extern inline int Fortnite_CL = 0;
|
||||
|
||||
// #define PROD // this doesnt do anything besides remove processeventhook and some assert stuff
|
||||
#define PROD // this doesnt do anything besides remove processeventhook and some assert stuff
|
||||
|
||||
struct PlaceholderBitfield
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user