mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
aa
This commit is contained in:
@@ -7,8 +7,8 @@ struct PadHex18 { char Pad[0x18]; };
|
||||
struct PadHexA8 { char Pad[0xA8]; };
|
||||
struct PadHexB0 { char Pad[0xB0]; };
|
||||
|
||||
using FPredictionKey = PadHex18; // PadHex18;
|
||||
using FGameplayEventData = PadHexA8; // PadHexB0;
|
||||
using FPredictionKey = PadHex18;
|
||||
using FGameplayEventData = PadHexB0;
|
||||
|
||||
class UAbilitySystemComponent : public UObject
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "FortPickup.h"
|
||||
#include "FortLootPackage.h"
|
||||
#include "BuildingContainer.h"
|
||||
#include "events.h"
|
||||
|
||||
static bool bFirstPlayerJoined = false;
|
||||
|
||||
@@ -31,10 +32,16 @@ enum class EDynamicFoundationType : uint8_t
|
||||
EDynamicFoundationType_MAX = 4
|
||||
};
|
||||
|
||||
void ShowFoundation(AActor* BuildingFoundation)
|
||||
void ShowFoundation(UObject* BuildingFoundation)
|
||||
{
|
||||
if (!BuildingFoundation)
|
||||
return;
|
||||
|
||||
SetBitfield(BuildingFoundation->GetPtr<PlaceholderBitfield>("bServerStreamedInLevel"), 2, true);
|
||||
|
||||
static auto DynamicFoundationTypeOffset = BuildingFoundation->GetOffset("DynamicFoundationType");
|
||||
BuildingFoundation->Get<uint8_t>(DynamicFoundationTypeOffset) = true ? 0 : 3;
|
||||
|
||||
static auto OnRep_ServerStreamedInLevelFn = FindObject<UFunction>("/Script/FortniteGame.BuildingFoundation.OnRep_ServerStreamedInLevel");
|
||||
BuildingFoundation->ProcessEvent(OnRep_ServerStreamedInLevelFn);
|
||||
|
||||
@@ -52,8 +59,10 @@ void ShowFoundation(AActor* BuildingFoundation)
|
||||
BuildingFoundation->ProcessEvent(OnRep_DynamicFoundationRepDataFn);
|
||||
}
|
||||
|
||||
static auto FoundationEnabledStateOffset = BuildingFoundation->GetOffset("FoundationEnabledState");
|
||||
BuildingFoundation->Get<EDynamicFoundationEnabledState>(FoundationEnabledStateOffset) = EDynamicFoundationEnabledState::Enabled;
|
||||
static auto FoundationEnabledStateOffset = BuildingFoundation->GetOffset("FoundationEnabledState", false);
|
||||
|
||||
if (FoundationEnabledStateOffset != 0)
|
||||
BuildingFoundation->Get<EDynamicFoundationEnabledState>(FoundationEnabledStateOffset) = EDynamicFoundationEnabledState::Enabled;
|
||||
}
|
||||
|
||||
static void StreamLevel(std::string LevelName, FVector Location = {})
|
||||
@@ -91,6 +100,12 @@ UObject* GetPlaylistToUse()
|
||||
if (Globals::bCreative)
|
||||
Playlist = FindObject("/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2");
|
||||
|
||||
if (Globals::bGoingToPlayEvent)
|
||||
{
|
||||
if (Fortnite_Version != 12.61)
|
||||
Playlist = GetEventPlaylist();
|
||||
}
|
||||
|
||||
return Playlist;
|
||||
}
|
||||
|
||||
@@ -137,6 +152,136 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
|
||||
GameMode->Get<int>("WarmupRequiredPlayerCount") = 1;
|
||||
|
||||
SetPlaylist(GetPlaylistToUse());
|
||||
|
||||
auto Fortnite_Season = std::floor(Fortnite_Version);
|
||||
|
||||
if (Fortnite_Season == 6)
|
||||
{
|
||||
if (Fortnite_Version != 6.10)
|
||||
{
|
||||
auto Lake = FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Lake1"));
|
||||
auto Lake2 = FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Lake2");
|
||||
|
||||
Fortnite_Version <= 6.21 ? ShowFoundation(Lake) : ShowFoundation(Lake2);
|
||||
// ^ This shows the lake after or before the event i dont know if this is needed.
|
||||
}
|
||||
else
|
||||
{
|
||||
auto Lake = FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest12"));
|
||||
ShowFoundation(Lake);
|
||||
}
|
||||
|
||||
auto FloatingIsland = Fortnite_Version == 6.10 ? FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest13")) :
|
||||
FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_FloatingIsland"));
|
||||
|
||||
ShowFoundation(FloatingIsland);
|
||||
}
|
||||
|
||||
if (Fortnite_Season >= 7 && Fortnite_Season <= 10)
|
||||
{
|
||||
if (Fortnite_Season == 7)
|
||||
{
|
||||
if (Fortnite_Version == 7.30)
|
||||
{
|
||||
auto PleasantParkIdk = FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.PleasentParkFestivus"));
|
||||
ShowFoundation(PleasantParkIdk);
|
||||
|
||||
auto PleasantParkGround = FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.PleasentParkDefault");
|
||||
ShowFoundation(PleasantParkGround);
|
||||
}
|
||||
|
||||
auto PolarPeak = FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_POI_25x36"));
|
||||
ShowFoundation(PolarPeak);
|
||||
|
||||
auto tiltedtower = FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.ShopsNew");
|
||||
ShowFoundation(tiltedtower); // 7.40 specific?
|
||||
}
|
||||
|
||||
else if (Fortnite_Season == 8)
|
||||
{
|
||||
auto Volcano = FindObject(("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_POI_50x53_Volcano"));
|
||||
ShowFoundation(Volcano);
|
||||
}
|
||||
|
||||
else if (Fortnite_Season == 10)
|
||||
{
|
||||
if (Fortnite_Version >= 10.20)
|
||||
{
|
||||
auto Island = FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.LF_Athena_StreamingTest16");
|
||||
ShowFoundation(Island);
|
||||
}
|
||||
}
|
||||
|
||||
auto TheBlock = FindObject("/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank
|
||||
ShowFoundation(TheBlock);
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 17.50f) {
|
||||
auto FarmAfter = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.farmbase_2"));
|
||||
ShowFoundation(FarmAfter);
|
||||
|
||||
auto FarmPhase = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.Farm_Phase_03")); // Farm Phases (Farm_Phase_01, Farm_Phase_02 and Farm_Phase_03)
|
||||
ShowFoundation(FarmPhase);
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 17.40f) {
|
||||
auto AbductedCoral = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.CoralPhase_02")); // Coral Castle Phases (CoralPhase_01, CoralPhase_02 and CoralPhase_03)
|
||||
ShowFoundation(AbductedCoral);
|
||||
|
||||
auto CoralFoundation_01 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.LF_Athena_16x16_Foundation_0"));
|
||||
ShowFoundation(CoralFoundation_01);
|
||||
|
||||
auto CoralFoundation_05 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.LF_Athena_16x16_Foundation6"));
|
||||
ShowFoundation(CoralFoundation_05);
|
||||
|
||||
auto CoralFoundation_07 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.LF_Athena_16x16_Foundation3"));
|
||||
ShowFoundation(CoralFoundation_07);
|
||||
|
||||
auto CoralFoundation_10 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.LF_Athena_16x16_Foundation2_1"));
|
||||
ShowFoundation(CoralFoundation_10);
|
||||
|
||||
auto CoralFoundation_13 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.LF_Athena_16x16_Foundation4"));
|
||||
ShowFoundation(CoralFoundation_13);
|
||||
|
||||
auto CoralFoundation_17 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.LF_Athena_16x16_Foundation5"));
|
||||
ShowFoundation(CoralFoundation_17);
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 17.30f) {
|
||||
auto AbductedSlurpy = FindObject(("LF_Athena_POI_50x50_C /Game/Athena/Apollo/Maps/Apollo_Mother.Apollo_Mother.PersistentLevel.Slurpy_Phase03")); // Slurpy Swamp Phases (Slurpy_Phase01, Slurpy_Phase02 and Slurpy_Phase03)
|
||||
ShowFoundation(AbductedSlurpy);
|
||||
}
|
||||
|
||||
if (Fortnite_Season == 13)
|
||||
{
|
||||
auto SpawnIsland = FindObject("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.Lobby_Foundation");
|
||||
ShowFoundation(SpawnIsland);
|
||||
|
||||
// SpawnIsland->RepData->Soemthing = FoundationSetup->LobbyLocation;
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 12.41)
|
||||
{
|
||||
auto JS03 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.LF_Athena_POI_19x19_2"));
|
||||
ShowFoundation(JS03);
|
||||
|
||||
auto JH00 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.BP_Jerky_Head6_18"));
|
||||
ShowFoundation(JH00);
|
||||
|
||||
auto JH01 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.BP_Jerky_Head5_14"));
|
||||
ShowFoundation(JH01);
|
||||
|
||||
auto JH02 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.BP_Jerky_Head3_8"));
|
||||
ShowFoundation(JH02);
|
||||
|
||||
auto JH03 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.BP_Jerky_Head_2"));
|
||||
ShowFoundation(JH03);
|
||||
|
||||
auto JH04 = FindObject(("/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.BP_Jerky_Head4_11"));
|
||||
ShowFoundation(JH04);
|
||||
}
|
||||
|
||||
auto PlaylistToUse = GetPlaylistToUse();
|
||||
|
||||
if (PlaylistToUse)
|
||||
@@ -153,6 +298,35 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
}
|
||||
}
|
||||
|
||||
static int LastNum6 = 1;
|
||||
|
||||
if (AmountOfRestarts != LastNum6)
|
||||
{
|
||||
LastNum6 = AmountOfRestarts;
|
||||
|
||||
if (Globals::bGoingToPlayEvent && DoesEventRequireLoading())
|
||||
{
|
||||
bool bb;
|
||||
LoadEvent(&bb);
|
||||
|
||||
if (!bb)
|
||||
LastNum6 = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int LastNum5 = 1;
|
||||
|
||||
if (AmountOfRestarts != LastNum5 && LastNum6 == AmountOfRestarts)
|
||||
{
|
||||
LastNum5 = AmountOfRestarts;
|
||||
|
||||
bool bb;
|
||||
CallOnReadys(&bb);
|
||||
|
||||
if (!bb)
|
||||
LastNum5 = -1;
|
||||
}
|
||||
|
||||
/* static auto FortPlayerStartWarmupClass = FindObject<UClass>("/Script/FortniteGame.FortPlayerStartWarmup");
|
||||
TArray<AActor*> Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortPlayerStartWarmupClass);
|
||||
|
||||
@@ -163,17 +337,6 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
if (ActorsNum == 0)
|
||||
return false; */
|
||||
|
||||
/* static int LastNum4 = 1;
|
||||
|
||||
if (AmountOfRestarts != LastNum4)
|
||||
{
|
||||
LastNum4 = AmountOfRestarts;
|
||||
|
||||
auto Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo");
|
||||
SetPlaylist(Playlist);
|
||||
LOG_INFO(LogLoading, "Set playlist!");
|
||||
} */
|
||||
|
||||
static auto MapInfoOffset = GameState->GetOffset("MapInfo");
|
||||
auto MapInfo = GameState->Get(MapInfoOffset);
|
||||
|
||||
@@ -182,9 +345,6 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
|
||||
static auto FlightInfosOffset = MapInfo->GetOffset("FlightInfos");
|
||||
|
||||
// if (MapInfo->Get<TArray<__int64>>(FlightInfosOffset).ArrayNum <= 0)
|
||||
// return false;
|
||||
|
||||
static int LastNum3 = 1;
|
||||
|
||||
if (AmountOfRestarts != LastNum3)
|
||||
@@ -220,22 +380,24 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
GameState->OnRep_GamePhase();
|
||||
}
|
||||
|
||||
SetPlaylist(GetPlaylistToUse());
|
||||
|
||||
GameState->Get<float>("WarmupCountdownEndTime") = TimeSeconds + Duration;
|
||||
GameMode->Get<float>("WarmupCountdownDuration") = Duration;
|
||||
|
||||
GameState->Get<float>("WarmupCountdownStartTime") = TimeSeconds;
|
||||
GameMode->Get<float>("WarmupEarlyCountdownDuration") = EarlyDuration;
|
||||
|
||||
GameState->OnRep_CurrentPlaylistInfo();
|
||||
|
||||
LOG_INFO(LogDev, "Initialized!");
|
||||
}
|
||||
|
||||
if (Engine_Version >= 424) // returning true is stripped on c2+
|
||||
{
|
||||
// if (GameState->GetPlayersLeft() >= GameMode->Get<int>("WarmupRequiredPlayerCount"))
|
||||
if (MapInfo->Get<TArray<__int64>>(FlightInfosOffset).ArrayNum <= 0)
|
||||
return true;
|
||||
if (GameState->GetPlayersLeft() >= GameMode->Get<int>("WarmupRequiredPlayerCount"))
|
||||
{
|
||||
if (MapInfo->Get<TArray<__int64>>(FlightInfosOffset).ArrayNum <= 0)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return Athena_ReadyToStartMatchOriginal(GameMode);
|
||||
@@ -261,6 +423,9 @@ enum class EFortCustomPartType : uint8_t // todo move
|
||||
|
||||
void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena* GameMode, AActor* NewPlayerActor)
|
||||
{
|
||||
if (!NewPlayerActor)
|
||||
return;
|
||||
|
||||
auto SpawnIsland_FloorLoot = FindObject<UClass>("/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_Warmup.Tiered_Athena_FloorLoot_Warmup_C");
|
||||
auto BRIsland_FloorLoot = FindObject<UClass>("/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_01.Tiered_Athena_FloorLoot_01_C");
|
||||
|
||||
@@ -343,11 +508,11 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
static UFortItemDefinition* WoodItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/WoodItemData.WoodItemData");
|
||||
|
||||
WorldInventory->AddItem(EditToolItemDefinition, nullptr);
|
||||
WorldInventory->AddItem(PickaxeDefinition, nullptr);
|
||||
WorldInventory->AddItem(BuildingItemData_Wall, nullptr);
|
||||
WorldInventory->AddItem(BuildingItemData_Floor, nullptr);
|
||||
WorldInventory->AddItem(BuildingItemData_Stair_W, nullptr);
|
||||
WorldInventory->AddItem(BuildingItemData_RoofS, nullptr);
|
||||
WorldInventory->AddItem(PickaxeDefinition, nullptr);
|
||||
WorldInventory->AddItem(WoodItemData, nullptr, 100);
|
||||
|
||||
WorldInventory->Update(true);
|
||||
@@ -392,7 +557,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
PlayerStateAthena->ProcessEvent(OnRep_bHasStartedPlayingFn);
|
||||
}
|
||||
|
||||
if (false)
|
||||
// if (false)
|
||||
{
|
||||
static auto GameplayAbilitySet = LoadObject<UObject>(L"/Game/Abilities/Player/Generic/Traits/DefaultPlayer/GAS_AthenaPlayer.GAS_AthenaPlayer") ?
|
||||
LoadObject<UObject>(L"/Game/Abilities/Player/Generic/Traits/DefaultPlayer/GAS_AthenaPlayer.GAS_AthenaPlayer") :
|
||||
@@ -471,7 +636,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
GameMemberInfo->MemberUniqueId = PlayerStateAthena->Get<FUniqueNetIdRepl>("UniqueId");
|
||||
}
|
||||
|
||||
static auto GameMemberInfoArray_MembersOffset = 0x0108;
|
||||
static auto GameMemberInfoArray_MembersOffset = FindOffsetStruct("/Script/FortniteGame.GameMemberInfoArray", "Members");
|
||||
|
||||
auto GameMemberInfoArray = GameState->GetPtr<FFastArraySerializer>(GameMemberInfoArrayOffset);
|
||||
|
||||
@@ -479,5 +644,5 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
GameMemberInfoArray->MarkArrayDirty();
|
||||
}
|
||||
|
||||
return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayer);
|
||||
return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayerActor);
|
||||
}
|
||||
13
Project Reboot 3.0/FortPlayerControllerAthena.cpp
Normal file
13
Project Reboot 3.0/FortPlayerControllerAthena.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "FortPlayerControllerAthena.h"
|
||||
|
||||
void AFortPlayerControllerAthena::GetPlayerViewPointHook(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation)
|
||||
{
|
||||
if (auto MyFortPawn = PlayerController->GetMyFortPawn())
|
||||
{
|
||||
Location = MyFortPawn->GetActorLocation();
|
||||
Rotation = PlayerController->GetControlRotation();
|
||||
return;
|
||||
}
|
||||
|
||||
return AFortPlayerControllerAthena::GetPlayerViewPointOriginal(PlayerController, Location, Rotation);
|
||||
}
|
||||
@@ -6,14 +6,18 @@
|
||||
class AFortPlayerControllerAthena : public AFortPlayerController
|
||||
{
|
||||
public:
|
||||
static inline void (*GetPlayerViewPointOriginal)(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation);
|
||||
|
||||
AFortPlayerStateAthena* GetPlayerStateAthena()
|
||||
{
|
||||
return (AFortPlayerStateAthena*)GetPlayerState();
|
||||
}
|
||||
|
||||
static void ServerAcknowledgePossessionHook(APlayerController* Controller, APawn* Pawn)
|
||||
{
|
||||
static auto AcknowledgedPawnOffset = Controller->GetOffset("AcknowledgedPawn");
|
||||
Controller->Get<APawn*>(AcknowledgedPawnOffset) = Pawn;
|
||||
}
|
||||
|
||||
AFortPlayerStateAthena* GetPlayerStateAthena()
|
||||
{
|
||||
return (AFortPlayerStateAthena*)GetPlayerState();
|
||||
}
|
||||
static void GetPlayerViewPointHook(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation);
|
||||
};
|
||||
84
Project Reboot 3.0/FortPlayerPawn.cpp
Normal file
84
Project Reboot 3.0/FortPlayerPawn.cpp
Normal file
@@ -0,0 +1,84 @@
|
||||
#include "FortPlayerPawn.h"
|
||||
#include <memcury.h>
|
||||
|
||||
void AFortPlayerPawn::ServerSendZiplineStateHook(AFortPlayerPawn* Pawn, FZiplinePawnState InZiplineState)
|
||||
{
|
||||
static auto ZiplineStateOffset = Pawn->GetOffset("ZiplineState");
|
||||
|
||||
auto PawnZiplineState = Pawn->GetPtr<__int64>(ZiplineStateOffset);
|
||||
|
||||
static auto AuthoritativeValueOffset = FindOffsetStruct("/Script/FortniteGame.ZiplinePawnState", "AuthoritativeValue");
|
||||
|
||||
if (*(int*)(__int64(&InZiplineState) + AuthoritativeValueOffset) > *(int*)(__int64(PawnZiplineState) + AuthoritativeValueOffset))
|
||||
{
|
||||
static auto ZiplinePawnStateClass = FindObject<UStruct>("/Script/FortniteGame.ZiplinePawnState");
|
||||
static auto ZiplinePawnStateSize = ZiplinePawnStateClass->GetPropertiesSize();
|
||||
|
||||
CopyStruct(PawnZiplineState, &InZiplineState, ZiplinePawnStateSize);
|
||||
}
|
||||
|
||||
static bool bFoundFunc = false;
|
||||
|
||||
static void (*OnRep_ZiplineState)(AFortPlayerPawn* Pawn);
|
||||
|
||||
if (!bFoundFunc)
|
||||
{
|
||||
bFoundFunc = true;
|
||||
|
||||
static auto Addrr = Memcury::Scanner::FindStringRef(L"ZIPLINES!! Role(%s) AFortPlayerPawn::OnRep_ZiplineState ZiplineState.bIsZiplining=%d").Get();
|
||||
|
||||
std::cout << "Addrr: " << Addrr << '\n';
|
||||
|
||||
if (Addrr)
|
||||
{
|
||||
for (int i = 600; i >= 0; i--)
|
||||
{
|
||||
// LOG("[{}] 0x{:x} 0x{:x}", i, (int)*(uint8_t*)Addr - i, (int)*(uint8_t*)(Addr - i), (int)*(uint8_t*)(Addr - i + 1));
|
||||
|
||||
if (*(uint8_t*)(uint8_t*)(Addrr - i) == 0x40 && *(uint8_t*)(uint8_t*)(Addrr - i + 1) == 0x53)
|
||||
{
|
||||
OnRep_ZiplineState = decltype(OnRep_ZiplineState)(Addrr - i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// LOG_INFO(LogDev, "OnRep_ZiplineState: 0x{:x}\n", (uintptr_t)OnRep_ZiplineState - __int64(GetModuleHandleW(0)));
|
||||
}
|
||||
|
||||
if (OnRep_ZiplineState)
|
||||
OnRep_ZiplineState(Pawn);
|
||||
}
|
||||
|
||||
void AFortPlayerPawn::ServerHandlePickupHook(AFortPlayerPawn* Pawn, AFortPickup* Pickup, float InFlyTime, FVector InStartDirection, bool bPlayPickupSound)
|
||||
{
|
||||
static auto bPickedUpOffset = Pickup->GetOffset("bPickedUp");
|
||||
|
||||
if (Pickup && !Pickup->Get<bool>(bPickedUpOffset))
|
||||
{
|
||||
static auto IncomingPickupsOffset = Pawn->GetOffset("IncomingPickups");
|
||||
static auto PickupLocationDataOffset = Pickup->GetOffset("PickupLocationData");
|
||||
auto PickupLocationData = Pickup->GetPtr<__int64>(PickupLocationDataOffset);
|
||||
|
||||
Pawn->Get<TArray<AFortPickup*>>(IncomingPickupsOffset).Add(Pickup);
|
||||
|
||||
static auto PickupTargetOffset = FindOffsetStruct("/Script/FortniteGame.FortPickupLocationData", "PickupTarget");
|
||||
static auto FlyTimeOffset = FindOffsetStruct("/Script/FortniteGame.FortPickupLocationData", "FlyTime");
|
||||
static auto ItemOwnerOffset = FindOffsetStruct("/Script/FortniteGame.FortPickupLocationData", "ItemOwner");
|
||||
static auto StartDirectionOffset = FindOffsetStruct("/Script/FortniteGame.FortPickupLocationData", "StartDirection");
|
||||
static auto PickupGuidOffset = FindOffsetStruct("/Script/FortniteGame.FortPickupLocationData", "PickupGuid");
|
||||
|
||||
*(AFortPawn**)(__int64(PickupLocationData) + PickupTargetOffset) = Pawn;
|
||||
*(float*)(__int64(PickupLocationData) + FlyTimeOffset) = 0.40;
|
||||
*(AFortPawn**)(__int64(PickupLocationData) + ItemOwnerOffset) = Pawn;
|
||||
*(FVector*)(__int64(PickupLocationData) + StartDirectionOffset) = InStartDirection;
|
||||
*(FGuid*)(__int64(PickupLocationData) + PickupGuidOffset) = Pawn->GetCurrentWeapon() ? Pawn->GetCurrentWeapon()->GetItemEntryGuid() : FGuid();
|
||||
|
||||
static auto OnRep_PickupLocationDataFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPickup.OnRep_PickupLocationData");
|
||||
Pickup->ProcessEvent(OnRep_PickupLocationDataFn);
|
||||
|
||||
Pickup->Get<bool>(bPickedUpOffset) = true;
|
||||
|
||||
static auto OnRep_bPickedUpFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPickup.OnRep_bPickedUp");
|
||||
Pickup->ProcessEvent(OnRep_bPickedUpFn);
|
||||
}
|
||||
}
|
||||
15
Project Reboot 3.0/FortPlayerPawn.h
Normal file
15
Project Reboot 3.0/FortPlayerPawn.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "FortPawn.h"
|
||||
#include "FortPickup.h"
|
||||
|
||||
struct PadHex100 { char pad[0x100]; };
|
||||
|
||||
using FZiplinePawnState = PadHex100;
|
||||
|
||||
class AFortPlayerPawn : public AFortPawn
|
||||
{
|
||||
public:
|
||||
static void ServerSendZiplineStateHook(AFortPlayerPawn* Pawn, FZiplinePawnState InZiplineState);
|
||||
static void ServerHandlePickupHook(AFortPlayerPawn* Pawn, AFortPickup* Pickup, float InFlyTime, FVector InStartDirection, bool bPlayPickupSound);
|
||||
};
|
||||
@@ -12,5 +12,11 @@ public:
|
||||
return Get<T*>(WeaponDataOffset);
|
||||
}
|
||||
|
||||
FGuid& GetItemEntryGuid()
|
||||
{
|
||||
static auto ItemEntryGuidOffset = GetOffset("ItemEntryGuid");
|
||||
return Get<FGuid>(ItemEntryGuidOffset);
|
||||
}
|
||||
|
||||
static UClass* StaticClass();
|
||||
};
|
||||
@@ -110,8 +110,8 @@ struct FFastArraySerializer
|
||||
|
||||
void MarkArrayDirty()
|
||||
{
|
||||
((FFastArraySerializer2*)this)->MarkArrayDirty();
|
||||
return;
|
||||
// ((FFastArraySerializer2*)this)->MarkArrayDirty();
|
||||
// return;
|
||||
|
||||
// ItemMap.Reset(); // This allows to clients to add predictive elements to arrays without affecting replication.
|
||||
GetArrayReplicationKey()++;
|
||||
|
||||
@@ -2,20 +2,28 @@
|
||||
|
||||
#include "reboot.h"
|
||||
|
||||
FRotator APlayerController::GetControlRotation()
|
||||
{
|
||||
static auto fn = FindObject<UFunction>(L"/Script/Engine.Controller.GetControlRotation");
|
||||
FRotator rot;
|
||||
this->ProcessEvent(fn, &rot);
|
||||
return rot;
|
||||
}
|
||||
|
||||
void APlayerController::Possess(class APawn* Pawn)
|
||||
{
|
||||
static auto fn = FindObject<UFunction>("/Script/Engine.Controller.Possess");
|
||||
static auto fn = FindObject<UFunction>(L"/Script/Engine.Controller.Possess");
|
||||
this->ProcessEvent(fn, &Pawn);
|
||||
}
|
||||
|
||||
void APlayerController::ServerRestartPlayer()
|
||||
{
|
||||
static auto fn = FindObject<UFunction>("/Script/Engine.PlayerController.ServerRestartPlayer");
|
||||
static auto fn = FindObject<UFunction>(L"/Script/Engine.PlayerController.ServerRestartPlayer");
|
||||
this->ProcessEvent(fn);
|
||||
}
|
||||
|
||||
UClass* APlayerController::StaticClass()
|
||||
{
|
||||
static auto Class = FindObject<UClass>("/Script/Engine.PlayerController");
|
||||
static auto Class = FindObject<UClass>(L"/Script/Engine.PlayerController");
|
||||
return Class;
|
||||
}
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "Class.h"
|
||||
#include "Actor.h"
|
||||
|
||||
#include "Rotator.h"
|
||||
|
||||
class APlayerController : public AActor
|
||||
{
|
||||
public:
|
||||
@@ -30,6 +32,7 @@ public:
|
||||
return this->Get<class APawn*>(PawnOffset);
|
||||
}
|
||||
|
||||
FRotator GetControlRotation();
|
||||
void Possess(class APawn* Pawn);
|
||||
void ServerRestartPlayer();
|
||||
|
||||
|
||||
@@ -174,6 +174,7 @@
|
||||
<ClCompile Include="Class.cpp" />
|
||||
<ClCompile Include="DataTableFunctionLibrary.cpp" />
|
||||
<ClCompile Include="dllmain.cpp" />
|
||||
<ClCompile Include="events.cpp" />
|
||||
<ClCompile Include="FortGameModeAthena.cpp" />
|
||||
<ClCompile Include="FortGameModeZone.cpp" />
|
||||
<ClCompile Include="FortGameStateAthena.cpp" />
|
||||
@@ -186,6 +187,8 @@
|
||||
<ClCompile Include="FortPawn.cpp" />
|
||||
<ClCompile Include="FortPickup.cpp" />
|
||||
<ClCompile Include="FortPlayerController.cpp" />
|
||||
<ClCompile Include="FortPlayerControllerAthena.cpp" />
|
||||
<ClCompile Include="FortPlayerPawn.cpp" />
|
||||
<ClCompile Include="FortWeapon.cpp" />
|
||||
<ClCompile Include="GameModeBase.cpp" />
|
||||
<ClCompile Include="GameplayStatics.cpp" />
|
||||
@@ -211,6 +214,7 @@
|
||||
<ClInclude Include="BuildingActor.h" />
|
||||
<ClInclude Include="BuildingContainer.h" />
|
||||
<ClInclude Include="BuildingSMActor.h" />
|
||||
<ClInclude Include="calendar.h" />
|
||||
<ClInclude Include="Class.h" />
|
||||
<ClInclude Include="ContainerAllocationPolicies.h" />
|
||||
<ClInclude Include="Controller.h" />
|
||||
@@ -219,6 +223,7 @@
|
||||
<ClInclude Include="DataTableFunctionLibrary.h" />
|
||||
<ClInclude Include="Engine.h" />
|
||||
<ClInclude Include="EngineTypes.h" />
|
||||
<ClInclude Include="events.h" />
|
||||
<ClInclude Include="finder.h" />
|
||||
<ClInclude Include="FortGameMode.h" />
|
||||
<ClInclude Include="FortGameModeAthena.h" />
|
||||
@@ -233,6 +238,7 @@
|
||||
<ClInclude Include="FortPickup.h" />
|
||||
<ClInclude Include="FortPlayerController.h" />
|
||||
<ClInclude Include="FortPlayerControllerAthena.h" />
|
||||
<ClInclude Include="FortPlayerPawn.h" />
|
||||
<ClInclude Include="FortPlayerState.h" />
|
||||
<ClInclude Include="FortPlayerStateAthena.h" />
|
||||
<ClInclude Include="FortResourceItemDefinition.h" />
|
||||
|
||||
@@ -19,9 +19,6 @@
|
||||
<ClCompile Include="FortGameModeZone.cpp">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Private</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="addresses.cpp">
|
||||
<Filter>Reboot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Object.cpp">
|
||||
<Filter>Engine\Source\Runtime\CoreUObject\Private</Filter>
|
||||
</ClCompile>
|
||||
@@ -107,6 +104,18 @@
|
||||
<ClCompile Include="FortPickup.cpp">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Private\Items</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="FortPlayerPawn.cpp">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Private\Pawns</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="events.cpp">
|
||||
<Filter>Reboot\Private\Gameplay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="addresses.cpp">
|
||||
<Filter>Reboot\Private\Gameplay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="FortPlayerControllerAthena.cpp">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Private\Player</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="log.h" />
|
||||
@@ -121,9 +130,6 @@
|
||||
<ClInclude Include="NameTypes.h">
|
||||
<Filter>Engine\Source\Runtime\Core\Public\UObject</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="reboot.h">
|
||||
<Filter>Reboot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Class.h">
|
||||
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
|
||||
</ClInclude>
|
||||
@@ -175,9 +181,6 @@
|
||||
<ClInclude Include="FortGameModePvPBase.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="addresses.h">
|
||||
<Filter>Reboot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Transform.h">
|
||||
<Filter>Engine\Source\Runtime\Core\Public\Math</Filter>
|
||||
</ClInclude>
|
||||
@@ -341,6 +344,21 @@
|
||||
<ClInclude Include="BuildingContainer.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public\Building</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FortPlayerPawn.h">
|
||||
<Filter>FortniteGame\Source\FortniteGame\Public\Pawns</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="calendar.h">
|
||||
<Filter>Reboot\Public\Gameplay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="addresses.h">
|
||||
<Filter>Reboot\Public</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="reboot.h">
|
||||
<Filter>Reboot\Public</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="events.h">
|
||||
<Filter>Reboot\Public</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Engine">
|
||||
@@ -493,6 +511,18 @@
|
||||
<Filter Include="FortniteGame\Source\FortniteGame\Public\Weapons">
|
||||
<UniqueIdentifier>{bcb0d983-0b85-4ca6-9fac-6567c7d79921}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reboot\Private">
|
||||
<UniqueIdentifier>{563ca89b-be74-42a6-a995-f87ac7a532e4}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reboot\Public">
|
||||
<UniqueIdentifier>{ad1c6299-9a6d-4eba-a1f8-66642a8afd21}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reboot\Private\Gameplay">
|
||||
<UniqueIdentifier>{52d438db-beaf-44be-bddd-9aeb07c2459f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Reboot\Public\Gameplay">
|
||||
<UniqueIdentifier>{9923af6f-0a65-43f7-ad58-8a66e83814ba}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="UnrealEngine.cpp">
|
||||
|
||||
@@ -13,6 +13,8 @@ void UWorld::Listen()
|
||||
|
||||
constexpr bool bUseBeacons = true;
|
||||
|
||||
int Port = 7777;
|
||||
|
||||
if (bUseBeacons)
|
||||
{
|
||||
static auto BeaconClass = FindObject<UClass>(L"/Script/FortniteGame.FortOnlineBeaconHost");
|
||||
@@ -27,6 +29,8 @@ void UWorld::Listen()
|
||||
static bool (*InitHost)(UObject* Beacon) = decltype(InitHost)(Addresses::InitHost);
|
||||
static void (*PauseBeaconRequests)(UObject* Beacon, bool bPause) = decltype(PauseBeaconRequests)(Addresses::PauseBeaconRequests);
|
||||
|
||||
NewBeacon->Get<int>("ListenPort") = Engine_Version < 426 ? Port - 1 : Port;
|
||||
|
||||
InitHost(NewBeacon);
|
||||
PauseBeaconRequests(NewBeacon, false);
|
||||
|
||||
@@ -46,8 +50,6 @@ void UWorld::Listen()
|
||||
NewNetDriver->Get<FName>("NetDriverName") = GameNetDriverName;
|
||||
GetWorld()->Get("NetDriver") = NewNetDriver;
|
||||
|
||||
int Port = 7777;
|
||||
|
||||
FURL URL = FURL();
|
||||
URL.Port = Port - (Engine_Version >= 426);
|
||||
|
||||
|
||||
@@ -108,29 +108,82 @@ void Addresses::SetupVersion()
|
||||
|
||||
void Addresses::FindAll()
|
||||
{
|
||||
LOG_INFO(LogDev, "9241");
|
||||
Addresses::ProcessEvent = FindProcessEvent();
|
||||
LOG_INFO(LogDev, "151");
|
||||
|
||||
Addresses::StaticFindObject = FindStaticFindObject();
|
||||
LOG_INFO(LogDev, "2151");
|
||||
|
||||
Addresses::GetPlayerViewpoint = FindGetPlayerViewpoint();
|
||||
LOG_INFO(LogDev, "1246");
|
||||
|
||||
Addresses::CreateNetDriver = FindCreateNetDriver();
|
||||
LOG_INFO(LogDev, "2561");
|
||||
|
||||
Addresses::InitHost = FindInitHost();
|
||||
LOG_INFO(LogDev, "1341");
|
||||
|
||||
Addresses::PauseBeaconRequests = FindPauseBeaconRequests();
|
||||
LOG_INFO(LogDev, "1351");
|
||||
|
||||
Addresses::SpawnActor = FindSpawnActor();
|
||||
LOG_INFO(LogDev, "1`231");
|
||||
|
||||
Addresses::InitListen = FindInitListen();
|
||||
LOG_INFO(LogDev, "52175");
|
||||
|
||||
Addresses::SetWorld = FindSetWorld();
|
||||
LOG_INFO(LogDev, "5432");
|
||||
|
||||
Addresses::KickPlayer = FindKickPlayer();
|
||||
LOG_INFO(LogDev, "123");
|
||||
|
||||
Addresses::TickFlush = FindTickFlush();
|
||||
LOG_INFO(LogDev, "1123");
|
||||
|
||||
Addresses::GetNetMode = FindGetNetMode();
|
||||
LOG_INFO(LogDev, "113");
|
||||
|
||||
Addresses::Realloc = FindRealloc();
|
||||
LOG_INFO(LogDev, "1231");
|
||||
|
||||
Addresses::CollectGarbage = FindCollectGarbage();
|
||||
LOG_INFO(LogDev, "1123");
|
||||
|
||||
Addresses::NoMCP = FindNoMCP();
|
||||
LOG_INFO(LogDev, "131");
|
||||
|
||||
Addresses::PickTeam = FindPickTeam();
|
||||
LOG_INFO(LogDev, "132");
|
||||
|
||||
Addresses::InternalTryActivateAbility = FindInternalTryActivateAbility();
|
||||
LOG_INFO(LogDev, "17");
|
||||
|
||||
Addresses::GiveAbility = FindGiveAbility();
|
||||
LOG_INFO(LogDev, "156");
|
||||
|
||||
Addresses::CantBuild = FindCantBuild();
|
||||
LOG_INFO(LogDev, "16");
|
||||
|
||||
Addresses::ReplaceBuildingActor = FindReplaceBuildingActor();
|
||||
LOG_INFO(LogDev, "15");
|
||||
|
||||
Addresses::GiveAbilityAndActivateOnce = FindGiveAbilityAndActivateOnce();
|
||||
LOG_INFO(LogDev, "14");
|
||||
|
||||
Addresses::OnDamageServer = FindOnDamageServer();
|
||||
LOG_INFO(LogDev, "13");
|
||||
|
||||
Addresses::StaticLoadObject = FindStaticLoadObject();
|
||||
LOG_INFO(LogDev, "12");
|
||||
|
||||
Addresses::ActorGetNetMode = FindActorGetNetMode();
|
||||
LOG_INFO(LogDev, "11");
|
||||
|
||||
Addresses::ChangeGameSessionId = FindChangeGameSessionId();
|
||||
LOG_INFO(LogDev, "10");
|
||||
|
||||
}
|
||||
|
||||
void Addresses::Print()
|
||||
@@ -161,6 +214,8 @@ void Addresses::Print()
|
||||
LOG_INFO(LogDev, "GiveAbilityAndActivateOnce: 0x{:x}", GiveAbilityAndActivateOnce - Base);
|
||||
LOG_INFO(LogDev, "OnDamageServer: 0x{:x}", OnDamageServer - Base);
|
||||
LOG_INFO(LogDev, "StaticLoadObject: 0x{:x}", StaticLoadObject - Base);
|
||||
LOG_INFO(LogDev, "ActorGetNetMode: 0x{:x}", ActorGetNetMode - Base);
|
||||
LOG_INFO(LogDev, "ChangeGameSessionId: 0x{:x}", ChangeGameSessionId - Base);
|
||||
}
|
||||
|
||||
void Offsets::FindAll()
|
||||
@@ -217,7 +272,6 @@ void Addresses::Init()
|
||||
StaticFindObjectOriginal = decltype(StaticFindObjectOriginal)(StaticFindObject);
|
||||
UWorld::SpawnActorOriginal = decltype(UWorld::SpawnActorOriginal)(SpawnActor);
|
||||
UNetDriver::InitListenOriginal = decltype(UNetDriver::InitListenOriginal)(InitListen);
|
||||
UNetDriver::SetWorldOriginal = decltype(UNetDriver::SetWorldOriginal)(SetWorld);
|
||||
AGameSession::KickPlayerOriginal = decltype(AGameSession::KickPlayerOriginal)(KickPlayer);
|
||||
UNetDriver::TickFlushOriginal = decltype(UNetDriver::TickFlushOriginal)(TickFlush);
|
||||
FMemory::Realloc = decltype(FMemory::Realloc)(Realloc);
|
||||
@@ -226,6 +280,10 @@ void Addresses::Init()
|
||||
ABuildingActor::OnDamageServerOriginal = decltype(ABuildingActor::OnDamageServerOriginal)(OnDamageServer);
|
||||
StaticLoadObjectOriginal = decltype(StaticLoadObjectOriginal)(StaticLoadObject);
|
||||
|
||||
static auto DefaultNetDriver = FindObject("/Script/Engine.Default__NetDriver");
|
||||
Addresses::SetWorld = Engine_Version < 426 ? Addresses::SetWorld : __int64(DefaultNetDriver->VFTable[Addresses::SetWorld]);
|
||||
UNetDriver::SetWorldOriginal = decltype(UNetDriver::SetWorldOriginal)(SetWorld);
|
||||
|
||||
// if (Engine_Version >= 421) ChunkedObjects = decltype(ChunkedObjects)(ObjectArray);
|
||||
// else UnchunkedObjects = decltype(UnchunkedObjects)(ObjectArray);
|
||||
}
|
||||
@@ -244,5 +302,24 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 48 89 58 08 48 89 70 10 57 48 81 EC ? ? ? ? 48 8B BA ? ? ? ? 48 8B DA 0F 29").Get()); // Pawn Overlap
|
||||
}
|
||||
|
||||
if (Engine_Version == 422)
|
||||
{
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("40 55 56 41 54 48 8B EC 48 81 EC ? ? ? ? 48 8B 01 4C 8B E2 48 8B F1 FF 90").Get()); // chnaging cameasesion
|
||||
}
|
||||
|
||||
if (Engine_Version == 425)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("40 57 41 56 48 81 EC ? ? ? ? 80 3D ? ? ? ? ? 0F B6 FA 44 8B F1 74 3A 80 3D ? ? ? ? ? 0F 82").Get()); // collect garbage
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 55 48 8D 68 A1 48 81 EC ? ? ? ? 48 89 58 08 4C 89 60 F0 45 0F B6 E0 4C").Get()); // Changing Gamesession
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 55 48 8D 68 A1 48 81 EC ? ? ? ? 48 89 58 08 4C 89 60 F0 4C 8B E2 4C 89").Get()); // ^
|
||||
}
|
||||
|
||||
if (Fortnite_Version == 12.61)
|
||||
{
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 89 4C 24 ? 55 56 57 41 56 48 81 EC ? ? ? ? 4C 8B B1 ? ? ? ? 33 F6 4C 89 B4 24 ? ? ? ? 48 8B").Get()); // fritter crash
|
||||
}
|
||||
|
||||
toNull.push_back(Addresses::ChangeGameSessionId);
|
||||
|
||||
return toNull;
|
||||
}
|
||||
@@ -32,6 +32,10 @@ namespace Addresses
|
||||
extern inline uint64 ReplaceBuildingActor = 0;
|
||||
extern inline uint64 GiveAbilityAndActivateOnce = 0;
|
||||
extern inline uint64 OnDamageServer = 0;
|
||||
extern inline uint64 GIsServer = 0;
|
||||
extern inline uint64 GIsClient = 0;
|
||||
extern inline uint64 ActorGetNetMode = 0;
|
||||
extern inline uint64 ChangeGameSessionId = 0;
|
||||
|
||||
void SetupVersion(); // Finds Engine Version
|
||||
void FindAll();
|
||||
|
||||
6
Project Reboot 3.0/calendar.h
Normal file
6
Project Reboot 3.0/calendar.h
Normal file
@@ -0,0 +1,6 @@
|
||||
// To move, dont include this in any headers btw
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "reboot.h"
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
#include "GameSession.h"
|
||||
#include "FortPlayerControllerAthena.h"
|
||||
#include "AbilitySystemComponent.h"
|
||||
#include "FortPlayerPawn.h"
|
||||
|
||||
#include "Map.h"
|
||||
#include "events.h"
|
||||
|
||||
enum ENetMode
|
||||
{
|
||||
@@ -21,6 +23,8 @@ enum ENetMode
|
||||
};
|
||||
|
||||
static ENetMode GetNetModeHook() { /* std::cout << "AA!\n"; */ return ENetMode::NM_DedicatedServer; }
|
||||
static ENetMode GetNetModeHook2() { /* std::cout << "AA!\n"; */ return ENetMode::NM_DedicatedServer; }
|
||||
|
||||
static void NoMCPHook() { return; }
|
||||
static void CollectGarbageHook() { return; }
|
||||
|
||||
@@ -48,11 +52,12 @@ DWORD WINAPI Main(LPVOID)
|
||||
Offsets::Print();
|
||||
|
||||
Addresses::FindAll();
|
||||
Addresses::Print();
|
||||
Addresses::Init();
|
||||
Addresses::Print();
|
||||
|
||||
static auto GameModeDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortGameModeAthena");
|
||||
static auto FortPlayerControllerAthenaDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortPlayerControllerAthena");
|
||||
static auto FortPlayerControllerAthenaDefault = FindObject<UClass>(L"/Game/Athena/Athena_PlayerController.Default__Athena_PlayerController_C");
|
||||
static auto FortPlayerPawnAthenaDefault = FindObject<UClass>(L"/Game/Athena/PlayerPawn_Athena.Default__PlayerPawn_Athena_C");
|
||||
static auto FortAbilitySystemComponentAthenaDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortAbilitySystemComponentAthena");
|
||||
|
||||
static auto SwitchLevel = FindObject<UFunction>(L"/Script/Engine.PlayerController.SwitchLevel");
|
||||
@@ -73,6 +78,32 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
GetLocalPlayerController()->ProcessEvent(SwitchLevel, &Level);
|
||||
|
||||
/*
|
||||
auto GIsClient = Memcury::Scanner(FindGIsServer());
|
||||
|
||||
*GIsClient.GetAs<bool*>() = false;
|
||||
*(bool*)((uintptr_t)GIsClient.Get() + 1) = true;
|
||||
*/
|
||||
|
||||
/* auto GIsServer = Memcury::Scanner(__int64(GetModuleHandleW(0)) + 0x804B65A); // Memcury::Scanner::FindStringRef(L"STAT_UpdateLevelStreaming").ScanFor({ 0x80, 0x3D }, false, 1).RelativeOffset(2);
|
||||
|
||||
LOG_INFO(LogDev, "GIsServer: 0x{:x}", GIsServer.Get() - __int64(GetModuleHandleW(0)));
|
||||
LOG_INFO(LogDev, "gisserver - 1: 0x{:x}", __int64(((uintptr_t)GIsServer.Get() - 1)) - __int64(GetModuleHandleW(0)));
|
||||
LOG_INFO(LogDev, "FindGIsServer: 0x{:x}", FindGIsServer() - __int64(GetModuleHandleW(0)));
|
||||
LOG_INFO(LogDev, "FindGIsClient: 0x{:x}", FindGIsClient() - __int64(GetModuleHandleW(0)));
|
||||
|
||||
*GIsServer.GetAs<bool*>() = true;
|
||||
*(bool*)((uintptr_t)GIsServer.Get() - 1) = false; */
|
||||
|
||||
/* struct { UObject* World; bool ret; } parms{GetWorld()};
|
||||
|
||||
static auto IsDedicatedServerFn = FindObject<UFunction>(L"/Script/Engine.KismetSystemLibrary.IsDedicatedServer");
|
||||
UGameplayStatics::StaticClass()->ProcessEvent(IsDedicatedServerFn, &parms);
|
||||
|
||||
LOG_INFO(LogDev, "isded: {}", parms.ret); */
|
||||
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::ActorGetNetMode, (PVOID)GetNetModeHook2, nullptr);
|
||||
|
||||
auto& LocalPlayers = GetLocalPlayers();
|
||||
|
||||
if (LocalPlayers.Num() && LocalPlayers.Data)
|
||||
@@ -82,6 +113,9 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
for (auto func : Addresses::GetFunctionsToNull())
|
||||
{
|
||||
if (func == 0)
|
||||
continue;
|
||||
|
||||
*(uint8_t*)func = 0xC3;
|
||||
}
|
||||
|
||||
@@ -110,6 +144,11 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/Engine.PlayerController.ServerAcknowledgePossession"),
|
||||
AFortPlayerControllerAthena::ServerAcknowledgePossessionHook, nullptr, false);
|
||||
|
||||
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawn.ServerSendZiplineState"),
|
||||
AFortPlayerPawn::ServerSendZiplineStateHook, nullptr, false);
|
||||
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawn.ServerHandlePickup"),
|
||||
AFortPlayerPawn::ServerHandlePickupHook, nullptr, false);
|
||||
|
||||
Hooking::MinHook::Hook(FortAbilitySystemComponentAthenaDefault, FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ServerTryActivateAbility"),
|
||||
UAbilitySystemComponent::ServerTryActivateAbilityHook, nullptr, false);
|
||||
Hooking::MinHook::Hook(FortAbilitySystemComponentAthenaDefault, FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ServerTryActivateAbilityWithEventData"),
|
||||
@@ -125,6 +164,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
AFortPlayerController::ServerAttemptAircraftJumpHook, nullptr, false);
|
||||
}
|
||||
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::GetPlayerViewpoint, (PVOID)AFortPlayerControllerAthena::GetPlayerViewPointHook, (PVOID*)&AFortPlayerControllerAthena::GetPlayerViewPointOriginal);
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::KickPlayer, (PVOID)AGameSession::KickPlayerHook, (PVOID*)&AGameSession::KickPlayerOriginal);
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::TickFlush, (PVOID)UNetDriver::TickFlushHook, (PVOID*)&UNetDriver::TickFlushOriginal);
|
||||
Hooking::MinHook::Hook((PVOID)Addresses::OnDamageServer, (PVOID)ABuildingActor::OnDamageServerHook, (PVOID*)&ABuildingActor::OnDamageServerOriginal);
|
||||
@@ -133,6 +173,17 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
srand(time(0));
|
||||
|
||||
while (true)
|
||||
{
|
||||
if (GetAsyncKeyState(VK_F7) & 1)
|
||||
{
|
||||
LOG_INFO(LogEvent, "Starting {} event!", GetEventName());
|
||||
StartEvent();
|
||||
}
|
||||
|
||||
Sleep(1000 / 30);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
0
Project Reboot 3.0/events.cpp
Normal file
0
Project Reboot 3.0/events.cpp
Normal file
407
Project Reboot 3.0/events.h
Normal file
407
Project Reboot 3.0/events.h
Normal file
@@ -0,0 +1,407 @@
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
|
||||
#include "Object.h"
|
||||
#include "reboot.h"
|
||||
#include "GameplayStatics.h"
|
||||
|
||||
struct Event
|
||||
{
|
||||
std::string EventDisplayName;
|
||||
std::string LoaderClass;
|
||||
std::string LoaderFunction;
|
||||
__int64 AdditionalLoaderParams;
|
||||
std::vector<std::pair<bool, std::string>> OnReadyFunctions;
|
||||
std::vector<std::pair<std::pair<bool, std::string>, __int64>> StartEventFunctions;
|
||||
std::string ScriptingClass;
|
||||
std::string PlaylistName;
|
||||
double Version;
|
||||
};
|
||||
|
||||
static inline std::vector<Event> Events =
|
||||
{
|
||||
Event
|
||||
(
|
||||
"Astronomical",
|
||||
"/CycloneJerky/Gameplay/BP_Jerky_Loader.BP_Jerky_Loader_C",
|
||||
// "/CycloneJerky/Gameplay/BP_Jerky_Loader.BP_Jerky_Loader_C.LoadJerkyLevel",
|
||||
"",
|
||||
1,
|
||||
{
|
||||
{
|
||||
false,
|
||||
"/CycloneJerky/Gameplay/BP_Jerky_Scripting.BP_Jerky_Scripting_C.OnReady_093B6E664C060611B28F79B5E7052A39"
|
||||
},
|
||||
{
|
||||
true,
|
||||
"/CycloneJerky/Gameplay/BP_Jerky_Loader.BP_Jerky_Loader_C.OnReady_7FE9744D479411040654F5886C078D08"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
/* {
|
||||
false,
|
||||
"/CycloneJerky/Gameplay/BP_Jerky_Scripting.BP_Jerky_Scripting_C.startevent"
|
||||
}, */
|
||||
{
|
||||
true,
|
||||
"/CycloneJerky/Gameplay/BP_Jerky_Loader.BP_Jerky_Loader_C.startevent"
|
||||
},
|
||||
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
"/CycloneJerky/Gameplay/BP_Jerky_Scripting.BP_Jerky_Scripting_C",
|
||||
"/Game/Athena/Playlists/Music/Playlist_Music_High.Playlist_Music_High",
|
||||
12.41
|
||||
),
|
||||
Event
|
||||
(
|
||||
"Device",
|
||||
"/Fritter/BP_Fritter_Loader.BP_Fritter_Loader_C",
|
||||
// "/CycloneJerky/Gameplay/BP_Jerky_Loader.BP_Jerky_Loader_C.LoadJerkyLevel",
|
||||
"",
|
||||
1,
|
||||
{
|
||||
{
|
||||
false,
|
||||
"/Fritter/BP_Fritter_Script.BP_Fritter_Script_C.OnReady_ACE66C28499BF8A59B3D88A981DDEF41"
|
||||
},
|
||||
{
|
||||
true,
|
||||
"/Fritter/BP_Fritter_Loader.BP_Fritter_Loader_C.OnReady_1216203B4B63E3DFA03042A62380A674"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
/* {
|
||||
false,
|
||||
"/Fritter/BP_Fritter_Loader.BP_Fritter_Loader_C.startevent"
|
||||
}, */
|
||||
{
|
||||
true,
|
||||
"/Fritter/BP_Fritter_Loader.BP_Fritter_Loader_C.startevent"
|
||||
},
|
||||
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
"/Fritter/BP_Fritter_Script.BP_Fritter_Script_C",
|
||||
"/Game/Athena/Playlists/Fritter/Playlist_Fritter_High.Playlist_Fritter_High",
|
||||
12.61
|
||||
),
|
||||
Event
|
||||
(
|
||||
"Marshmello",
|
||||
"",
|
||||
"",
|
||||
1,
|
||||
{
|
||||
{
|
||||
false,
|
||||
"/Game/Athena/Environments/Festivus/Blueprints/BP_FestivusManager.BP_FestivusManager_C.OnReady_EE7676604ADFD92D7B2972AC0ABD4BB8"
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
{
|
||||
false,
|
||||
"/Game/Athena/Environments/Festivus/Blueprints/BP_FestivusManager.BP_FestivusManager_C.PlayConcert"
|
||||
},
|
||||
|
||||
0
|
||||
}
|
||||
},
|
||||
|
||||
"/Game/Athena/Environments/Festivus/Blueprints/BP_FestivusManager.BP_FestivusManager_C",
|
||||
"/Game/Athena/Playlists/Music/Playlist_Music_High.Playlist_Music_High",
|
||||
7.30
|
||||
)
|
||||
};
|
||||
|
||||
static inline UObject* GetEventPlaylist()
|
||||
{
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
return FindObject(CurrentEvent.PlaylistName, nullptr, ANY_PACKAGE);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static inline UObject* GetEventScripting()
|
||||
{
|
||||
Event OurEvent;
|
||||
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
{
|
||||
OurEvent = CurrentEvent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!OurEvent.Version)
|
||||
return nullptr;
|
||||
|
||||
auto ScriptingClass = FindObject<UClass>(OurEvent.ScriptingClass);
|
||||
|
||||
if (!ScriptingClass)
|
||||
{
|
||||
// LOG_ERROR(LogEvent, "Failed to find ScriptingClass!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto AllScripters = UGameplayStatics::GetAllActorsOfClass(GetWorld(), ScriptingClass);
|
||||
|
||||
if (AllScripters.size() <= 0)
|
||||
{
|
||||
// LOG_ERROR(LogEvent, "Failed to find any scripters!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return AllScripters.at(0);
|
||||
}
|
||||
|
||||
static inline UObject* GetEventLoader()
|
||||
{
|
||||
Event OurEvent;
|
||||
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
{
|
||||
OurEvent = CurrentEvent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!OurEvent.Version)
|
||||
return nullptr;
|
||||
|
||||
auto LoaderClass = FindObject<UClass>(OurEvent.LoaderClass);
|
||||
|
||||
if (!LoaderClass)
|
||||
{
|
||||
LOG_ERROR(LogEvent, "Failed to find LoaderClass!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto AllLoaders = UGameplayStatics::GetAllActorsOfClass(GetWorld(), LoaderClass);
|
||||
|
||||
if (AllLoaders.size() <= 0)
|
||||
{
|
||||
// LOG_ERROR(LogEvent, "Failed to find any loaders!");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return AllLoaders.at(0);
|
||||
}
|
||||
|
||||
static inline std::string GetEventName()
|
||||
{
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
return CurrentEvent.EventDisplayName;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
static inline void LoadEvent(bool* bWereAllSuccessful = nullptr)
|
||||
{
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = false;
|
||||
|
||||
Event OurEvent;
|
||||
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
{
|
||||
OurEvent = CurrentEvent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!OurEvent.Version)
|
||||
return;
|
||||
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = true;
|
||||
|
||||
auto LoaderFunction = FindObject<UFunction>(OurEvent.LoaderFunction);
|
||||
|
||||
if (!LoaderFunction)
|
||||
{
|
||||
LOG_ERROR(LogEvent, "Failed to find any loader function!");
|
||||
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = false;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
auto Loader = GetEventLoader();
|
||||
|
||||
if (!Loader)
|
||||
{
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = false;
|
||||
|
||||
return; // GetEventLoader handles the printing
|
||||
}
|
||||
|
||||
Loader->ProcessEvent(LoaderFunction, &OurEvent.AdditionalLoaderParams);
|
||||
}
|
||||
|
||||
static inline bool CallOnReadys(bool* bWereAllSuccessful = nullptr)
|
||||
{
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = false;
|
||||
|
||||
Event OurEvent;
|
||||
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
{
|
||||
OurEvent = CurrentEvent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!OurEvent.Version)
|
||||
return false;
|
||||
|
||||
auto EventScripting = GetEventScripting();
|
||||
|
||||
if (!EventScripting)
|
||||
return false; // GetEventScripting handles the printing
|
||||
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = true;
|
||||
|
||||
struct { UObject* GameState; UObject* Playlist; FGameplayTagContainer PlaylistContextTags; } OnReadyParams{
|
||||
((AFortGameModeAthena*)GetWorld()->GetGameMode())->GetGameStateAthena(), GetEventPlaylist(),
|
||||
GetEventPlaylist()->Get<FGameplayTagContainer>("GameplayTagContainer")};
|
||||
|
||||
for (auto& OnReadyFunc : OurEvent.OnReadyFunctions)
|
||||
{
|
||||
if (OnReadyFunc.first) // func is in loader
|
||||
{
|
||||
auto EventLoader = GetEventLoader();
|
||||
|
||||
if (!EventLoader)
|
||||
{
|
||||
// if (bWereAllSuccessful)
|
||||
// *bWereAllSuccessful = false;
|
||||
|
||||
continue; // uhh??
|
||||
}
|
||||
|
||||
auto OnReadyUFunc = FindObject<UFunction>(OnReadyFunc.second);
|
||||
|
||||
if (!OnReadyUFunc)
|
||||
{
|
||||
LOG_ERROR(LogEvent, "Failed to find OnReady: {}", OnReadyFunc.second);
|
||||
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
EventLoader->ProcessEvent(OnReadyUFunc, &OnReadyParams);
|
||||
}
|
||||
else // func is in scripting
|
||||
{
|
||||
auto OnReadyUFunc = FindObject<UFunction>(OnReadyFunc.second);
|
||||
|
||||
if (!OnReadyUFunc)
|
||||
{
|
||||
LOG_ERROR(LogEvent, "Failed to find OnReady: {}", OnReadyFunc.second);
|
||||
|
||||
if (bWereAllSuccessful)
|
||||
*bWereAllSuccessful = false;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
EventScripting->ProcessEvent(OnReadyUFunc, &OnReadyParams);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void StartEvent()
|
||||
{
|
||||
Event OurEvent;
|
||||
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
{
|
||||
OurEvent = CurrentEvent;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!OurEvent.Version)
|
||||
return;
|
||||
|
||||
auto EventScripting = GetEventScripting();
|
||||
|
||||
// if (!EventScripting)
|
||||
// return; // GetEventScripting handles the printing
|
||||
|
||||
CallOnReadys();
|
||||
|
||||
for (auto& StartEventFunc : OurEvent.StartEventFunctions)
|
||||
{
|
||||
auto StartEventUFunc = FindObject<UFunction>(StartEventFunc.first.second);
|
||||
|
||||
if (!StartEventUFunc)
|
||||
{
|
||||
LOG_ERROR(LogEvent, "Failed to find StartEvent: {}", StartEventFunc.first.second);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StartEventFunc.first.first) // func is in loader
|
||||
{
|
||||
auto EventLoader = GetEventLoader();
|
||||
|
||||
if (!EventLoader)
|
||||
continue; // uhh??
|
||||
|
||||
EventLoader->ProcessEvent(StartEventUFunc, &StartEventFunc.second);
|
||||
}
|
||||
else // func is in scripting
|
||||
{
|
||||
if (!EventScripting)
|
||||
continue;
|
||||
|
||||
EventScripting->ProcessEvent(StartEventUFunc, &StartEventFunc.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool DoesEventRequireLoading()
|
||||
{
|
||||
for (auto& CurrentEvent : Events)
|
||||
{
|
||||
if (CurrentEvent.Version == Fortnite_Version)
|
||||
{
|
||||
return !CurrentEvent.LoaderClass.empty() && !CurrentEvent.LoaderFunction.empty();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ static inline uint64 FindPauseBeaconRequests()
|
||||
static inline uint64 FindGetPlayerViewpoint()
|
||||
{
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"APlayerController::GetPlayerViewPoint: out_Location, ViewTarget=%s");
|
||||
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true);
|
||||
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true, 1);
|
||||
}
|
||||
|
||||
static inline uint64 FindSpawnActor()
|
||||
@@ -159,8 +159,8 @@ static inline uint64 FindSetWorld()
|
||||
else if (Fortnite_Season >= 19 && Fortnite_Season < 21)
|
||||
SetWorldIndex = 0x7A;
|
||||
|
||||
static auto DefaultNetDriver = FindObject("/Script/Engine.Default__NetDriver");
|
||||
return __int64(DefaultNetDriver->VFTable[SetWorldIndex]);
|
||||
// static auto DefaultNetDriver = FindObject("/Script/Engine.Default__NetDriver");
|
||||
return SetWorldIndex;
|
||||
}
|
||||
|
||||
static inline uint64 FindInitListen()
|
||||
@@ -195,6 +195,9 @@ static inline uint64 FindNoMCP()
|
||||
if (Engine_Version == 425)
|
||||
return Memcury::Scanner::FindPattern("E8 ? ? ? ? 84 C0 75 C1").RelativeOffset(1).Get();
|
||||
|
||||
if (Engine_Version == 426)
|
||||
return Memcury::Scanner::FindPattern("E8 ? ? ? ? 84 C0 75 10 84 DB").RelativeOffset(1).Get();
|
||||
|
||||
// return (uintptr_t)GetModuleHandleW(0) + 0x1791CF0; // 11.01
|
||||
return 0;
|
||||
// return (uintptr_t)GetModuleHandleW(0) + 0x161d600; // 10.40
|
||||
@@ -208,14 +211,53 @@ static inline uint64 FindCollectGarbage()
|
||||
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true, 1);
|
||||
}
|
||||
|
||||
static inline uint64 FindActorGetNetMode()
|
||||
{
|
||||
auto AActorGetNetmode = Memcury::Scanner::FindStringRef(L"ClientPlayerLeft %s")
|
||||
.ScanFor({ 0x48, 0x8B, 0xCF, 0xE8 })
|
||||
.RelativeOffset(4)
|
||||
.Get();
|
||||
|
||||
return AActorGetNetmode;
|
||||
}
|
||||
|
||||
static inline uint64 FindTickFlush()
|
||||
{
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"STAT_NetTickFlush");
|
||||
return FindBytes(Addr, { 0x4C, 0x8B }, 1000, 0, true);
|
||||
}
|
||||
|
||||
static inline uint64 FindGIsServer()
|
||||
{
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, 1);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, 1);
|
||||
|
||||
return Memcury::Scanner(Addy).RelativeOffset(2).Get();
|
||||
}
|
||||
|
||||
static inline uint64 FindChangeGameSessionId()
|
||||
{
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"Changing GameSessionId from '%s' to '%s'");
|
||||
return FindBytes(Addr, { 0x40, 0x55 }, 2000, 0, true);
|
||||
}
|
||||
|
||||
static inline uint64 FindGIsClient()
|
||||
{
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering");
|
||||
auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, 2);
|
||||
Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, 2);
|
||||
|
||||
return Memcury::Scanner(Addy).RelativeOffset(2).Get();
|
||||
}
|
||||
|
||||
static inline uint64 FindGetNetMode()
|
||||
{
|
||||
/* return Memcury::Scanner::FindStringRef(L" (client %d)")
|
||||
.ScanFor({ 0x48, 0x8B, 0xC8, 0xE8 }, false)
|
||||
.RelativeOffset(4)
|
||||
.Get(); // credit ender */
|
||||
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"PREPHYSBONES");
|
||||
auto BeginningFunction = Memcury::Scanner(FindBytes(Addr, { 0x40, 0x55 }, 1000, 0, true));
|
||||
auto CallToFunc = Memcury::Scanner(FindBytes(BeginningFunction, { 0xE8 }));
|
||||
|
||||
@@ -198,6 +198,9 @@ namespace Hooking
|
||||
|
||||
static bool Hook(UObject* DefaultClass, UFunction* Function, void* Detour, void** Original = nullptr, bool bUseSecondMethod = true, bool bHookExec = false) // Native hook
|
||||
{
|
||||
if (!Function)
|
||||
return false;
|
||||
|
||||
auto Exec = Function->GetFunc();
|
||||
|
||||
if (bHookExec)
|
||||
|
||||
@@ -66,6 +66,7 @@ inline void InitLogger()
|
||||
MakeLogger("LogLoading");
|
||||
MakeLogger("LogHook");
|
||||
MakeLogger("LogAbilities");
|
||||
MakeLogger("LogEvent");
|
||||
}
|
||||
|
||||
#define LOG_DEBUG(loggerName, ...) \
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
namespace Globals
|
||||
{
|
||||
extern inline bool bCreative = false;
|
||||
extern inline bool bGoingToPlayEvent = false;
|
||||
}
|
||||
|
||||
extern inline UObject* (*StaticLoadObjectOriginal)(UClass*, UObject*, const wchar_t* InName, const wchar_t* Filename, uint32_t LoadFlags, UObject* Sandbox, bool bAllowObjectReconciliation) = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user