work on skyfire

This commit is contained in:
Milxnor
2023-05-19 20:21:24 -04:00
parent 45fbfbef74
commit f37e15927f
22 changed files with 250 additions and 52 deletions

View File

@@ -105,7 +105,7 @@ static inline void SpawnBGAs() // hahah not "proper", there's a function that we
*/
}
if (FinalSpawnTransform.Translation == FVector(0, 0, 0))
if (FinalSpawnTransform.Translation.CompareVectors(FVector(0, 0, 0)))
{
LOG_WARN(LogGame, "Invalid BGA spawn location!");
// ConsumableActor->K2_DestroyActor(); // ??

View File

@@ -31,7 +31,7 @@ void AFortAthenaCreativePortal::TeleportPlayerToLinkedVolumeHook(UObject* Contex
return TeleportPlayerToLinkedVolumeOriginal(Context, Stack, Ret);
auto Location = LinkedVolume->GetActorLocation();
Location.Z -= 10000; // proper 1:1
// Location.Z -= 10000; // proper 1:1
PlayerPawn->TeleportTo(Location, FRotator());
return TeleportPlayerToLinkedVolumeOriginal(Context, Stack, Ret);

View File

@@ -52,11 +52,11 @@ void AFortAthenaMapInfo::SpawnLlamas()
// LOG_INFO(LogDev, "Initial Llama at {} {} {}", Location.X, Location.Y, Location.Z);
if (Location == FVector(0, 0, 0))
if (Location.CompareVectors(FVector(0, 0, 0)))
continue;
FRotator RandomYawRotator = FRotator();
RandomYawRotator.Yaw = (float)rand() * 0.010986663;
RandomYawRotator.Yaw = (float)rand() * 0.010986663f;
FTransform InitialSpawnTransform;
InitialSpawnTransform.Translation = Location;

View File

@@ -233,6 +233,36 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
SetupServerBotManager();
// SetupNavConfig(UKismetStringLibrary::Conv_StringToName(L"MANG"));
static auto WorldManagerOffset = GameState->GetOffset("WorldManager", false);
if (WorldManagerOffset != -1) // needed?
{
auto WorldManager = GameState->Get(WorldManagerOffset);
if (WorldManager)
{
static auto WorldManagerStateOffset = WorldManager->GetOffset("WorldManagerState", false);
if (WorldManagerStateOffset != -1) // needed?
{
enum class EFortWorldManagerState : uint8_t
{
WMS_Created = 0,
WMS_QueryingWorld = 1,
WMS_WorldQueryComplete = 2,
WMS_CreatingNewWorld = 3,
WMS_LoadingExistingWorld = 4,
WMS_Running = 5,
WMS_Failed = 6,
WMS_MAX = 7
};
LOG_INFO(LogDev, "Old WorldManager State: {}", (int)WorldManager->Get<EFortWorldManagerState>(WorldManagerStateOffset));
WorldManager->Get<EFortWorldManagerState>(WorldManagerStateOffset) = EFortWorldManagerState::WMS_Running; // needed? right time?
}
}
}
static auto WarmupRequiredPlayerCountOffset = GameMode->GetOffset("WarmupRequiredPlayerCount");
GameMode->Get<int>(WarmupRequiredPlayerCountOffset) = 1;
@@ -512,7 +542,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
}
}
// if (!Globals::bCreative)
/* if (!Globals::bCreative) // ??
{
static auto FortPlayerStartCreativeClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartCreative");
static auto FortPlayerStartWarmupClass = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStartWarmup");
@@ -524,7 +554,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
if (ActorsNum == 0)
return false;
}
} */
auto MapInfo = GameState->GetMapInfo();
@@ -1095,7 +1125,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
for (auto& LootDrop : LootDrops)
{
PickupCreateData CreateData;
PickupCreateData CreateData{};
CreateData.bToss = true;
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(LootDrop->GetItemDefinition(), LootDrop->GetCount(), LootDrop->GetLoadedAmmo());
CreateData.SpawnLocation = Location;

View File

@@ -162,7 +162,7 @@ bool AFortGameStateAthena::IsRespawningAllowed(AFortPlayerState* PlayerState)
auto GameModeAthena = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
static auto IsRespawningAllowedFn = FindObject<UFunction>(L"/Script/FortniteGame.FortGameStateZone.IsRespawningAllowed");
LOG_INFO(LogDev, "IsRespawningAllowedFn: {}", __int64(IsRespawningAllowedFn));
// LOG_INFO(LogDev, "IsRespawningAllowedFn: {}", __int64(IsRespawningAllowedFn));
if (!IsRespawningAllowedFn)
{
@@ -178,7 +178,7 @@ bool AFortGameStateAthena::IsRespawningAllowed(AFortPlayerState* PlayerState)
return false;
auto& RespawnType = CurrentPlaylist->Get<uint8_t>(RespawnTypeOffset);
LOG_INFO(LogDev, "RespawnType: {}", (int)RespawnType);
// LOG_INFO(LogDev, "RespawnType: {}", (int)RespawnType);
if (RespawnType == 1)
return true;
@@ -278,25 +278,29 @@ void AFortGameStateAthena::AddToAdditionalPlaylistLevelsStreamed(const FName& Na
auto NameStr = Name.ToString();
auto NameWStr = std::wstring(NameStr.begin(), NameStr.end());
StreamLevel(Name.ToString()); // skunke bozo (I didn't test the next code too much soo)
/* ULevelStreamingDynamic::LoadLevelInstance(GetWorld(), NameWStr.c_str(), FVector(), FRotator());
static auto AdditionalPlaylistLevelsStreamedOffset = this->GetOffset("AdditionalPlaylistLevelsStreamed", false);
if (!FAdditionalLevelStreamed::GetStruct())
if (true)
{
auto& AdditionalPlaylistLevelsStreamed = this->Get<TArray<FName>>(AdditionalPlaylistLevelsStreamedOffset);
AdditionalPlaylistLevelsStreamed.Add(Name);
StreamLevel(Name.ToString()); // skunke bozo (I didn't test the next code too much soo)
}
else
{
auto& AdditionalPlaylistLevelsStreamed = this->Get<TArray<FAdditionalLevelStreamed>>(AdditionalPlaylistLevelsStreamedOffset);
auto NewLevelStreamed = Alloc<FAdditionalLevelStreamed>(FAdditionalLevelStreamed::GetStructSize());
NewLevelStreamed->GetLevelName() = Name;
NewLevelStreamed->IsServerOnly() = bServerOnly;
static auto AdditionalPlaylistLevelsStreamedOffset = this->GetOffset("AdditionalPlaylistLevelsStreamed", false);
AdditionalPlaylistLevelsStreamed.AddPtr(NewLevelStreamed, FAdditionalLevelStreamed::GetStructSize());
} */
if (!FAdditionalLevelStreamed::GetStruct())
{
auto& AdditionalPlaylistLevelsStreamed = this->Get<TArray<FName>>(AdditionalPlaylistLevelsStreamedOffset);
AdditionalPlaylistLevelsStreamed.Add(Name);
}
else
{
auto& AdditionalPlaylistLevelsStreamed = this->Get<TArray<FAdditionalLevelStreamed>>(AdditionalPlaylistLevelsStreamedOffset);
auto NewLevelStreamed = Alloc<FAdditionalLevelStreamed>(FAdditionalLevelStreamed::GetStructSize());
NewLevelStreamed->GetLevelName() = Name;
NewLevelStreamed->IsServerOnly() = bServerOnly;
AdditionalPlaylistLevelsStreamed.AddPtr(NewLevelStreamed, FAdditionalLevelStreamed::GetStructSize());
}
}
}
UClass* AFortGameStateAthena::StaticClass()

View File

@@ -508,7 +508,7 @@ AFortPickup* UFortKismetLibrary::K2_SpawnPickupInWorldWithClassHook(UObject* Con
LOG_INFO(LogDev, __FUNCTION__);
PickupCreateData CreateData;
PickupCreateData CreateData{};
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, NumberToSpawn, -1);
CreateData.Source = Source;
CreateData.SourceType = SourceType;
@@ -516,6 +516,7 @@ AFortPickup* UFortKismetLibrary::K2_SpawnPickupInWorldWithClassHook(UObject* Con
CreateData.bToss = bToss;
CreateData.bRandomRotation = bRandomRotation;
CreateData.bShouldFreeItemEntryWhenDeconstructed = true;
CreateData.PawnOwner = OptionalOwnerPC ? OptionalOwnerPC->GetMyFortPawn() : nullptr;
auto NewPickup = AFortPickup::SpawnPickup(CreateData);
@@ -590,13 +591,14 @@ AFortPickup* UFortKismetLibrary::K2_SpawnPickupInWorldHook(UObject* Context, FFr
auto Pawn = OptionalOwnerPC ? OptionalOwnerPC->GetMyFortPawn() : nullptr;
PickupCreateData CreateData;
PickupCreateData CreateData{};
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, NumberToSpawn, -1);
CreateData.SpawnLocation = Position;
CreateData.bToss = bToss;
CreateData.bRandomRotation = bRandomRotation;
CreateData.PawnOwner = Pawn;
CreateData.bShouldFreeItemEntryWhenDeconstructed = true;
CreateData.PawnOwner = OptionalOwnerPC ? OptionalOwnerPC->GetMyFortPawn() : nullptr;
auto NewPickup = AFortPickup::SpawnPickup(CreateData);

View File

@@ -33,16 +33,38 @@ AFortWeapon* AFortPawn::EquipWeaponDefinition(UFortWeaponItemDefinition* WeaponD
bool AFortPawn::PickUpActor(AActor* PickupTarget, UFortDecoItemDefinition* PlacementDecoItemDefinition)
{
static auto fn = FindObject<UFunction>("/Script/FortniteGame.FortPawn.PickUpActor");
static auto fn = FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.PickUpActor");
struct { AActor* PickupTarget; UFortDecoItemDefinition* PlacementDecoItemDefinition; bool ReturnValue; } AFortPawn_PickUpActor_Params{ PickupTarget, PlacementDecoItemDefinition };
this->ProcessEvent(fn, &AFortPawn_PickUpActor_Params);
return AFortPawn_PickUpActor_Params.ReturnValue;
}
float AFortPawn::GetShield()
{
float Shield = 0;
static auto GetShieldFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.GetShield");
if (GetShieldFn)
this->ProcessEvent(GetShieldFn, &Shield);
return Shield;
}
float AFortPawn::GetHealth()
{
float Health = 0;
static auto GetHealthFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.GetHealth");
if (GetHealthFn)
this->ProcessEvent(GetHealthFn, &Health);
return Health;
}
void AFortPawn::SetHealth(float NewHealth)
{
static auto SetHealthFn = FindObject<UFunction>("/Script/FortniteGame.FortPawn.SetHealth");
static auto SetHealthFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.SetHealth");
if (SetHealthFn)
this->ProcessEvent(SetHealthFn, &NewHealth);
@@ -50,7 +72,7 @@ void AFortPawn::SetHealth(float NewHealth)
void AFortPawn::SetMaxHealth(float NewHealthVal)
{
static auto SetMaxHealthFn = FindObject<UFunction>("/Script/FortniteGame.FortPawn.SetMaxHealth");
static auto SetMaxHealthFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.SetMaxHealth");
if (!SetMaxHealthFn)
return;

View File

@@ -27,6 +27,8 @@ public:
return ReadBitfieldValue(bIsDBNOOffset, bIsDBNOFieldMask);
}
float GetShield();
float GetHealth();
void SetHealth(float NewHealth);
void SetMaxHealth(float NewHealthVal);
void SetShield(float NewShield);

View File

@@ -32,9 +32,9 @@ void AFortPickup::SpawnMovementComponent()
AFortPickup* AFortPickup::SpawnPickup(PickupCreateData& PickupData)
{
if (PickupData.Source == -1)
PickupData.Source = -1;
PickupData.Source = 0;
if (PickupData.SourceType == -1)
PickupData.SourceType = -1;
PickupData.SourceType = 0;
/* if (PickupData.bToss)
{
@@ -42,7 +42,7 @@ AFortPickup* AFortPickup::SpawnPickup(PickupCreateData& PickupData)
} */
static auto FortPickupAthenaClass = FindObject<UClass>(L"/Script/FortniteGame.FortPickupAthena");
auto PlayerState = PickupData.PawnOwner ? Cast<AFortPlayerState>(PickupData.PawnOwner->GetPlayerState()) : nullptr;
auto PlayerState = PickupData.PawnOwner->IsValidLowLevel() ? Cast<AFortPlayerState>(PickupData.PawnOwner->GetPlayerState()) : nullptr;
FActorSpawnParameters SpawnParameters{};
// SpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AdjustIfPossibleButAlwaysSpawn;

View File

@@ -1229,6 +1229,8 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
DeathCause = ToDeathCause(Tags, false, DeadPawn); // DeadPawn->IsDBNO() ??
LOG_INFO(LogDev, "DeathCause: {}", (int)DeathCause);
LOG_INFO(LogDev, "DeadPawn->IsDBNO(): {}", DeadPawn->IsDBNO());
LOG_INFO(LogDev, "KillerPlayerState: {}", __int64(KillerPlayerState));
*(bool*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::bDBNO) = DeadPawn->IsDBNO();
*(uint8*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::DeathCause) = DeathCause;
@@ -1295,11 +1297,37 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
// LOG_INFO(LogDev, "Reported kill.");
/* if (KillerPawn && KillerPawn != DeadPawn)
if (AmountOfHealthSiphon != 0)
{
KillerPawn->SetHealth(100);
KillerPawn->SetShield(100);
} */
if (KillerPawn && KillerPawn != DeadPawn)
{
float Health = KillerPawn->GetHealth();
float Shield = KillerPawn->GetShield();
int MaxHealth = 100;
int MaxShield = 100;
int AmountGiven = 0;
if ((MaxHealth - Health) > 0)
{
int AmountToGive = MaxHealth - Health >= AmountOfHealthSiphon ? AmountOfHealthSiphon : MaxHealth - Health;
KillerPawn->SetHealth(Health + AmountToGive);
AmountGiven += AmountToGive;
}
if ((MaxShield - Shield) > 0 && AmountGiven < AmountOfHealthSiphon)
{
int AmountToGive = MaxShield - Shield >= AmountOfHealthSiphon ? AmountOfHealthSiphon : MaxShield - Shield;
AmountToGive -= AmountGiven;
if (AmountToGive > 0)
{
KillerPawn->SetShield(Shield + AmountToGive);
AmountGiven += AmountToGive;
}
}
}
}
}
bool bIsRespawningAllowed = GameState->IsRespawningAllowed(DeadPlayerState);

View File

@@ -185,7 +185,7 @@ public:
void RespawnPlayerAfterDeath(bool bEnterSkydiving)
{
static auto RespawnPlayerAfterDeathFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerAthena.RespawnPlayerAfterDeath");
static auto RespawnPlayerAfterDeathFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerControllerAthena.RespawnPlayerAfterDeath");
if (RespawnPlayerAfterDeathFn)
{
@@ -193,10 +193,16 @@ public:
}
else
{
// techinally we can remake this as all it really does on older versions is clear deathinfo
// techinally we can remake this as all it really does on older versions is clear deathinfo (I think?)
}
}
bool& IsMarkedAlive()
{
static auto bMarkedAliveOffset = GetOffset("bMarkedAlive");
return Get<bool>(bMarkedAliveOffset);
}
static void StartGhostModeHook(UObject* Context, FFrame* Stack, void* Ret); // we could native hook this but eh
static void EndGhostModeHook(AFortPlayerControllerAthena* PlayerController);
static void EnterAircraftHook(UObject* PC, AActor* Aircraft);

View File

@@ -17,6 +17,11 @@ FFortAthenaLoadout* AFortPlayerPawn::GetCosmeticLoadout()
return GetPtr<FFortAthenaLoadout>(CosmeticLoadoutOffset);
}
void AFortPlayerPawn::ServerReviveFromDBNOHook(AController* EventInstigator)
{
LOG_INFO(LogDev, "ServerReviveFromDBNOHook!");
}
void AFortPlayerPawn::ServerHandlePickupWithRequestedSwapHook(UObject* Context, FFrame* Stack, void* Ret)
{
auto Pawn = (AFortPlayerPawn*)Context;

View File

@@ -44,6 +44,7 @@ public:
UFortWeaponItemDefinition* GetVehicleWeaponDefinition(AFortAthenaVehicle* Vehicle);
void UnEquipVehicleWeaponDefinition(UFortWeaponItemDefinition* VehicleWeaponDefinition);
static void ServerReviveFromDBNOHook(AController* EventInstigator);
static void ServerHandlePickupWithRequestedSwapHook(UObject* Context, FFrame* Stack, void* Ret); // we could native hook this but idk
static void StartGhostModeExitHook(UObject* Context, FFrame* Stack, void* Ret); // we could native hook this but eh
static AActor* ServerOnExitVehicleHook(AFortPlayerPawn* Pawn, ETryExitVehicleBehavior ExitForceBehavior); // actually returns AFortAthenaVehicle

View File

@@ -32,6 +32,23 @@ struct FFortRespawnData
}
};
struct FDeathInfo
{
static UStruct* GetStruct()
{
static auto Struct = FindObject<UStruct>("/Script/FortniteGame.DeathInfo");
return Struct;
}
static int GetStructSize() { return GetStruct()->GetPropertiesSize(); }
bool& IsDBNO()
{
static auto bDBNOOffset = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "bDBNO");
return *(bool*)(__int64(this) + bDBNOOffset);
}
};
class AFortPlayerStateAthena : public AFortPlayerState
{
public:
@@ -87,15 +104,30 @@ public:
void ClientReportKill(AFortPlayerStateAthena* Player)
{
static auto ClientReportKillFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerStateAthena.ClientReportKill");
static auto ClientReportKillFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerStateAthena.ClientReportKill");
this->ProcessEvent(ClientReportKillFn, &Player);
}
void OnRep_DeathInfo()
{
static auto OnRep_DeathInfoFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerStateAthena.OnRep_DeathInfo");
if (OnRep_DeathInfoFn) // needed?
{
this->ProcessEvent(OnRep_DeathInfoFn);
}
}
FDeathInfo* GetDeathInfo()
{
return GetPtr<FDeathInfo>(MemberOffsets::FortPlayerStateAthena::DeathInfo);
}
static void ServerSetInAircraftHook(UObject* Context, FFrame& Stack, void* Ret);
static UClass* StaticClass()
{
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortPlayerStateAthena");
static auto Class = FindObject<UClass>(L"/Script/FortniteGame.FortPlayerStateAthena");
return Class;
}
};

