mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
fix winning 1.11, added cheat listplayers
This commit is contained in:
@@ -693,6 +693,8 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
|||||||
|
|
||||||
bool bPrintWarmup = false;
|
bool bPrintWarmup = false;
|
||||||
|
|
||||||
|
if (false)
|
||||||
|
{
|
||||||
for (int i = 0; i < SpawnIsland_FloorLoot_Actors.Num(); i++)
|
for (int i = 0; i < SpawnIsland_FloorLoot_Actors.Num(); i++)
|
||||||
{
|
{
|
||||||
ABuildingContainer* CurrentActor = (ABuildingContainer*)SpawnIsland_FloorLoot_Actors.at(i);
|
ABuildingContainer* CurrentActor = (ABuildingContainer*)SpawnIsland_FloorLoot_Actors.at(i);
|
||||||
@@ -718,6 +720,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
|||||||
|
|
||||||
CurrentActor->K2_DestroyActor();
|
CurrentActor->K2_DestroyActor();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool bPrint = false;
|
bool bPrint = false;
|
||||||
|
|
||||||
@@ -750,10 +753,10 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
|||||||
|
|
||||||
// SpawnIsland_FloorLoot_Actors.Free();
|
// SpawnIsland_FloorLoot_Actors.Free();
|
||||||
// BRIsland_FloorLoot_Actors.Free();
|
// BRIsland_FloorLoot_Actors.Free();
|
||||||
}
|
|
||||||
|
|
||||||
LOG_INFO(LogDev, "Spawned loot!");
|
LOG_INFO(LogDev, "Spawned loot!");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (Engine_Version >= 423 && Fortnite_Version <= 12.41) // 423+ we need to spawn manually and vehicle sync doesn't work on >S13.
|
if (Engine_Version >= 423 && Fortnite_Version <= 12.41) // 423+ we need to spawn manually and vehicle sync doesn't work on >S13.
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ bool AFortGameStateAthena::IsRespawningAllowed(AFortPlayerState* PlayerState) //
|
|||||||
|
|
||||||
if (!IsRespawningAllowedFn)
|
if (!IsRespawningAllowedFn)
|
||||||
{
|
{
|
||||||
auto CurrentPlaylist = GetCurrentPlaylist();
|
static auto CurrentPlaylistDataOffset = GetOffset("CurrentPlaylistData", false);
|
||||||
|
auto CurrentPlaylist = CurrentPlaylistDataOffset == -1 && Fortnite_Version < 6 ? nullptr : GetCurrentPlaylist();
|
||||||
|
|
||||||
if (!CurrentPlaylist)
|
if (!CurrentPlaylist)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -623,7 +623,7 @@ void AFortPlayerController::ServerPlayEmoteItemHook(AFortPlayerController* Playe
|
|||||||
GiveAbilityAndActivateOnce(PlayerState->GetAbilitySystemComponent(), &outHandle, __int64(Spec), nullptr);
|
GiveAbilityAndActivateOnce(PlayerState->GetAbilitySystemComponent(), &outHandle, __int64(Spec), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 ToDeathCause(const FGameplayTagContainer& TagContainer, bool bWasDBNO = false)
|
uint8 ToDeathCause(const FGameplayTagContainer& TagContainer, bool bWasDBNO = false, AFortPawn* Pawn = nullptr)
|
||||||
{
|
{
|
||||||
static auto ToDeathCauseFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerStateAthena.ToDeathCause");
|
static auto ToDeathCauseFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerStateAthena.ToDeathCause");
|
||||||
|
|
||||||
@@ -649,6 +649,8 @@ uint8 ToDeathCause(const FGameplayTagContainer& TagContainer, bool bWasDBNO = fa
|
|||||||
{
|
{
|
||||||
bHaveFoundAddress = true;
|
bHaveFoundAddress = true;
|
||||||
|
|
||||||
|
if (Engine_Version == 419)
|
||||||
|
Addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 48 89 74 24 ? 57 48 83 EC 20 41 0F B6 F8 48 8B DA 48 8B F1 E8 ? ? ? ? 33 ED").Get();
|
||||||
if (Engine_Version == 420)
|
if (Engine_Version == 420)
|
||||||
Addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 0F B6 FA 48 8B D9 E8 ? ? ? ? 33 F6 48 89 74 24").Get();
|
Addr = Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 0F B6 FA 48 8B D9 E8 ? ? ? ? 33 F6 48 89 74 24").Get();
|
||||||
|
|
||||||
@@ -667,6 +669,12 @@ uint8 ToDeathCause(const FGameplayTagContainer& TagContainer, bool bWasDBNO = fa
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Engine_Version == 419)
|
||||||
|
{
|
||||||
|
static uint8(*sub_7FF7AB499410)(AFortPawn* Pawn, FGameplayTagContainer TagContainer, char bWasDBNOIg) = decltype(sub_7FF7AB499410)(Addr);
|
||||||
|
return sub_7FF7AB499410(Pawn, TagContainer, bWasDBNO);
|
||||||
|
}
|
||||||
|
|
||||||
static uint8 (*sub_7FF7AB499410)(FGameplayTagContainer TagContainer, char bWasDBNOIg) = decltype(sub_7FF7AB499410)(Addr);
|
static uint8 (*sub_7FF7AB499410)(FGameplayTagContainer TagContainer, char bWasDBNOIg) = decltype(sub_7FF7AB499410)(Addr);
|
||||||
return sub_7FF7AB499410(TagContainer, bWasDBNO);
|
return sub_7FF7AB499410(TagContainer, bWasDBNO);
|
||||||
}
|
}
|
||||||
@@ -698,7 +706,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
|||||||
|
|
||||||
// LOG_INFO(LogDev, "Tags: {}", Tags.ToStringSimple(true));
|
// LOG_INFO(LogDev, "Tags: {}", Tags.ToStringSimple(true));
|
||||||
|
|
||||||
auto DeathCause = ToDeathCause(Tags, false); // DeadPawn->IsDBNO() ??
|
auto DeathCause = ToDeathCause(Tags, false, DeadPawn); // DeadPawn->IsDBNO() ??
|
||||||
|
|
||||||
LOG_INFO(LogDev, "DeathCause: {}", (int)DeathCause);
|
LOG_INFO(LogDev, "DeathCause: {}", (int)DeathCause);
|
||||||
|
|
||||||
@@ -722,6 +730,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (MemberOffsets::DeathInfo::Distance != -1)
|
||||||
*(float*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::Distance) = KillerPawn ? KillerPawn->GetDistanceTo(DeadPawn) : 0;
|
*(float*)(__int64(DeathInfo) + MemberOffsets::DeathInfo::Distance) = KillerPawn ? KillerPawn->GetDistanceTo(DeadPawn) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -819,6 +828,8 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
|||||||
static auto FortProjectileBaseClass = FindObject<UClass>("/Script/FortniteGame.FortProjectileBase");
|
static auto FortProjectileBaseClass = FindObject<UClass>("/Script/FortniteGame.FortProjectileBase");
|
||||||
LOG_INFO(LogDev, "FortProjectileBaseClass: {}", __int64(FortProjectileBaseClass));
|
LOG_INFO(LogDev, "FortProjectileBaseClass: {}", __int64(FortProjectileBaseClass));
|
||||||
|
|
||||||
|
if (DamageCauser)
|
||||||
|
{
|
||||||
if (DamageCauser->IsA(FortProjectileBaseClass))
|
if (DamageCauser->IsA(FortProjectileBaseClass))
|
||||||
{
|
{
|
||||||
LOG_INFO(LogDev, "From a projectile!");
|
LOG_INFO(LogDev, "From a projectile!");
|
||||||
@@ -829,6 +840,7 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
|||||||
LOG_INFO(LogDev, "From a weapon!");
|
LOG_INFO(LogDev, "From a weapon!");
|
||||||
KillerWeaponDef = Weapon->GetWeaponData();
|
KillerWeaponDef = Weapon->GetWeaponData();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// LOG_INFO(LogDev, "KillerWeaponDef: {}", KillerWeaponDef ? KillerWeaponDef->GetFullName() : "InvalidObject");
|
// LOG_INFO(LogDev, "KillerWeaponDef: {}", KillerWeaponDef ? KillerWeaponDef->GetFullName() : "InvalidObject");
|
||||||
|
|
||||||
@@ -838,11 +850,11 @@ void AFortPlayerController::ClientOnPawnDiedHook(AFortPlayerController* PlayerCo
|
|||||||
{
|
{
|
||||||
LOG_INFO(LogDev, "Starting Spectating!");
|
LOG_INFO(LogDev, "Starting Spectating!");
|
||||||
|
|
||||||
/* static auto PlayerToSpectateOnDeathOffset = PlayerController->GetOffset("PlayerToSpectateOnDeath");
|
static auto PlayerToSpectateOnDeathOffset = PlayerController->GetOffset("PlayerToSpectateOnDeath");
|
||||||
PlayerController->Get<APawn*>(PlayerToSpectateOnDeathOffset) = KillerPawn;
|
PlayerController->Get<APawn*>(PlayerToSpectateOnDeathOffset) = KillerPawn;
|
||||||
|
|
||||||
static auto SpectateOnDeathFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerZone.SpectateOnDeath") ? FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerZone.SpectateOnDeath") : FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerAthena.SpectateOnDeath");
|
static auto SpectateOnDeathFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerZone.SpectateOnDeath") ? FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerZone.SpectateOnDeath") : FindObject<UFunction>("/Script/FortniteGame.FortPlayerControllerAthena.SpectateOnDeath");
|
||||||
PlayerController->ProcessEvent(SpectateOnDeathFn); */
|
PlayerController->ProcessEvent(SpectateOnDeathFn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,27 @@ void ServerCheatHook(AFortPlayerControllerAthena* PlayerController, FString Msg)
|
|||||||
|
|
||||||
SendMessageToConsole(PlayerController, L"Granted item!");
|
SendMessageToConsole(PlayerController, L"Granted item!");
|
||||||
}
|
}
|
||||||
|
else if (Command == "listplayers")
|
||||||
|
{
|
||||||
|
std::string PlayerNames;
|
||||||
|
|
||||||
|
for (int i = 0; i < ClientConnections.Num(); i++)
|
||||||
|
{
|
||||||
|
auto CurrentPlayerController = Cast<AFortPlayerControllerAthena>(ClientConnections.at(i)->Get("PlayerController"));
|
||||||
|
|
||||||
|
if (!CurrentPlayerController)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
auto CurrentPlayerState = Cast<AFortPlayerStateAthena>(CurrentPlayerController->GetPlayerState());
|
||||||
|
|
||||||
|
if (!CurrentPlayerState)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
PlayerNames += "\"" + CurrentPlayerState->GetPlayerName().ToString() + "\" ";
|
||||||
|
}
|
||||||
|
|
||||||
|
SendMessageToConsole(PlayerController, std::wstring(PlayerNames.begin(), PlayerNames.end()).c_str());
|
||||||
|
}
|
||||||
else if (Command == "launch")
|
else if (Command == "launch")
|
||||||
{
|
{
|
||||||
if (Arguments.size() <= 3)
|
if (Arguments.size() <= 3)
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
|
|
||||||
AddVehicleHook();
|
AddVehicleHook();
|
||||||
|
|
||||||
if (Fortnite_Version > 1.8)
|
if (Fortnite_Version > 1.8 || Fortnite_Version == 1.11)
|
||||||
{
|
{
|
||||||
LOG_INFO(LogDev, "ahh!");
|
LOG_INFO(LogDev, "ahh!");
|
||||||
LOG_INFO(LogDev, "Test: 0x{:x}", FindFunctionCall(L"ClientOnPawnDied") - __int64(GetModuleHandleW(0)));
|
LOG_INFO(LogDev, "Test: 0x{:x}", FindFunctionCall(L"ClientOnPawnDied") - __int64(GetModuleHandleW(0)));
|
||||||
@@ -587,7 +587,7 @@ DWORD WINAPI Main(LPVOID)
|
|||||||
MemberOffsets::DeathInfo::bDBNO = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "bDBNO");
|
MemberOffsets::DeathInfo::bDBNO = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "bDBNO");
|
||||||
MemberOffsets::DeathInfo::DeathCause = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "DeathCause");
|
MemberOffsets::DeathInfo::DeathCause = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "DeathCause");
|
||||||
MemberOffsets::DeathInfo::bInitialized = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "bInitialized", false);
|
MemberOffsets::DeathInfo::bInitialized = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "bInitialized", false);
|
||||||
MemberOffsets::DeathInfo::Distance = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "Distance");
|
MemberOffsets::DeathInfo::Distance = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "Distance", false);
|
||||||
MemberOffsets::DeathInfo::DeathTags = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "DeathTags", false);
|
MemberOffsets::DeathInfo::DeathTags = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "DeathTags", false);
|
||||||
MemberOffsets::DeathInfo::DeathLocation = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "DeathLocation", false);
|
MemberOffsets::DeathInfo::DeathLocation = FindOffsetStruct("/Script/FortniteGame.DeathInfo", "DeathLocation", false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user