mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
a bit
print mutators, fix clear aircraft on 4.1, do a scuffed fix for pickup animation on s3-s5
This commit is contained in:
@@ -124,13 +124,13 @@ FRotator AActor::GetActorRotation()
|
||||
|
||||
void AActor::FlushNetDormancy()
|
||||
{
|
||||
static auto fn = FindObject<UFunction>("/Script/Engine.Actor.FlushNetDormancy");
|
||||
static auto fn = FindObject<UFunction>(L"/Script/Engine.Actor.FlushNetDormancy");
|
||||
this->ProcessEvent(fn);
|
||||
}
|
||||
|
||||
bool AActor::TeleportTo(const FVector& DestLocation, const FRotator& DestRotation)
|
||||
{
|
||||
static auto fn = FindObject<UFunction>("/Script/Engine.Actor.K2_TeleportTo");
|
||||
static auto fn = FindObject<UFunction>(L"/Script/Engine.Actor.K2_TeleportTo");
|
||||
struct
|
||||
{
|
||||
struct FVector DestLocation; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
@@ -157,13 +157,13 @@ bool AActor::IsNetStartup()
|
||||
|
||||
void AActor::SetOwner(AActor* Owner)
|
||||
{
|
||||
static auto SetOwnerFn = FindObject<UFunction>("/Script/Engine.Actor.SetOwner");
|
||||
static auto SetOwnerFn = FindObject<UFunction>(L"/Script/Engine.Actor.SetOwner");
|
||||
this->ProcessEvent(SetOwnerFn, &Owner);
|
||||
}
|
||||
|
||||
void AActor::ForceNetUpdate()
|
||||
{
|
||||
static auto ForceNetUpdateFn = FindObject<UFunction>("/Script/Engine.Actor.ForceNetUpdate");
|
||||
static auto ForceNetUpdateFn = FindObject<UFunction>(L"/Script/Engine.Actor.ForceNetUpdate");
|
||||
this->ProcessEvent(ForceNetUpdateFn);
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ const AActor* AActor::GetNetOwner() const
|
||||
|
||||
void AActor::GetActorEyesViewPoint(FVector* OutLocation, FRotator* OutRotation) const
|
||||
{
|
||||
static auto GetActorEyesViewPointFn = FindObject<UFunction>("/Script/Engine.Actor.GetActorEyesViewPoint");
|
||||
static auto GetActorEyesViewPointFn = FindObject<UFunction>(L"/Script/Engine.Actor.GetActorEyesViewPoint");
|
||||
struct
|
||||
{
|
||||
struct FVector OutLocation; // (Parm, OutParm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
|
||||
|
||||
@@ -553,6 +553,8 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
|
||||
// return false;
|
||||
|
||||
LoopMutators([&](AFortAthenaMutator* Mutator) { LOG_INFO(LogGame, "Mutator {}", Mutator->GetPathName()); });
|
||||
|
||||
Globals::AmountOfListens++;
|
||||
Globals::bStartedListening = true;
|
||||
}
|
||||
|
||||
@@ -145,7 +145,7 @@ static void ShowFoundation(AActor* BuildingFoundation, bool bShow = true)
|
||||
if (FoundationEnabledStateOffset != -1)
|
||||
BuildingFoundation->Get<uint8_t>(FoundationEnabledStateOffset) = bShow ? Enabled : Disabled;
|
||||
|
||||
SetFoundationTransform(BuildingFoundation, BuildingFoundation->GetTransform()); // idk
|
||||
// SetFoundationTransform(BuildingFoundation, BuildingFoundation->GetTransform()); // idk
|
||||
|
||||
static auto LevelToStreamOffset = BuildingFoundation->GetOffset("LevelToStream");
|
||||
auto& LevelToStream = BuildingFoundation->Get<FName>(LevelToStreamOffset);
|
||||
|
||||
@@ -140,6 +140,7 @@ struct FFortItemEntry : FFastArraySerializerItem
|
||||
Entry->GetItemDefinition() = ItemDefinition;
|
||||
Entry->GetCount() = Count;
|
||||
Entry->GetLoadedAmmo() = LoadedAmmo;
|
||||
// Entry->bUpdateStatsOnCollection = true; // Idk what this does but fortnite does it soo
|
||||
|
||||
return Entry;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
UFortItem* UFortItemDefinition::CreateTemporaryItemInstanceBP(int Count, int Level)
|
||||
{
|
||||
static auto CreateTemporaryItemInstanceBPFunction = FindObject<UFunction>(L"/Script/FortniteGame.FortItemDefinition.CreateTemporaryItemInstanceBP");
|
||||
struct { int Count; int Level; UFortItem* ReturnValue; } CreateTemporaryItemInstanceBP_Params{ Count, 1 };
|
||||
struct { int Count; int Level; UFortItem* ReturnValue; } CreateTemporaryItemInstanceBP_Params{ Count, Level };
|
||||
|
||||
ProcessEvent(CreateTemporaryItemInstanceBPFunction, &CreateTemporaryItemInstanceBP_Params);
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
class UFortItemDefinition : public UObject
|
||||
{
|
||||
public:
|
||||
UFortItem* CreateTemporaryItemInstanceBP(int Count, int Level = 1);
|
||||
UFortItem* CreateTemporaryItemInstanceBP(int Count, int Level = 1); // Should Level be 20?
|
||||
float GetMaxStackSize();
|
||||
|
||||
bool DoesAllowMultipleStacks()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "FortGameModePickup.h"
|
||||
#include "FortPlayerController.h"
|
||||
#include <memcury.h>
|
||||
#include "GameplayStatics.h"
|
||||
|
||||
void AFortPickup::TossPickup(FVector FinalLocation, AFortPawn* ItemOwner, int OverrideMaxStackCount, bool bToss, EFortPickupSourceTypeFlag InPickupSourceTypeFlags, EFortPickupSpawnSource InPickupSpawnSource)
|
||||
{
|
||||
@@ -19,10 +20,23 @@ void AFortPickup::TossPickup(FVector FinalLocation, AFortPawn* ItemOwner, int Ov
|
||||
this->ProcessEvent(fn, &AFortPickup_TossPickup_Params);
|
||||
}
|
||||
|
||||
void AFortPickup::SpawnMovementComponent()
|
||||
{
|
||||
static auto ProjectileMovementComponentClass = FindObject<UClass>("/Script/Engine.ProjectileMovementComponent"); // UFortProjectileMovementComponent
|
||||
|
||||
static auto MovementComponentOffset = this->GetOffset("MovementComponent");
|
||||
this->Get(MovementComponentOffset) = UGameplayStatics::SpawnObject(ProjectileMovementComponentClass, this);
|
||||
}
|
||||
|
||||
AFortPickup* AFortPickup::SpawnPickup(FFortItemEntry* ItemEntry, FVector Location,
|
||||
EFortPickupSourceTypeFlag PickupSource, EFortPickupSpawnSource SpawnSource,
|
||||
class AFortPawn* Pawn, UClass* OverrideClass, bool bToss, int OverrideCount)
|
||||
{
|
||||
if (bToss)
|
||||
{
|
||||
PickupSource |= EFortPickupSourceTypeFlag::Tossed;
|
||||
}
|
||||
|
||||
// static auto FortPickupClass = FindObject<UClass>(L"/Script/FortniteGame.FortPickup");
|
||||
static auto FortPickupAthenaClass = FindObject<UClass>(L"/Script/FortniteGame.FortPickupAthena");
|
||||
auto PlayerState = Pawn ? Cast<AFortPlayerState>(Pawn->GetPlayerState()) : nullptr;
|
||||
@@ -39,11 +53,12 @@ AFortPickup* AFortPickup::SpawnPickup(FFortItemEntry* ItemEntry, FVector Locatio
|
||||
|
||||
if (Addresses::PickupInitialize)
|
||||
{
|
||||
static void (*SetupPickup)(AFortPickup * Pickup, __int64 ItemEntry, TArray<__int64> MultiItemPickupEntriesIGuess, bool bSplitOnPickup)
|
||||
static void (*SetupPickup)(AFortPickup* Pickup, __int64 ItemEntry, TArray<__int64> MultiItemPickupEntriesIGuess, bool bSplitOnPickup)
|
||||
= decltype(SetupPickup)(Addresses::PickupInitialize);
|
||||
|
||||
TArray<__int64> MultiItemPickupEntriesIGuess{};
|
||||
SetupPickup(Pickup, __int64(ItemEntry), MultiItemPickupEntriesIGuess, false);
|
||||
MultiItemPickupEntriesIGuess.Free();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -59,6 +74,11 @@ AFortPickup* AFortPickup::SpawnPickup(FFortItemEntry* ItemEntry, FVector Locatio
|
||||
PrimaryPickupItemEntry->GetLoadedAmmo() = ItemEntry->GetLoadedAmmo();
|
||||
}
|
||||
}
|
||||
|
||||
static auto PickupSourceTypeFlagsOffset = Pickup->GetOffset("PickupSourceTypeFlags", false);
|
||||
|
||||
if (PickupSourceTypeFlagsOffset != -1)
|
||||
Pickup->Get<int32>(PickupSourceTypeFlagsOffset) |= (int)PickupSource;
|
||||
|
||||
PrimaryPickupItemEntry->GetCount() = OverrideCount == -1 ? ItemEntry->GetCount() : OverrideCount;
|
||||
|
||||
@@ -69,11 +89,6 @@ AFortPickup* AFortPickup::SpawnPickup(FFortItemEntry* ItemEntry, FVector Locatio
|
||||
// static auto OptionalOwnerIDOffset = Pickup->GetOffset("OptionalOwnerID");
|
||||
// Pickup->Get<int>(OptionalOwnerIDOffset) = PlayerState ? PlayerState->GetWorldPlayerId() : -1;
|
||||
|
||||
if (bToss)
|
||||
{
|
||||
PickupSource |= EFortPickupSourceTypeFlag::Tossed;
|
||||
}
|
||||
|
||||
Pickup->TossPickup(Location, Pawn, 0, bToss, PickupSource, SpawnSource);
|
||||
|
||||
if (PickupSource == EFortPickupSourceTypeFlag::Container) // crashes if we do this then tosspickup
|
||||
@@ -83,6 +98,11 @@ AFortPickup* AFortPickup::SpawnPickup(FFortItemEntry* ItemEntry, FVector Locatio
|
||||
// Pickup->OnRep_TossedFromContainer();
|
||||
}
|
||||
|
||||
if (Fortnite_Version < 6)
|
||||
{
|
||||
Pickup->SpawnMovementComponent();
|
||||
}
|
||||
|
||||
return Pickup;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ public:
|
||||
static inline char (*CompletePickupAnimationOriginal)(AFortPickup* Pickup);
|
||||
|
||||
void TossPickup(FVector FinalLocation, class AFortPawn* ItemOwner, int OverrideMaxStackCount, bool bToss, EFortPickupSourceTypeFlag InPickupSourceTypeFlags, EFortPickupSpawnSource InPickupSpawnSource);
|
||||
void SpawnMovementComponent(); // BAD You probably don't wanna use unless absolutely necessary
|
||||
|
||||
void OnRep_PrimaryPickupItemEntry()
|
||||
{
|
||||
|
||||
@@ -440,8 +440,8 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerDropAllItems"),
|
||||
AFortPlayerController::ServerDropAllItemsHook, nullptr, false);
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault,
|
||||
FindObject<UFunction>("/Script/FortniteGame.FortPlayerController.ServerSpawnInventoryDrop")
|
||||
? FindObject<UFunction>("/Script/FortniteGame.FortPlayerController.ServerSpawnInventoryDrop") : FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerAttemptInventoryDrop"),
|
||||
FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerSpawnInventoryDrop")
|
||||
? FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerSpawnInventoryDrop") : FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerAttemptInventoryDrop"),
|
||||
AFortPlayerController::ServerAttemptInventoryDropHook, nullptr, false);
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerCheat"),
|
||||
ServerCheatHook, nullptr, false);
|
||||
@@ -510,11 +510,11 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook(FortGameplayAbilityAthena_PeriodicItemGrantDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortGameplayAbilityAthena_PeriodicItemGrant.StartItemAwardTimers"),
|
||||
UFortGameplayAbilityAthena_PeriodicItemGrant::StartItemAwardTimersHook, (PVOID*)&UFortGameplayAbilityAthena_PeriodicItemGrant::StartItemAwardTimersOriginal, false, true);
|
||||
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_Barrier>("/Script/FortniteGame.Default__FortAthenaMutator_Barrier"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_Barrier.OnGamePhaseStepChanged"),
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_Barrier>(L"/Script/FortniteGame.Default__FortAthenaMutator_Barrier"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_Barrier.OnGamePhaseStepChanged"),
|
||||
AFortAthenaMutator_Barrier::OnGamePhaseStepChangedHook, (PVOID*)&AFortAthenaMutator_Barrier::OnGamePhaseStepChangedOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_Disco>("/Script/FortniteGame.Default__FortAthenaMutator_Disco"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_Disco.OnGamePhaseStepChanged"),
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_Disco>(L"/Script/FortniteGame.Default__FortAthenaMutator_Disco"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_Disco.OnGamePhaseStepChanged"),
|
||||
AFortAthenaMutator_Disco::OnGamePhaseStepChangedHook, (PVOID*)&AFortAthenaMutator_Disco::OnGamePhaseStepChangedOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_GiveItemsAtGamePhaseStep>("/Script/FortniteGame.Default__FortAthenaMutator_GiveItemsAtGamePhaseStep"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_GiveItemsAtGamePhaseStep.OnGamePhaseStepChanged"),
|
||||
Hooking::MinHook::Hook(FindObject<AFortAthenaMutator_GiveItemsAtGamePhaseStep>(L"/Script/FortniteGame.Default__FortAthenaMutator_GiveItemsAtGamePhaseStep"), FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaMutator_GiveItemsAtGamePhaseStep.OnGamePhaseStepChanged"),
|
||||
AFortAthenaMutator_GiveItemsAtGamePhaseStep::OnGamePhaseStepChangedHook, (PVOID*)&AFortAthenaMutator_GiveItemsAtGamePhaseStep::OnGamePhaseStepChangedOriginal, false, true);
|
||||
|
||||
Hooking::MinHook::Hook(FortKismetLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.K2_GiveItemToPlayer"),
|
||||
@@ -530,7 +530,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, NetMulticast_Athena_BatchedDamageCuesFn,
|
||||
AFortPawn::NetMulticast_Athena_BatchedDamageCuesHook, (PVOID*)&AFortPawn::NetMulticast_Athena_BatchedDamageCuesOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, FindObject<UFunction>("/Script/FortniteGame.FortPawn.MovingEmoteStopped"),
|
||||
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPawn.MovingEmoteStopped"),
|
||||
AFortPawn::MovingEmoteStoppedHook, (PVOID*)&AFortPawn::MovingEmoteStoppedOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FortPlayerPawnAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawnAthena.OnCapsuleBeginOverlap") ? FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawnAthena.OnCapsuleBeginOverlap") : FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawn.OnCapsuleBeginOverlap"),
|
||||
AFortPlayerPawnAthena::OnCapsuleBeginOverlapHook, (PVOID*)&AFortPlayerPawnAthena::OnCapsuleBeginOverlapOriginal, false, true);
|
||||
@@ -603,7 +603,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook(InventoryManagementLibraryDefault, FindObject<UFunction>(L"/Script/FortniteGame.InventoryManagementLibrary.SwapItems"),
|
||||
UInventoryManagementLibrary::SwapItemsHook, (PVOID*)&UInventoryManagementLibrary::SwapItemsOriginal, false, true);
|
||||
|
||||
static auto ServerHandlePickupInfoFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerPawn.ServerHandlePickupInfo");
|
||||
static auto ServerHandlePickupInfoFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerPawn.ServerHandlePickupInfo");
|
||||
|
||||
if (ServerHandlePickupInfoFn)
|
||||
{
|
||||
@@ -615,7 +615,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
AFortPlayerPawn::ServerHandlePickupHook, nullptr, false);
|
||||
}
|
||||
|
||||
static auto PredictionKeyStruct = FindObject<UStruct>("/Script/GameplayAbilities.PredictionKey");
|
||||
static auto PredictionKeyStruct = FindObject<UStruct>(L"/Script/GameplayAbilities.PredictionKey");
|
||||
static auto PredictionKeySize = PredictionKeyStruct->GetPropertiesSize();
|
||||
|
||||
{
|
||||
@@ -623,7 +623,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
|
||||
if (Engine_Version > 420)
|
||||
{
|
||||
static auto OnRep_ReplicatedAnimMontageFn = FindObject<UFunction>("/Script/GameplayAbilities.AbilitySystemComponent.OnRep_ReplicatedAnimMontage");
|
||||
static auto OnRep_ReplicatedAnimMontageFn = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.OnRep_ReplicatedAnimMontage");
|
||||
InternalServerTryActivateAbilityIndex = (GetFunctionIdxOrPtr(OnRep_ReplicatedAnimMontageFn) - 8) / 8;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -722,7 +722,7 @@ static inline uint64 FindEnterAircraft()
|
||||
return Addr - i;
|
||||
} */
|
||||
|
||||
if (*(uint8_t*)(uint8_t*)(Addr - i) == 0x48 && *(uint8_t*)(uint8_t*)(Addr - i + 1) == 0x89 && *(uint8_t*)(uint8_t*)(Addr - i + 2) == 0x5C && *(uint8_t*)(uint8_t*)(Addr - i + 3) == 0x74) // 4.1
|
||||
if (*(uint8_t*)(uint8_t*)(Addr - i) == 0x48 && *(uint8_t*)(uint8_t*)(Addr - i + 1) == 0x89 && *(uint8_t*)(uint8_t*)(Addr - i + 2) == 0x74) // 4.1
|
||||
{
|
||||
return Addr - i;
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ inline void InitLogger()
|
||||
MakeLogger("LogCreative");
|
||||
MakeLogger("LogZone");
|
||||
MakeLogger("LogReplication");
|
||||
MakeLogger("LogMutator");
|
||||
MakeLogger("LogVehicles");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user