View File

@@ -7,6 +7,11 @@ public:
float Y;
float Z;
bool CompareVectors(const FVector& A)
{
return X == A.X && Y == A.Y && Z == A.Z;
}
FVector() : X(0), Y(0), Z(0) {}
FVector(float x, float y, float z) : X(x), Y(y), Z(z) {}
@@ -35,10 +40,10 @@ public:
return FVector{ this->X * A, this->Y * A, this->Z * A };
}
bool operator==(const FVector& A)
/* bool operator==(const FVector& A)
{
return X == A.X && Y == A.Y && Z == A.Z;
}
} */
void operator+=(const FVector& A)
{

View File

@@ -134,6 +134,8 @@ static void SetupServerBotManager()
static void SetupAIGoalManager()
{
// Playlist->AISettings->bAllowAIGoalManager
// There is some virtual function in the gamemode that calls a spawner for this, it gets the class from GameData, not sure why this doesn't work automatically or if we should even spawn this.
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
@@ -154,6 +156,8 @@ static void SetupAIGoalManager()
static void SetupAIDirector()
{
// Playlist->AISettings->bAllowAIDirector
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());

View File

@@ -723,8 +723,8 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
auto GameMode = Cast<AFortGameModeAthena>(GetWorld()->GetGameMode());
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"pausesafezone", nullptr);
GameMode->PauseSafeZone(GameState->IsSafeZonePaused() == 0);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"pausesafezone", nullptr);
// GameMode->PauseSafeZone(GameState->IsSafeZonePaused() == 0);
}
else if (Command == "teleport")
{

View File

@@ -311,6 +311,8 @@ DWORD WINAPI Main(LPVOID)
// UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogNavigation VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortMission VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortAIGoalSelection VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortWorld VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortPlayerRegistration VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogBuilding VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortAI VeryVerbose", nullptr);
UKismetSystemLibrary::ExecuteConsoleCommand(GetWorld(), L"log LogFortAIDirector VeryVerbose", nullptr);
@@ -400,13 +402,22 @@ DWORD WINAPI Main(LPVOID)
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DECF40), (PVOID)ReturnFalseHook, nullptr); // 7FF7E556CF40
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3DE5CE8), (PVOID)ActivatePhaseAtIndexHook, (PVOID*)&ActivatePhaseAtIndexOriginal); // 7FF7E5565CE8
}
else if (Fortnite_Version == 17.50) // Sky fire stuff
{
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + ), (PVOID)GetMeshNetworkNodeTypeHook, nullptr);
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E54BCC), (PVOID)ReturnTrueHook, nullptr); // 7FF638A04BCC
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E5496C), (PVOID)ReturnTrueHook, nullptr); // 7FF638A0496C
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E54A68), (PVOID)ReturnTrueHook, nullptr); // 7FF638A04A68
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + ), (PVOID)ReturnFalseHook, nullptr);
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x3E4D768), (PVOID)ActivatePhaseAtIndexHook, (PVOID*)&ActivatePhaseAtIndexOriginal); // 07FF6389FD768
}
else if (Fortnite_Version == 18.40)
{
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + ), (PVOID)GetMeshNetworkNodeTypeHook, nullptr);
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x416AAB8), (PVOID)ReturnTrueHook, nullptr); // 7FF79E3EAAB8
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x416A840), (PVOID)ReturnTrueHook, nullptr); // 7FF79E3EA840
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x416A93C), (PVOID)ReturnTrueHook, nullptr); // 7FF79E3EA93C
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + ), (PVOID)ReturnFalseHook, nullptr); // 7FF7E556CF40
// Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + ), (PVOID)ReturnFalseHook, nullptr);
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x41624C8), (PVOID)ActivatePhaseAtIndexHook, (PVOID*)&ActivatePhaseAtIndexOriginal); // 7FF79E3E24C8
}
@@ -520,7 +531,7 @@ DWORD WINAPI Main(LPVOID)
if (Fortnite_Version != 22.4)
{
auto matchmaking = Memcury::Scanner::FindPattern("83 BD ? ? ? ? 01 7F 18 49 8D 4D D8 48 8B D6 E8 ? ? ? ? 48").Get();
auto matchmaking = Memcury::Scanner::FindPattern("83 BD ? ? ? ? 01 7F 18 49 8D 4D D8 48 8B D6 E8 ? ? ? ? 48", false).Get();
matchmaking = matchmaking ? matchmaking : Memcury::Scanner::FindPattern("83 7D 88 01 7F 0D 48 8B CE E8").Get();
@@ -997,6 +1008,12 @@ DWORD WINAPI Main(LPVOID)
static auto GameplayEventDataSize = FindObject<UStruct>(L"/Script/GameplayAbilities.GameplayEventData")->GetPropertiesSize();
LOG_INFO(LogDev, "GameplayEventDataSize: 0x{:x} {}", GameplayEventDataSize, GameplayEventDataSize);
if (Fortnite_Version == 1.11 || Fortnite_Version > 1.8)
{
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawn.ServerReviveFromDBNO"),
AFortPlayerPawn::ServerReviveFromDBNOHook, nullptr, false);
}
{
int increaseOffset = 0x10;

View File

@@ -396,6 +396,32 @@ static inline std::vector<Event> Events =
17.30
),
Event
(
"Operation: Sky Fire",
"",
"",
0,
{
},
{
{
{
false,
// "/Buffet/Gameplay/Blueprints/BP_Buffet_Master_Scripting.BP_Buffet_Master_Scripting_C.startevent"
"/Script/SpecialEventGameplayRuntime.SpecialEventScript.StartEventAtIndex"
},
0
}
},
"/Kiwi/Gameplay/Kiwi_EventScript.Kiwi_EventScript_C",
// "/Buffet/Gameplay/Blueprints/BP_Buffet_Master_Scripting.BP_Buffet_Master_Scripting_C",
"/KiwiPlaylist/Playlists/Playlist_Kiwi.Playlist_Kiwi",
17.50
),
Event
(
"Ice King Event",
"/Game/Athena/Prototype/Blueprints/Mooney/BP_MooneyLoader.BP_MooneyLoader_C",

View File

@@ -439,7 +439,7 @@ static inline uint64 FindOnRep_ZiplineState()
return 0;
}
static inline uint64 FindGetMaxTickRate() // Uengine::getmaxtickrate
static inline uint64 FindGetMaxTickRate() // UEngine::getmaxtickrate
{
// TODO switch to index maybe?
@@ -455,6 +455,9 @@ static inline uint64 FindGetMaxTickRate() // Uengine::getmaxtickrate
if (Engine_Version == 500)
return Memcury::Scanner::FindPattern("40 53 48 83 EC 50 0F 29 74 24 ? 48 8B D9 0F 29 7C 24 ? 0F 28 F9 44 0F 29").Get(); // the string is in func + it's in function chunks.
if (Engine_Version == 427)
return Memcury::Scanner::FindPattern("40 53 48 83 EC 60 0F 29 74 24 ? 48 8B D9 0F 29 7C 24 ? 0F 28").Get(); // function chunks woo!
auto Addrr = Memcury::Scanner::FindStringRef(L"Hitching by request!").Get();
if (!Addrr)
@@ -1129,8 +1132,12 @@ static inline uint64 FindActorGetNetMode()
if (Engine_Version == 427)
{
// note this sig doesnt work on s18
return Memcury::Scanner::FindPattern("48 89 5C 24 ? 57 48 83 EC 20 48 8B D9 E8 ? ? ? ? 48 8B 93 ? ? ? ? 48 8B C8 48 8B F8 E8 ? ? ? ? 48 85 C0 75 29").Get();
auto addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 57 48 83 EC 20 48 8B D9 E8 ? ? ? ? 48 8B 93 ? ? ? ? 48 8B C8 48 8B F8 E8 ? ? ? ? 48 85 C0 75 29", false).Get();
if (!addr)
addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 57 48 83 EC 20 F6 41 08 10 48 8B D9 0F 85 ? ? ? ? 48 8B 41 20 48 85 C0 0F 84").Get(); // 17.50 & 18.40
return addr;
}
auto AActorGetNetmodeStrRef = Memcury::Scanner::FindStringRef(L"STAT_ServerUpdateCamera", false);

View File

@@ -35,4 +35,5 @@ extern inline std::string PlaylistName =
// "/Game/Athena/Playlists/Low/Playlist_Low_Solo.Playlist_Low_Solo";
// "/Game/Athena/Playlists/Bling/Playlist_Bling_Solo.Playlist_Bling_Solo";
// "/Game/Athena/Playlists/Creative/Playlist_PlaygroundV2.Playlist_PlaygroundV2";
// "/Game/Athena/Playlists/Ashton/Playlist_Ashton_Sm.Playlist_Ashton_Sm";
// "/Game/Athena/Playlists/Ashton/Playlist_Ashton_Sm.Playlist_Ashton_Sm";
// "/Game/Athena/Playlists/BattleLab/Playlist_BattleLab.Playlist_BattleLab";

View File

@@ -71,6 +71,7 @@ extern inline bool bEnableCombinePickup = false;
extern inline int AmountOfBotsToSpawn = 0;
extern inline bool bEnableRebooting = false;
extern inline bool bEngineDebugLogs = false;
extern inline int AmountOfHealthSiphon = 0;
// THE BASE CODE IS FROM IMGUI GITHUB
@@ -277,13 +278,18 @@ static inline void StaticUI()
{
// ImGui::Checkbox("Auto Restart", &Globals::bAutoRestart);
if (Globals::bAutoRestart)
if (false)
{
ImGui::InputFloat(std::format("How long after {} players join the bus will start", NumRequiredPlayersToStart).c_str(), &AutoBusStartSeconds);
ImGui::InputInt("How many players required to join for bus auto timer to start", &NumRequiredPlayersToStart);
if (Globals::bAutoRestart)
{
ImGui::InputFloat(std::format("How long after {} players join the bus will start", NumRequiredPlayersToStart).c_str(), &AutoBusStartSeconds);
ImGui::InputInt("Num Players required for bus auto timer", &NumRequiredPlayersToStart);
}
}
}
ImGui::InputInt("Shield/Health for siphon", &AmountOfHealthSiphon);
#ifndef PROD
ImGui::Checkbox("Log ProcessEvent", &Globals::bLogProcessEvent);
// ImGui::InputInt("Amount of bots to spawn", &AmountOfBotsToSpawn);