artificial intelligence

proper *****, work on ai, organize some things
This commit is contained in:
Milxnor
2023-05-14 13:51:58 -04:00
parent a94005805c
commit ec30c7ecf8
25 changed files with 422 additions and 68 deletions

View File

@@ -0,0 +1,7 @@
#include "AthenaDeimosRift.h"
void AAthenaDeimosRift::QueueActorsToSpawnHook(UObject* Context, FFrame* Stack, void* Ret)
{
LOG_INFO(LogDev, "QueueActorsToSpawnHook!");
return QueueActorsToSpawnOriginal(Context, Stack, Ret);
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include "BuildingRift.h"
#include "Stack.h"
class AAthenaDeimosRift : public ABuildingRift
{
public:
static inline void (*QueueActorsToSpawnOriginal)(UObject* Context, FFrame* Stack, void* Ret);
static void QueueActorsToSpawnHook(UObject* Context, FFrame* Stack, void* Ret);
};

View File

@@ -0,0 +1,26 @@
#include "BP_IslandScripting.h"
void ABP_IslandScripting_C::Initialize()
{
static auto UpdateMapOffset = GetOffset("UpdateMap", false);
if (UpdateMapOffset != -1)
{
Get<bool>(UpdateMapOffset) = true;
this->OnRep_UpdateMap();
}
/*
// This spawns the beam.
this->IsDeimosActive() = true;
this->OnRep_IsDeimosActive();
*/
}
ABP_IslandScripting_C* ABP_IslandScripting_C::GetIslandScripting()
{
auto AllIslandScriptings = UGameplayStatics::GetAllActorsOfClass(GetWorld(), StaticClass());
return AllIslandScriptings.Num() > 0 ? (ABP_IslandScripting_C*)AllIslandScriptings.at(0) : nullptr;
}

View File

@@ -0,0 +1,37 @@
#pragma once
#include "reboot.h"
#include "GameplayStatics.h"
class ABP_IslandScripting_C : public AActor // AFortAlwaysRelevantReplicatedActor
{
public:
bool& IsDeimosActive()
{
static auto IsDeimosActiveOffset = GetOffset("IsDeimosActive");
return Get<bool>(IsDeimosActiveOffset);
}
void OnRep_IsDeimosActive()
{
static auto OnRep_IsDeimosActiveFn = FindObject<UFunction>("/Game/Athena/Prototype/Blueprints/Island/BP_IslandScripting.BP_IslandScripting_C.OnRep_IsDeimosActive");
this->ProcessEvent(OnRep_IsDeimosActiveFn);
}
void OnRep_UpdateMap()
{
static auto OnRep_UpdateMapFn = FindObject<UFunction>("/Game/Athena/Prototype/Blueprints/Island/BP_IslandScripting.BP_IslandScripting_C.OnRep_UpdateMap");
this->ProcessEvent(OnRep_UpdateMapFn);
}
void Initialize();
static ABP_IslandScripting_C* GetIslandScripting();
static UClass* StaticClass()
{
/* static */ auto Class = FindObject<UClass>("/Game/Athena/Prototype/Blueprints/Island/BP_IslandScripting.BP_IslandScripting_C");
return Class;
}
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "BuildingActor.h"
class ABuildingRift : public ABuildingActor
{
public:
};

View File

@@ -5,6 +5,8 @@
void AFortAthenaCreativePortal::TeleportPlayerToLinkedVolumeHook(UObject* Context, FFrame& Stack, void* Ret)
{
LOG_INFO(LogDev, "TeleportPlayerToLinkedVolumeHook!");
auto Portal = (AFortAthenaCreativePortal*)Context; // Cast?
if (!Portal)
@@ -29,7 +31,7 @@ void AFortAthenaCreativePortal::TeleportPlayerToLinkedVolumeHook(UObject* Contex
return TeleportPlayerToLinkedVolumeOriginal(Context, Stack, Ret);
auto Location = LinkedVolume->GetActorLocation();
Location.Z -= 1000; // proper 1:1
Location.Z -= 10000; // proper 1:1
PlayerPawn->TeleportTo(Location, FRotator());
return TeleportPlayerToLinkedVolumeOriginal(Context, Stack, Ret);

View File

@@ -14,10 +14,12 @@
#include "NetSerialization.h"
#include "GameplayStatics.h"
#include "DataTableFunctionLibrary.h"
#include "LevelStreamingDynamic.h"
#include "KismetStringLibrary.h"
#include "SoftObjectPtr.h"
#include "discord.h"
#include "BuildingGameplayActorSpawnMachine.h"
#include "BP_IslandScripting.h"
#include "vehicles.h"
#include "globals.h"
@@ -324,18 +326,41 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
if (AdditionalLevelsOffset != -1)
{
auto& AdditionalLevels = CurrentPlaylist->Get<TArray<TSoftObjectPtr<UClass>>>(AdditionalLevelsOffset);
auto& AdditionalLevels = CurrentPlaylist->Get<TArray<TSoftObjectPtr<UWorld>>>(AdditionalLevelsOffset);
LOG_INFO(LogPlaylist, "Loading {} playlist levels.", AdditionalLevels.Num());
for (int i = 0; i < AdditionalLevels.Num(); i++)
{
// auto World = Cast<UWorld>(Playlist->AdditionalLevels[i].Get());
// StreamLevel(UKismetSystemLibrary::GetPathName(World->PersistentLevel).ToString());
auto LevelName = AdditionalLevels.at(i).SoftObjectPtr.ObjectID.AssetPathName.ToString();
LOG_INFO(LogPlaylist, "Loading level {}.", LevelName);
StreamLevel(LevelName);
FName LevelFName = AdditionalLevels.at(i).SoftObjectPtr.ObjectID.AssetPathName;
auto LevelNameStr = LevelFName.ToString();
LOG_INFO(LogPlaylist, "Loading level {}.", LevelNameStr);
auto LevelNameWStr = std::wstring(LevelNameStr.begin(), LevelNameStr.end());
// bruh the onrep automatically streams if no levelstreamingdynamci found
// StreamLevel(LevelNameStr);
// FLatentActionInfo LatentInfo{};
// UGameplayStatics::LoadStreamLevel(GetWorld(), LevelFName, true, false, LatentInfo);
// ULevelStreamingDynamic::LoadLevelInstance(GetWorld(), LevelNameWStr.c_str(), FVector(), FRotator());
static auto AdditionalPlaylistLevelsStreamedOffset = GameState->GetOffset("AdditionalPlaylistLevelsStreamed", false);
if (AdditionalPlaylistLevelsStreamedOffset != -1) // i think its valid on every version but idgaf
{
if (Fortnite_Version < 11) // IDK What verison it actually wsa but they chnaged it to a struct
{
auto& AdditionalPlaylistLevelsStreamed = GameState->Get<TArray<FName>>(AdditionalPlaylistLevelsStreamedOffset);
AdditionalPlaylistLevelsStreamed.Add(LevelFName);
}
}
}
static auto OnRep_AdditionalPlaylistLevelsStreamedFn = FindObject<UFunction>(L"/Script/FortniteGame.FortGameState.OnRep_AdditionalPlaylistLevelsStreamed");
if (OnRep_AdditionalPlaylistLevelsStreamedFn)
GameState->ProcessEvent(OnRep_AdditionalPlaylistLevelsStreamedFn);
}
}
}
@@ -344,12 +369,12 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
{
if (true) // idfk if the stage only showed on marshmello playlist
{
auto PleasantParkIdk = FindObject<AActor>(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.PleasentParkFestivus"));
auto PleasantParkIdk = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.PleasentParkFestivus");
ShowFoundation(PleasantParkIdk);
}
else
{
auto PleasantParkGround = FindObject<AActor>("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.PleasentParkDefault");
auto PleasantParkGround = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.PleasentParkDefault");
ShowFoundation(PleasantParkGround);
}
}
@@ -358,44 +383,36 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
{
if (Fortnite_Version != 6.10)
{
auto Lake = FindObject<AActor>(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Lake1"));
auto Lake2 = FindObject<AActor>("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Lake2");
auto Lake = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Lake1");
auto Lake2 = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Lake2");
Fortnite_Version <= 6.21 ? ShowFoundation(Lake) : ShowFoundation(Lake2);
}
else
{
auto Lake = FindObject<AActor>(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest12"));
auto Lake = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest12");
ShowFoundation(Lake);
}
auto FloatingIsland = Fortnite_Version == 6.10 ? FindObject<AActor>(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest13")) :
FindObject<AActor>(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_FloatingIsland"));
auto FloatingIsland = Fortnite_Version == 6.10 ? FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest13") :
FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_FloatingIsland");
ShowFoundation(FloatingIsland);
UObject* Scripting = FindObject<AActor>("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.BP_IslandScripting3"); // bruh
auto IslandScripting = ABP_IslandScripting_C::GetIslandScripting();
if (Scripting)
if (IslandScripting)
{
static auto UpdateMapOffset = Scripting->GetOffset("UpdateMap", false);
if (UpdateMapOffset != -1)
{
Scripting->Get<bool>(UpdateMapOffset) = true;
static auto OnRep_UpdateMap = FindObject<UFunction>("/Game/Athena/Prototype/Blueprints/Island/BP_IslandScripting.BP_IslandScripting_C.OnRep_UpdateMap");
Scripting->ProcessEvent(OnRep_UpdateMap);
}
IslandScripting->Initialize();
}
}
if (Fortnite_Version == 14.60 && Globals::bGoingToPlayEvent)
{
ShowFoundation(FindObject<AActor>("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.Lobby_Foundation3")); // Aircraft Carrier
ShowFoundation(FindObject<AActor>(L"/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.Lobby_Foundation3")); // Aircraft Carrier
}
auto TheBlock = FindObject<AActor>("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank
auto TheBlock = FindObject<AActor>(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank
if (TheBlock)
ShowFoundation(TheBlock);
@@ -567,6 +584,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
SetupAIDirector();
SetupServerBotManager();
// SetupNavConfig(UKismetStringLibrary::Conv_StringToName(L"Deimos"));
if (auto TeamsArrayContainer = GameState->GetTeamsArrayContainer())
{

View File

@@ -391,6 +391,8 @@ void AFortPlayerControllerAthena::ServerGiveCreativeItemHook(AFortPlayerControll
void AFortPlayerControllerAthena::ServerTeleportToPlaygroundLobbyIslandHook(AFortPlayerControllerAthena* Controller)
{
LOG_INFO(LogDev, "ServerTeleportToPlaygroundLobbyIslandHook!");
auto Pawn = Controller->GetMyFortPawn();
if (!Pawn)
@@ -398,7 +400,7 @@ void AFortPlayerControllerAthena::ServerTeleportToPlaygroundLobbyIslandHook(AFor
// TODO IsTeleportToCreativeHubAllowed
static auto FortPlayerStartCreativeClass = FindObject<UClass>("/Script/FortniteGame.FortPlayerStartCreative");
static auto FortPlayerStartCreativeClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartCreative");
auto AllCreativePlayerStarts = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortPlayerStartCreativeClass);
for (int i = 0; i < AllCreativePlayerStarts.Num(); i++)
@@ -447,8 +449,10 @@ void AFortPlayerControllerAthena::ServerPlaySquadQuickChatMessageHook(AFortPlaye
{
using UAthenaEmojiItemDefinition = UFortItemDefinition;
static auto EmojiComm = FindObject<UAthenaEmojiItemDefinition>("/Game/Athena/Items/Cosmetics/Dances/Emoji/Emoji_Comm.Emoji_Comm");
static auto EmojiComm = FindObject<UAthenaEmojiItemDefinition>(L"/Game/Athena/Items/Cosmetics/Dances/Emoji/Emoji_Comm.Emoji_Comm");
PlayerController->ServerPlayEmoteItemHook(PlayerController, EmojiComm);
// idk what else we are supposed to do here
}
void AFortPlayerControllerAthena::GetPlayerViewPointHook(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation)

View File

@@ -232,6 +232,13 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
static auto DeathInfoStruct = FindObject<UStruct>(L"/Script/FortniteGame.DeathInfo");
static auto DeathInfoStructSize = DeathInfoStruct->GetPropertiesSize();
RtlSecureZeroMemory(DeathInfo, DeathInfoStructSize);
static auto OnRep_DeathInfoFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerStateAthena.OnRep_DeathInfo");
if (OnRep_DeathInfoFn)
{
PlayerStateAthena->ProcessEvent(OnRep_DeathInfoFn);
}
}
return NewPawn;

View File

@@ -76,7 +76,7 @@ void UGameplayStatics::RemovePlayer(APlayerController* Player, bool bDestroyPawn
AActor* UGameplayStatics::BeginDeferredActorSpawnFromClass(const UObject* WorldContextObject, UClass* ActorClass, const FTransform& SpawnTransform, ESpawnActorCollisionHandlingMethod CollisionHandlingOverride, AActor* Owner)
{
static auto fn = FindObject<UFunction>("/Script/Engine.GameplayStatics.BeginDeferredActorSpawnFromClass");
static auto fn = FindObject<UFunction>(L"/Script/Engine.GameplayStatics.BeginDeferredActorSpawnFromClass");
struct
{
@@ -96,7 +96,7 @@ AActor* UGameplayStatics::BeginDeferredActorSpawnFromClass(const UObject* WorldC
AActor* UGameplayStatics::FinishSpawningActor(AActor* Actor, const FTransform& SpawnTransform)
{
static auto FinishSpawningActorFn = FindObject<UFunction>("/Script/Engine.GameplayStatics.FinishSpawningActor");
static auto FinishSpawningActorFn = FindObject<UFunction>(L"/Script/Engine.GameplayStatics.FinishSpawningActor");
struct
{
@@ -113,7 +113,7 @@ AActor* UGameplayStatics::FinishSpawningActor(AActor* Actor, const FTransform& S
void UGameplayStatics::LoadStreamLevel(UObject* WorldContextObject, FName LevelName, bool bMakeVisibleAfterLoad, bool bShouldBlockOnLoad, const FLatentActionInfo& LatentInfo)
{
static auto LoadStreamLevelFn = FindObject<UFunction>("/Script/Engine.GameplayStatics.LoadStreamLevel");
static auto LoadStreamLevelFn = FindObject<UFunction>(L"/Script/Engine.GameplayStatics.LoadStreamLevel");
struct
{
@@ -130,7 +130,7 @@ void UGameplayStatics::LoadStreamLevel(UObject* WorldContextObject, FName LevelN
void UGameplayStatics::UnloadStreamLevel(UObject* WorldContextObject, FName LevelName, const FLatentActionInfo& LatentInfo, bool bShouldBlockOnUnload)
{
static auto UnloadStreamLevelFn = FindObject<UFunction>("/Script/Engine.GameplayStatics.UnloadStreamLevel");
static auto UnloadStreamLevelFn = FindObject<UFunction>(L"/Script/Engine.GameplayStatics.UnloadStreamLevel");
struct
{
UObject* WorldContextObject; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)

View File

@@ -0,0 +1,25 @@
#include "KismetSystemLibrary.h"
#include "gui.h"
void UKismetSystemLibrary::PrintStringHook(UObject* Context, FFrame* Stack, void* Ret)
{
UObject* WorldContextObject; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FString inString; // (Parm, ZeroConstructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
bool bPrintToScreen; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, AdvancedDisplay, HasGetValueTypeHash, NativeAccessSpecifierPublic)
bool bPrintToLog; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, AdvancedDisplay, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FLinearColor TextColor; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, AdvancedDisplay, HasGetValueTypeHash, NativeAccessSpecifierPublic)
float Duration;
Stack->StepCompiledIn(&WorldContextObject);
Stack->StepCompiledIn(&inString);
Stack->StepCompiledIn(&bPrintToScreen);
Stack->StepCompiledIn(&bPrintToLog);
Stack->StepCompiledIn(&TextColor);
Stack->StepCompiledIn(&Duration);
if (bEngineDebugLogs)
LOG_INFO(LogDev, "GameLog: {}", inString.ToString());
return PrintStringOriginal(Context, Stack, Ret);
}

View File

@@ -4,6 +4,7 @@
#include "UnrealString.h"
#include "reboot.h"
#include "Stack.h"
enum class EDrawDebugTrace : uint8_t
{
@@ -75,6 +76,8 @@ struct FLinearColor
class UKismetSystemLibrary : public UObject
{
public:
static inline void (*PrintStringOriginal)(UObject* Context, FFrame* Stack, void* Ret);
static FString GetPathName(UObject* Object)
{
static auto GetPathNameFunction = FindObject<UFunction>("/Script/Engine.KismetSystemLibrary.GetPathName");
@@ -207,4 +210,6 @@ public:
return *(bool*)(__int64(Params) + ReturnValueOffset);
}
static void PrintStringHook(UObject* Context, FFrame* Stack, void* Ret);
};

View File

@@ -4,9 +4,9 @@
struct FLatentActionInfo
{
int Linkage; // 0x0000(0x0004) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int UUID; // 0x0004(0x0004) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int Linkage = 0; // 0x0000(0x0004) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int UUID = 0; // 0x0004(0x0004) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FName ExecutionFunction; // 0x0008(0x0008) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
UObject* CallbackTarget; // 0x0010(0x0008) (ZeroConstructor, IsPlainOldData, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
UObject* CallbackTarget = nullptr; // 0x0010(0x0008) (ZeroConstructor, IsPlainOldData, NoDestructor, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic)
};

View File

@@ -30,6 +30,7 @@ AWorldSettings* ULevel::GetWorldSettings(bool bChecked) const
{
// checkf(WorldSettings != nullptr, TEXT("%s"), *GetPathName());
}
static auto WorldSettingsOffset = GetOffset("WorldSettings");
return Get<AWorldSettings*>(WorldSettingsOffset);
}

View File

@@ -0,0 +1,8 @@
#pragma once
#include "Object.h"
class ULevelStreaming : public UObject
{
public:
};

View File

@@ -0,0 +1,36 @@
#pragma once
#include "LevelStreaming.h"
#include "UnrealString.h"
#include "Rotator.h"
#include "Vector.h"
#include "reboot.h" // too lazy to make cpp file for this
class ULevelStreamingDynamic : public ULevelStreaming
{
public:
static ULevelStreamingDynamic* LoadLevelInstance(UObject* WorldContextObject, FString LevelName, FVector Location, FRotator Rotation, bool* bOutSuccess = nullptr)
{
static auto LoadLevelInstanceFn = FindObject<UFunction>(L"/Script/Engine.LevelStreamingDynamic.LoadLevelInstance");
struct
{
UObject* WorldContextObject; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FString LevelName; // (Parm, ZeroConstructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FVector Location; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
FRotator Rotation; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, NativeAccessSpecifierPublic)
bool bOutSuccess; // (Parm, OutParm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
ULevelStreamingDynamic* ReturnValue; // (Parm, OutParm, ZeroConstructor, ReturnParm, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
}ULevelStreamingDynamic_LoadLevelInstance_Params{ WorldContextObject, LevelName, Location, Rotation };
auto defaultObj = FindObject<ULevelStreamingDynamic>(L"/Script/Engine.Default__LevelStreamingDynamic");
defaultObj->ProcessEvent(LoadLevelInstanceFn, &ULevelStreamingDynamic_LoadLevelInstance_Params);
if (bOutSuccess)
*bOutSuccess = ULevelStreamingDynamic_LoadLevelInstance_Params.bOutSuccess;
return ULevelStreamingDynamic_LoadLevelInstance_Params.ReturnValue;
}
};

View File

@@ -176,7 +176,9 @@
<ClCompile Include="Actor.cpp" />
<ClCompile Include="ActorComponent.cpp" />
<ClCompile Include="addresses.cpp" />
<ClCompile Include="AthenaDeimosRift.cpp" />
<ClCompile Include="AthenaMarkerComponent.cpp" />
<ClCompile Include="BP_IslandScripting.cpp" />
<ClCompile Include="BuildingActor.cpp" />
<ClCompile Include="BuildingContainer.cpp" />
<ClCompile Include="BuildingFoundation.cpp" />
@@ -241,6 +243,7 @@
<ClCompile Include="InventoryManagementLibrary.cpp" />
<ClCompile Include="KismetMathLibrary.cpp" />
<ClCompile Include="KismetStringLibrary.cpp" />
<ClCompile Include="KismetSystemLibrary.cpp" />
<ClCompile Include="KismetTextLibrary.cpp" />
<ClCompile Include="Level.cpp" />
<ClCompile Include="LevelActor.cpp" />
@@ -274,6 +277,7 @@
<ClInclude Include="AthenaBarrierFlag.h" />
<ClInclude Include="AthenaBarrierObjective.h" />
<ClInclude Include="AthenaBigBaseWall.h" />
<ClInclude Include="AthenaDeimosRift.h" />
<ClInclude Include="AthenaMarkerComponent.h" />
<ClInclude Include="AthenaResurrectionComponent.h" />
<ClInclude Include="AttributeSet.h" />
@@ -281,11 +285,13 @@
<ClInclude Include="BinaryHeap.h" />
<ClInclude Include="BitArray.h" />
<ClInclude Include="bots.h" />
<ClInclude Include="BP_IslandScripting.h" />
<ClInclude Include="BuildingActor.h" />
<ClInclude Include="BuildingContainer.h" />
<ClInclude Include="BuildingFoundation.h" />
<ClInclude Include="BuildingGameplayActor.h" />
<ClInclude Include="BuildingGameplayActorSpawnMachine.h" />
<ClInclude Include="BuildingRift.h" />
<ClInclude Include="BuildingSMActor.h" />
<ClInclude Include="BuildingStructuralSupportSystem.h" />
<ClInclude Include="BuildingTrap.h" />
@@ -401,6 +407,8 @@
<ClInclude Include="KismetTextLibrary.h" />
<ClInclude Include="LatentActionManager.h" />
<ClInclude Include="Level.h" />
<ClInclude Include="LevelStreaming.h" />
<ClInclude Include="LevelStreamingDynamic.h" />
<ClInclude Include="log.h" />
<ClInclude Include="Map.h" />
<ClInclude Include="MegaStormManager.h" />

View File

@@ -283,6 +283,15 @@
<ClCompile Include="BuildingGameplayActorSpawnMachine.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Building</Filter>
</ClCompile>
<ClCompile Include="AthenaDeimosRift.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Deimos</Filter>
</ClCompile>
<ClCompile Include="BP_IslandScripting.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Athena\Island</Filter>
</ClCompile>
<ClCompile Include="KismetSystemLibrary.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="log.h" />
@@ -877,6 +886,21 @@
<ClInclude Include="AthenaResurrectionComponent.h">
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
</ClInclude>
<ClInclude Include="AthenaDeimosRift.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Deimos</Filter>
</ClInclude>
<ClInclude Include="BuildingRift.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Building</Filter>
</ClInclude>
<ClInclude Include="BP_IslandScripting.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Athena\Island</Filter>
</ClInclude>
<ClInclude Include="LevelStreamingDynamic.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="LevelStreaming.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Engine">
@@ -1110,6 +1134,18 @@
<Filter Include="FortniteGame\Source\FortniteGame\Private\Athena\Modifiers">
<UniqueIdentifier>{ade44d65-f7a4-4fc9-ac38-637c84493b58}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public\Deimos">
<UniqueIdentifier>{ac17e75e-ef4a-44f8-9b69-f55b6cde947d}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Deimos">
<UniqueIdentifier>{aadf4f37-b2b9-4ce2-bebb-35719ef0aab1}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public\Athena\Island">
<UniqueIdentifier>{7df06629-6271-4cd1-8f2c-ad8d6829b069}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Athena\Island">
<UniqueIdentifier>{2d9beb55-a616-440e-8861-6a05f0ee2ef3}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="UnrealEngine.cpp">

View File

@@ -7,7 +7,7 @@
AWorldSettings* UWorld::K2_GetWorldSettings()
{
static auto fn = FindObject<UFunction>("/Script/Engine.World.K2_GetWorldSettings");
static auto fn = FindObject<UFunction>(L"/Script/Engine.World.K2_GetWorldSettings");
AWorldSettings* WorldSettings;
this->ProcessEvent(fn, &WorldSettings);
return WorldSettings;
@@ -94,7 +94,7 @@ AWorldSettings* UWorld::GetWorldSettings(const bool bCheckStreamingPersistent, c
AWorldSettings* WorldSettings = nullptr;
static auto PersistentLevelOffset = GetOffset("PersistentLevel");
if (Get(PersistentLevelOffset))
if (this->Get<ULevel*>(PersistentLevelOffset))
{
WorldSettings = Get<ULevel*>(PersistentLevelOffset)->GetWorldSettings(bChecked);
@@ -103,7 +103,7 @@ AWorldSettings* UWorld::GetWorldSettings(const bool bCheckStreamingPersistent, c
static auto StreamingLevelsOffset = GetOffset("StreamingLevels");
auto& StreamingLevels = Get<TArray<UObject*>>(StreamingLevelsOffset);
static auto LevelStreamingPersistentClass = FindObject<UClass>("/Script/Engine.LevelStreamingPersistent");
static auto LevelStreamingPersistentClass = FindObject<UClass>(L"/Script/Engine.LevelStreamingPersistent");
if (StreamingLevels.Num() > 0 &&
StreamingLevels.at(0) &&
@@ -118,5 +118,6 @@ AWorldSettings* UWorld::GetWorldSettings(const bool bCheckStreamingPersistent, c
}
}
}
return WorldSettings;
}

View File

@@ -88,7 +88,7 @@ public:
}
AWorldSettings* GetWorldSettings(bool bCheckStreamingPersistent = false, bool bChecked = true) const;
AWorldSettings* K2_GetWorldSettings();
AWorldSettings* K2_GetWorldSettings(); // DONT USE WHEN POSSIBLE
void Listen();
};

View File

@@ -490,7 +490,6 @@ void Addresses::Init()
Addresses::SetWorld = Engine_Version < 426 ? Addresses::SetWorld : __int64(DefaultNetDriver->VFTable[Addresses::SetWorld]);
UNetDriver::SetWorldOriginal = decltype(UNetDriver::SetWorldOriginal)(SetWorld);
AddNavigationSystemToWorldOriginal = decltype(AddNavigationSystemToWorldOriginal)(AddNavigationSystemToWorld);
NavSystemCleanUpOriginal = decltype(NavSystemCleanUpOriginal)(Addresses::NavSystemCleanUp);
LoadPlaysetOriginal = decltype(LoadPlaysetOriginal)(Addresses::LoadPlayset);
AFortGameModeAthena::SetZoneToIndexOriginal = decltype(AFortGameModeAthena::SetZoneToIndexOriginal)(Addresses::SetZoneToIndex);

View File

@@ -38,37 +38,67 @@ enum class ENavSystemOverridePolicy : uint8_t
extern inline void (*NavSystemCleanUpOriginal)(UNavigationSystemV1*, uint8) = nullptr;
extern inline void (*AddNavigationSystemToWorldOriginal)(UWorld& WorldOwner, EFNavigationSystemRunMode RunMode, UNavigationSystemConfig* NavigationSystemConfig, char bInitializeForWorld,
char bOverridePreviousNavSys) = nullptr;
static void SetNavigationSystem(AAthenaNavSystemConfigOverride* NavSystemOverride)
static bool SetNavigationSystem(AAthenaNavSystemConfigOverride* NavSystemOverride)
{
auto WorldSettings = GetWorld()->K2_GetWorldSettings();
UAthenaNavSystem*& NavSystem = (UAthenaNavSystem*&)GetWorld()->Get("NavigationSystem");
NavSystemOverride->Get<ENavSystemOverridePolicy>("OverridePolicy") = ENavSystemOverridePolicy::Append;
LOG_INFO(LogDev, "NavSystem: {}", NavSystem->IsValidLowLevel() ? NavSystem->GetFullName() : "BadRead");
WorldSettings->Get("NavigationSystemConfigOverride") = NavSystemOverride->Get("NavigationSystemConfig");
WorldSettings->Get("NavigationSystemConfig")->Get<bool>("bIsOverriden") = true;
if (NavSystem)
{
return false;
NavSystemCleanUpOriginal(NavSystem, 0);
GetWorld()->Get("NavigationSystem") = nullptr;
}
auto NavSystem = (UAthenaNavSystem*)GetWorld()->Get("NavigationSystem");
auto WorldSettings = GetWorld()->GetWorldSettings();
NavSystemCleanUpOriginal(NavSystem, 0);
LOG_INFO(LogDev, "WorldSettings: {}", WorldSettings->IsValidLowLevel() ? WorldSettings->GetFullName() : "BadRead");
GetWorld()->Get("NavigationSystem") = nullptr;
if (!WorldSettings)
return false;
static auto OverridePolicyOffset = NavSystemOverride->GetOffset("OverridePolicy", false);
if (OverridePolicyOffset != -1)
NavSystemOverride->Get<ENavSystemOverridePolicy>(OverridePolicyOffset) = ENavSystemOverridePolicy::Append;
static auto NavSystemOverride_NavigationSystemConfigOffset = NavSystemOverride->GetOffset("NavigationSystemConfig");
WorldSettings->Get("NavigationSystemConfigOverride") = NavSystemOverride->Get(NavSystemOverride_NavigationSystemConfigOffset);
LOG_INFO(LogDev, "WorldSettings_NavigationSystemConfig: {}", __int64(WorldSettings->Get("NavigationSystemConfig")));
if (WorldSettings->Get("NavigationSystemConfig"))
WorldSettings->Get("NavigationSystemConfig")->Get<bool>("bIsOverriden") = true;
if (!NavSystemOverride->Get("NavigationSystemConfig"))
return;
{
LOG_ERROR(LogAI, "No NavigationSystemConfig!");
return false;
}
auto& ClassPath = NavSystemOverride->Get("NavigationSystemConfig")->Get<FSoftObjectPath>("NavigationSystemClass");
auto NewNavSystemClass = FindObject<UClass>(ClassPath.AssetPathName.ToString());
if (!NewNavSystemClass)
return;
{
LOG_ERROR(LogAI, "No NavigationSystemClass!");
return false;
}
LOG_INFO(LogAI, "Setup navigation system.");
AddNavigationSystemToWorldOriginal(*GetWorld(), EFNavigationSystemRunMode::GameMode, NavSystemOverride->Get("NavigationSystemConfig"), true, false);
// if (Fortnite_Version >= 10.40) // idk when they added the fifth arg or does it even matter????
{
static void (*AddNavigationSystemToWorldOriginal)(UWorld * WorldOwner, EFNavigationSystemRunMode RunMode, UNavigationSystemConfig * NavigationSystemConfig, char bInitializeForWorld, char bOverridePreviousNavSys) =
decltype(AddNavigationSystemToWorldOriginal)(Addresses::AddNavigationSystemToWorld);
AddNavigationSystemToWorldOriginal(GetWorld(), EFNavigationSystemRunMode::GameMode, NavSystemOverride->Get("NavigationSystemConfig"), true, false);
}
return true;
}
static void SetupServerBotManager()
@@ -76,7 +106,7 @@ static void SetupServerBotManager()
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
static auto FortServerBotManagerClass = FindObject<UClass>("/Script/FortniteGame.FortServerBotManagerAthena"); // Is there a BP for this? // GameMode->ServerBotManagerClass
static auto FortServerBotManagerClass = FindObject<UClass>(L"/Script/FortniteGame.FortServerBotManagerAthena"); // Is there a BP for this? // GameMode->ServerBotManagerClass
if (!FortServerBotManagerClass)
return;
@@ -95,10 +125,10 @@ static void SetupServerBotManager()
static auto CachedGameStateOffset = ServerBotManager->GetOffset("CachedGameState", false);
if (CachedGameStateOffset != -1)
ServerBotManager->Get(CachedGameStateOffset) = GameState;
ServerBotManager->Get(CachedGameStateOffset) = GameState;
static auto CachedBotMutatorOffset = ServerBotManager->GetOffset("CachedBotMutator");
ServerBotManager->Get(CachedBotMutatorOffset) = FindFirstMutator(FindObject<UClass>("/Script/FortniteGame.FortAthenaMutator_Bots"));
ServerBotManager->Get(CachedBotMutatorOffset) = FindFirstMutator(FindObject<UClass>(L"/Script/FortniteGame.FortAthenaMutator_Bots"));
}
}
@@ -107,7 +137,7 @@ static void SetupAIDirector()
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
static auto AIDirectorClass = FindObject<UClass>("/Script/FortniteGame.AthenaAIDirector"); // Probably wrong class
static auto AIDirectorClass = FindObject<UClass>(L"/Script/FortniteGame.AthenaAIDirector"); // Probably wrong class
if (!AIDirectorClass)
return;
@@ -119,28 +149,46 @@ static void SetupAIDirector()
if (GameMode->Get(AIDirectorOffset))
{
LOG_INFO(LogAI, "Successfully spawned AIDirector!");
static auto ActivateFn = FindObject<UFunction>("/Script/FortniteGame.FortAIDirector.Activate");
if (ActivateFn) // ?
GameMode->Get(AIDirectorOffset)->ProcessEvent(ActivateFn); // ?
}
}
static void SetupNavConfig(const FName& AgentName)
{
static auto AthenaNavSystemConfigOverrideClass = FindObject<UClass>("/Script/FortniteGame.AthenaNavSystemConfigOverride");
static auto AthenaNavSystemConfigOverrideClass = FindObject<UClass>(L"/Script/FortniteGame.AthenaNavSystemConfigOverride");
auto NavSystemOverride = GetWorld()->SpawnActor<AActor>(AthenaNavSystemConfigOverrideClass);
if (!NavSystemOverride)
return;
static auto AthenaNavSystemConfigClass = FindObject<UClass>("/Script/FortniteGame.AthenaNavSystemConfig");
static auto AthenaNavSystemConfigClass = FindObject<UClass>(L"/Script/FortniteGame.AthenaNavSystemConfig");
auto AthenaNavConfig = (UAthenaNavSystemConfig*)UGameplayStatics::SpawnObject(AthenaNavSystemConfigClass, NavSystemOverride);
AthenaNavConfig->Get<bool>("bUseBuildingGridAsNavigableSpace") = false;
AthenaNavConfig->Get<bool>("bUsesStreamedInNavLevel") = true;
static auto bUsesStreamedInNavLevelOffset = AthenaNavConfig->GetOffset("bUsesStreamedInNavLevel", false);
if (bUsesStreamedInNavLevelOffset != -1)
AthenaNavConfig->Get<bool>(bUsesStreamedInNavLevelOffset) = true;
AthenaNavConfig->Get<bool>("bAllowAutoRebuild") = true;
AthenaNavConfig->Get<bool>("bCreateOnClient") = true; // BITFIELD
AthenaNavConfig->Get<bool>("bAutoSpawnMissingNavData") = true; // BITFIELD
AthenaNavConfig->Get<bool>("bSpawnNavDataInNavBoundsLevel") = true; // BITFIELD
AthenaNavConfig->Get<bool>("bUseNavigationInvokers") = false;
AthenaNavConfig->Get<FName>("DefaultAgentName") = AgentName;
static auto bUseNavigationInvokersOffset = AthenaNavConfig->GetOffset("bUseNavigationInvokers", false);
if (bUseNavigationInvokersOffset != -1)
AthenaNavConfig->Get<bool>(bUseNavigationInvokersOffset) = false;
static auto DefaultAgentNameOffset = AthenaNavConfig->GetOffset("DefaultAgentName", false);
if (DefaultAgentNameOffset != -1)
AthenaNavConfig->Get<FName>(DefaultAgentNameOffset) = AgentName;
// NavSystemOverride->Get<ENavSystemOverridePolicy>("OverridePolicy") = ENavSystemOverridePolicy::Append;
NavSystemOverride->Get("NavigationSystemConfig") = AthenaNavConfig;

View File

@@ -44,6 +44,7 @@
#include "PlaysetLevelStreamComponent.h"
#include "FortAthenaVehicleSpawner.h"
#include "FortGameSessionDedicatedAthena.h"
#include "AthenaDeimosRift.h"
enum class EMeshNetworkNodeType : uint8_t
{
@@ -101,6 +102,20 @@ static __int64 DispatchRequestHook(__int64 a1, __int64* a2, int a3)
return DispatchRequestOriginal(a1, a2, 3);
}
static bool (*CanCreateInCurrentContextOriginal)(UObject* Template);
bool CanCreateInCurrentContextHook(UObject* Template)
{
auto originalRet = CanCreateInCurrentContextOriginal(Template);
if (!originalRet)
{
LOG_INFO(LogDev, "CanCreateInCurrentContextHook false but returning true for {}!", Template->IsValidLowLevel() ? Template->GetPathName() : "BadRead");
}
return true;
}
void (*ApplyHomebaseEffectsOnPlayerSetupOriginal)(
__int64* GameState,
__int64 a2,
@@ -259,7 +274,9 @@ 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 LogBuilding 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);
@@ -320,6 +337,11 @@ DWORD WINAPI Main(LPVOID)
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DE5998), (PVOID)SpecialEventScript_ActivatePhaseHook, (PVOID*)&SpecialEventScript_ActivatePhaseOriginal); // 7FF7E5565998
}
if (Fortnite_Version == 6.21)
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x191D2E0), (PVOID)CanCreateInCurrentContextHook, (PVOID*)&CanCreateInCurrentContextOriginal);
else if (Fortnite_Version == 10.40)
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x22A30C0), (PVOID)CanCreateInCurrentContextHook, (PVOID*)&CanCreateInCurrentContextOriginal);
if (bUseSwitchLevel)
{
static auto SwitchLevel = FindObject<UFunction>(L"/Script/Engine.PlayerController.SwitchLevel");
@@ -535,6 +557,9 @@ DWORD WINAPI Main(LPVOID)
Hooking::MinHook::Hook(FortWeaponDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortWeapon.ServerReleaseWeaponAbility"),
AFortWeapon::ServerReleaseWeaponAbilityHook, (PVOID*)&AFortWeapon::ServerReleaseWeaponAbilityOriginal, false, true);
Hooking::MinHook::Hook(FindObject<UKismetSystemLibrary>("/Script/Engine.Default__KismetSystemLibrary"), FindObject<UFunction>(L"/Script/Engine.KismetSystemLibrary.PrintString"),
UKismetSystemLibrary::PrintStringHook, (PVOID*)&UKismetSystemLibrary::PrintStringOriginal, false, true);
Hooking::MinHook::Hook((PVOID)Addresses::GetSquadIdForCurrentPlayer, (PVOID)AFortGameSessionDedicatedAthena::GetSquadIdForCurrentPlayerHook);
auto OnPlayImpactFXStringRef = Memcury::Scanner::FindStringRef(L"OnPlayImpactFX", true, 0);
@@ -755,6 +780,9 @@ DWORD WINAPI Main(LPVOID)
Hooking::MinHook::Hook(InventoryManagementLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.InventoryManagementLibrary.SwapItems"),
UInventoryManagementLibrary::SwapItemsHook, (PVOID*)&UInventoryManagementLibrary::SwapItemsOriginal, false, true);
Hooking::MinHook::Hook(FindObject<AAthenaDeimosRift>(L"/Script/FortniteGame.Default__AthenaDeimosRift"), FindObject<UFunction>(L"/Script/FortniteGame.AthenaDeimosRift.QueueActorsToSpawn"),
AAthenaDeimosRift::QueueActorsToSpawnHook, (PVOID*)&AAthenaDeimosRift::QueueActorsToSpawnOriginal, false, true);
Hooking::MinHook::Hook(FindObject(L"/Script/FortniteGame.Default__FortAthenaVehicleSpawner"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaVehicleSpawner.SpawnVehicle"),
AFortAthenaVehicleSpawner::SpawnVehicleHook, nullptr, false);

View File

@@ -1221,17 +1221,37 @@ static inline uint64 FindTickFlush()
static inline uint64 FindAddNavigationSystemToWorld()
{
return Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 33 ED 41", false).Get();
uint64 addr = 0;
if (Engine_Version == 421)
addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 83 B9 ? ? ? ? ? 41 0F B6 F1 0F B6 FA 48", false).Get();
if (Engine_Version == 423)
addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 33 ED 41", false).Get();
return addr;
}
static inline uint64 FindNavSystemCleanUp()
{
auto Addr = Memcury::Scanner::FindStringRef(L"UNavigationSystemV1::CleanUp", false);
auto Addrr = Memcury::Scanner::FindStringRef(L"UNavigationSystemV1::CleanUp", false).Get();
if (!Addr.Get())
if (!Addrr)
return 0;
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 500, 0, true);
for (int i = 0; i < 500; i++)
{
if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0x48 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x89 && *(uint8_t*)(uint8_t*)(Addrr - i + 2) == 0x5C)
{
return Addrr - i;
}
if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0x40 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x53)
{
return Addrr - i;
}
}
return 0;
}
static inline uint64 FindLoadPlayset(const std::vector<uint8_t>& Bytes = std::vector<uint8_t>({ 0x48, 0x89, 0x5C }), int recursive = 0)

View File

@@ -69,6 +69,7 @@ extern inline bool bEnableBotTick = false;
extern inline bool bEnableCombinePickup = false;
extern inline int AmountOfBotsToSpawn = 0;
extern inline bool bEnableRebooting = false;
extern inline bool bEngineDebugLogs = false;
// THE BASE CODE IS FROM IMGUI GITHUB
@@ -515,6 +516,22 @@ 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");
Mission->Get<bool>(bCalendarAllowsSpawningOffset) = true;
}
}
if (!bIsInAutoRestart && (Engine_Version < 424 && ImGui::Button("Restart")))
{
if (Engine_Version < 424)
@@ -983,6 +1000,7 @@ static inline void MainUI()
{
ImGui::Checkbox("Looting Debug Log", &bDebugPrintLooting);
ImGui::Checkbox("Swapping Debug Log", &bDebugPrintSwapping);
ImGui::Checkbox("Engine Debug Log", &bEngineDebugLogs);
}
else if (Tab == SETTINGS_TAB)
{