mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
legacy
fixed pickaxes with mcp, 1.11 fixed
This commit is contained in:
@@ -120,6 +120,12 @@ void AActor::SetOwner(AActor* Owner)
|
||||
this->ProcessEvent(SetOwnerFn, &Owner);
|
||||
}
|
||||
|
||||
void AActor::ForceNetUpdate()
|
||||
{
|
||||
static auto ForceNetUpdateFn = FindObject<UFunction>("/Script/Engine.Actor.ForceNetUpdate");
|
||||
this->ProcessEvent(ForceNetUpdateFn);
|
||||
}
|
||||
|
||||
bool AActor::IsAlwaysRelevant()
|
||||
{
|
||||
static auto bAlwaysRelevantOffset = GetOffset("bAlwaysRelevant");
|
||||
|
||||
@@ -24,6 +24,7 @@ public:
|
||||
bool CanBeDamaged();
|
||||
void SetCanBeDamaged(bool NewValue);
|
||||
void SetOwner(AActor* Owner);
|
||||
|
||||
void ForceNetUpdate();
|
||||
|
||||
static class UClass* StaticClass();
|
||||
};
|
||||
@@ -806,6 +806,8 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
|
||||
Parts[(int)EFortCustomPartType::Head] = headPart;
|
||||
Parts[(int)EFortCustomPartType::Body] = bodyPart;
|
||||
|
||||
// if (Fortnite_Version > 2.5)
|
||||
Parts[(int)EFortCustomPartType::Backpack] = backpackPart;
|
||||
|
||||
static auto OnRep_CharacterPartsFn = FindObject<UFunction>("/Script/FortniteGame.FortPlayerState.OnRep_CharacterParts");
|
||||
@@ -1057,21 +1059,10 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
|
||||
LOG_INFO(LogDev, "HandleStartingNewPlayer end");
|
||||
|
||||
if (Fortnite_Version <= 2.5)
|
||||
{
|
||||
static auto QuickBarsOffset = NewPlayer->GetOffset("QuickBars", false);
|
||||
|
||||
if (QuickBarsOffset != -1)
|
||||
{
|
||||
static auto FortQuickBarsClass = FindObject<UClass>("/Script/FortniteGame.FortQuickBars");
|
||||
NewPlayer->Get<AActor*>(QuickBarsOffset) = GetWorld()->SpawnActor<AActor>(FortQuickBarsClass);
|
||||
NewPlayer->Get<AActor*>(QuickBarsOffset)->SetOwner(NewPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
if (Engine_Version <= 420) // not sure if needed on s3-s4
|
||||
if (Engine_Version <= 420)
|
||||
{
|
||||
static auto OverriddenBackpackSizeOffset = NewPlayer->GetOffset("OverriddenBackpackSize");
|
||||
// LOG_INFO(LogDev, "NewPlayer->Get<int>(OverriddenBackpackSizeOffset): {}", NewPlayer->Get<int>(OverriddenBackpackSizeOffset));
|
||||
NewPlayer->Get<int>(OverriddenBackpackSizeOffset) = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -138,29 +138,32 @@ std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddI
|
||||
static auto QuickBarsOffset = FortPlayerController->GetOffset("QuickBars", false);
|
||||
auto QuickBars = FortPlayerController->Get<AActor*>(QuickBarsOffset);
|
||||
|
||||
enum class EFortQuickBars : uint8_t
|
||||
if (QuickBars)
|
||||
{
|
||||
Primary = 0,
|
||||
Secondary = 1,
|
||||
Max_None = 2,
|
||||
EFortQuickBars_MAX = 3
|
||||
};
|
||||
enum class EFortQuickBars : uint8_t
|
||||
{
|
||||
Primary = 0,
|
||||
Secondary = 1,
|
||||
Max_None = 2,
|
||||
EFortQuickBars_MAX = 3
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
FGuid Item; // (Parm, IsPlainOldData)
|
||||
EFortQuickBars InQuickBar; // (Parm, ZeroConstructor, IsPlainOldData)
|
||||
int Slot; // (Parm, ZeroConstructor, IsPlainOldData)
|
||||
struct
|
||||
{
|
||||
FGuid Item; // (Parm, IsPlainOldData)
|
||||
EFortQuickBars InQuickBar; // (Parm, ZeroConstructor, IsPlainOldData)
|
||||
int Slot; // (Parm, ZeroConstructor, IsPlainOldData)
|
||||
}
|
||||
AFortQuickBars_ServerAddItemInternal_Params
|
||||
{
|
||||
NewItemInstance->GetItemEntry()->GetItemGuid(),
|
||||
IsPrimaryQuickbar(ItemDefinition) ? EFortQuickBars::Primary : EFortQuickBars::Secondary,
|
||||
-1
|
||||
};
|
||||
|
||||
static auto ServerAddItemInternalFn = FindObject<UFunction>("/Script/FortniteGame.FortQuickBars.ServerAddItemInternal");
|
||||
QuickBars->ProcessEvent(ServerAddItemInternalFn, &AFortQuickBars_ServerAddItemInternal_Params);
|
||||
}
|
||||
AFortQuickBars_ServerAddItemInternal_Params
|
||||
{
|
||||
NewItemInstance->GetItemEntry()->GetItemGuid(),
|
||||
IsPrimaryQuickbar(ItemDefinition) ? EFortQuickBars ::Primary : EFortQuickBars::Secondary,
|
||||
-1
|
||||
};
|
||||
|
||||
static auto ServerAddItemInternalFn = FindObject<UFunction>("/Script/FortniteGame.FortQuickBars.ServerAddItemInternal");
|
||||
QuickBars->ProcessEvent(ServerAddItemInternalFn, &AFortQuickBars_ServerAddItemInternal_Params);
|
||||
}
|
||||
|
||||
if (bShouldUpdate)
|
||||
|
||||
@@ -160,19 +160,10 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
auto GameState = ((AFortGameModeAthena*)GetWorld()->GetGameMode())->GetGameStateAthena();
|
||||
static auto CurrentPlaylistDataOffset = GameState->GetOffset("CurrentPlaylistData", false);
|
||||
|
||||
#define BELUGA
|
||||
|
||||
#ifndef BELUGA
|
||||
/* static */ std::vector<UDataTable*> LTDTables;
|
||||
/* static */ std::vector<UDataTable*> LPTables;
|
||||
|
||||
/* static */ bool bHasFoundTables = false;
|
||||
#else
|
||||
static std::vector<UDataTable*> LTDTables;
|
||||
static std::vector<UDataTable*> LPTables;
|
||||
|
||||
static bool bHasFoundTables = false;
|
||||
#endif
|
||||
|
||||
auto CurrentPlaylist = CurrentPlaylistDataOffset == -1 && Fortnite_Version < 6 ? nullptr : GameState->GetCurrentPlaylist();
|
||||
|
||||
@@ -222,7 +213,6 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
// LTDTables.push_back(LoadObject<UDataTable>(L"/Game/Athena/Playlists/Playground/AthenaLootTierData_Client.AthenaLootTierData_Client"));
|
||||
// LPTables.push_back(LoadObject<UDataTable>(L"/Game/Athena/Playlists/Playground/AthenaLootPackages_Client.AthenaLootPackages_Client"));
|
||||
|
||||
#ifdef BELUGA
|
||||
static auto FortGameFeatureDataClass = FindObject<UClass>("/Script/FortniteGame.FortGameFeatureData");
|
||||
|
||||
if (FortGameFeatureDataClass)
|
||||
@@ -366,7 +356,6 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < LTDTables.size(); i++)
|
||||
{
|
||||
@@ -381,6 +370,15 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
}
|
||||
}
|
||||
|
||||
if (Engine_Version < 420) // ahhh
|
||||
{
|
||||
LTDTables.clear();
|
||||
LPTables.clear();
|
||||
|
||||
LTDTables.push_back(LoadObject<UDataTable>(L"/Game/Items/Datatables/AthenaLootTierData_Client.AthenaLootTierData_Client"));
|
||||
LPTables.push_back(LoadObject<UDataTable>(L"/Game/Items/Datatables/AthenaLootPackages_Client.AthenaLootPackages_Client"));
|
||||
}
|
||||
|
||||
std::vector<FFortLootTierData*> TierGroupLTDs;
|
||||
|
||||
for (int p = 0; p < LTDTables.size(); p++)
|
||||
@@ -391,7 +389,12 @@ std::vector<LootDrop> PickLootDrops(FName TierGroupName, bool bPrint, int recurs
|
||||
// LOG_INFO(LogLoot, "LTD: {}", !LTD->IsValidLowLevel() ? "BadRead" : LTD->GetFullName());
|
||||
|
||||
if (!LTD->IsValidLowLevel())
|
||||
{
|
||||
if (bPrint)
|
||||
LOG_INFO(LogLoot, "BadRead!");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
auto& LTDRowMap = LTD->GetRowMap();
|
||||
auto LTDRowMapNum = LTDRowMap.Pairs.Elements.Num();
|
||||
|
||||
@@ -37,6 +37,14 @@ bool AFortPlayerController::DoesBuildFree()
|
||||
|
||||
void AFortPlayerController::ServerExecuteInventoryItemHook(AFortPlayerController* PlayerController, FGuid ItemGuid)
|
||||
{
|
||||
if (Engine_Version <= 420)
|
||||
{
|
||||
static auto OverriddenBackpackSizeOffset = PlayerController->GetOffset("OverriddenBackpackSize");
|
||||
LOG_INFO(LogDev, "PlayerController->Get<int>(OverriddenBackpackSizeOffset): {}", PlayerController->Get<int>(OverriddenBackpackSizeOffset));
|
||||
// PlayerController->Get<int>(OverriddenBackpackSizeOffset) = 5;
|
||||
// PlayerController->ForceNetUpdate();
|
||||
}
|
||||
|
||||
auto ItemInstance = PlayerController->GetWorldInventory()->FindItemInstance(ItemGuid);
|
||||
auto Pawn = Cast<AFortPawn>(PlayerController->GetPawn());
|
||||
|
||||
|
||||
@@ -68,13 +68,13 @@ void AFortPlayerControllerAthena::ServerAcknowledgePossessionHook(APlayerControl
|
||||
static auto AcknowledgedPawnOffset = Controller->GetOffset("AcknowledgedPawn");
|
||||
Controller->Get<APawn*>(AcknowledgedPawnOffset) = Pawn;
|
||||
|
||||
if (Globals::bNoMCP)
|
||||
return;
|
||||
|
||||
auto ControllerAsFort = Cast<AFortPlayerController>(Controller);
|
||||
auto PawnAsFort = Cast<AFortPlayerPawn>(Pawn);
|
||||
auto PlayerStateAsFort = Cast<AFortPlayerState>(Pawn->GetPlayerState());
|
||||
|
||||
if (Globals::bNoMCP)
|
||||
return;
|
||||
|
||||
if (!PawnAsFort)
|
||||
return;
|
||||
|
||||
@@ -114,4 +114,33 @@ void AFortPlayerControllerAthena::GetPlayerViewPointHook(AFortPlayerControllerAt
|
||||
}
|
||||
|
||||
return AFortPlayerControllerAthena::GetPlayerViewPointOriginal(PlayerController, Location, Rotation);
|
||||
}
|
||||
|
||||
void AFortPlayerControllerAthena::ServerReadyToStartMatchHook(AFortPlayerControllerAthena* PlayerController)
|
||||
{
|
||||
LOG_INFO(LogDev, "ServerReadyToStartMatch!");
|
||||
|
||||
if (Fortnite_Version <= 2.5) // techinally we should do this at the end of OnReadyToStartMatch
|
||||
{
|
||||
static auto QuickBarsOffset = PlayerController->GetOffset("QuickBars", false);
|
||||
|
||||
if (QuickBarsOffset != -1)
|
||||
{
|
||||
auto& QuickBars = PlayerController->Get<AActor*>(QuickBarsOffset);
|
||||
|
||||
if (QuickBars)
|
||||
return ServerReadyToStartMatchOriginal(PlayerController);
|
||||
|
||||
static auto FortQuickBarsClass = FindObject<UClass>("/Script/FortniteGame.FortQuickBars");
|
||||
|
||||
QuickBars = GetWorld()->SpawnActor<AActor>(FortQuickBarsClass);
|
||||
|
||||
if (!QuickBars)
|
||||
return ServerReadyToStartMatchOriginal(PlayerController);
|
||||
|
||||
PlayerController->Get<AActor*>(QuickBarsOffset)->SetOwner(PlayerController);
|
||||
}
|
||||
}
|
||||
|
||||
return ServerReadyToStartMatchOriginal(PlayerController);
|
||||
}
|
||||
@@ -57,6 +57,7 @@ class AFortPlayerControllerAthena : public AFortPlayerController
|
||||
{
|
||||
public:
|
||||
static inline void (*GetPlayerViewPointOriginal)(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation);
|
||||
static inline void (*ServerReadyToStartMatchOriginal)(AFortPlayerControllerAthena* PlayerController);
|
||||
|
||||
AFortPlayerStateAthena* GetPlayerStateAthena()
|
||||
{
|
||||
@@ -75,6 +76,7 @@ public:
|
||||
static void ServerAcknowledgePossessionHook(APlayerController* Controller, APawn* Pawn);
|
||||
static void ServerPlaySquadQuickChatMessage(AFortPlayerControllerAthena* PlayerController, __int64 ChatEntry, __int64 SenderID);
|
||||
static void GetPlayerViewPointHook(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation);
|
||||
static void ServerReadyToStartMatchHook(AFortPlayerControllerAthena* PlayerController);
|
||||
|
||||
static UClass* StaticClass()
|
||||
{
|
||||
|
||||
@@ -21,7 +21,11 @@ public:
|
||||
|
||||
bool ShouldPersistWhenFinalStackEmpty()
|
||||
{
|
||||
static auto bPersistInInventoryWhenFinalStackEmptyOffset = GetOffset("bPersistInInventoryWhenFinalStackEmpty");
|
||||
static auto bPersistInInventoryWhenFinalStackEmptyOffset = GetOffset("bPersistInInventoryWhenFinalStackEmpty", false);
|
||||
|
||||
if (bPersistInInventoryWhenFinalStackEmptyOffset == -1)
|
||||
return false;
|
||||
|
||||
static auto bPersistInInventoryWhenFinalStackEmptyFieldMask = GetFieldMask(GetProperty("bPersistInInventoryWhenFinalStackEmpty"));
|
||||
return ReadBitfieldValue(bPersistInInventoryWhenFinalStackEmptyOffset, bPersistInInventoryWhenFinalStackEmptyFieldMask);
|
||||
}
|
||||
|
||||
@@ -77,11 +77,10 @@ APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AControll
|
||||
auto CosmeticLoadoutPickaxe = CosmeticLoadout ? CosmeticLoadout->GetPickaxe() : nullptr;
|
||||
static auto WeaponDefinitionOffset = FindOffsetStruct("/Script/FortniteGame.AthenaPickaxeItemDefinition", "WeaponDefinition");
|
||||
|
||||
auto Pickaxe = CosmeticLoadoutPickaxe ? CosmeticLoadoutPickaxe->Get<UFortItemDefinition*>(WeaponDefinitionOffset)
|
||||
auto PickaxeDefinition = CosmeticLoadoutPickaxe ? CosmeticLoadoutPickaxe->Get<UFortItemDefinition*>(WeaponDefinitionOffset)
|
||||
: FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Harvest_Pickaxe_Athena_C_T01.WID_Harvest_Pickaxe_Athena_C_T01");
|
||||
|
||||
static UFortItemDefinition* EditToolItemDefinition = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/EditTool.EditTool");
|
||||
static UFortItemDefinition* PickaxeDefinition = Pickaxe;
|
||||
static UFortItemDefinition* BuildingItemData_Wall = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_Wall.BuildingItemData_Wall");
|
||||
static UFortItemDefinition* BuildingItemData_Floor = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_Floor.BuildingItemData_Floor");
|
||||
static UFortItemDefinition* BuildingItemData_Stair_W = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_Stair_W.BuildingItemData_Stair_W");
|
||||
|
||||
@@ -39,6 +39,7 @@ int32 ServerReplicateActors_PrepConnections(UNetDriver* NetDriver)
|
||||
// checkSlow(Connection->GetUChildConnection() == NULL);
|
||||
|
||||
AActor* OwningActor = Connection->GetOwningActor();
|
||||
|
||||
if (OwningActor != NULL) // && /* Connection->State == USOCK_Open && */ (Connection->Driver->Time - Connection->LastReceiveTime < 1.5f))
|
||||
{
|
||||
// check(World == OwningActor->GetWorld());
|
||||
@@ -46,7 +47,19 @@ int32 ServerReplicateActors_PrepConnections(UNetDriver* NetDriver)
|
||||
bFoundReadyConnection = true;
|
||||
|
||||
// the view target is what the player controller is looking at OR the owning actor itself when using beacons
|
||||
Connection->GetViewTarget() = Connection->GetPlayerController() ? Connection->GetPlayerController()->GetViewTarget() : OwningActor;
|
||||
// Connection->GetViewTarget() = Connection->GetPlayerController() ? Connection->GetPlayerController()->GetViewTarget() : OwningActor;
|
||||
|
||||
AActor* DesiredViewTarget = OwningActor;
|
||||
|
||||
if (Connection->GetPlayerController())
|
||||
{
|
||||
if (AActor* ViewTarget = Connection->GetPlayerController()->GetViewTarget())
|
||||
{
|
||||
DesiredViewTarget = ViewTarget;
|
||||
}
|
||||
}
|
||||
|
||||
Connection->GetViewTarget() = DesiredViewTarget;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -239,7 +252,7 @@ int32 UNetDriver::ServerReplicateActors()
|
||||
{
|
||||
int32 Updated = 0;
|
||||
|
||||
++*(int*)(this + Offsets::ReplicationFrame);
|
||||
++(*(int*)(__int64(this) + Offsets::ReplicationFrame));
|
||||
|
||||
const int32 NumClientsToTick = ServerReplicateActors_PrepConnections(this);
|
||||
|
||||
@@ -298,24 +311,27 @@ int32 UNetDriver::ServerReplicateActors()
|
||||
|
||||
auto Channel = FindChannel(Actor, Connection);
|
||||
|
||||
static void (*ActorChannelClose)(UActorChannel*) = decltype(ActorChannelClose)(Addresses::ActorChannelClose);
|
||||
|
||||
std::vector<FNetViewer> ConnectionViewers;
|
||||
ConnectionViewers.push_back(ConstructNetViewer(Connection));
|
||||
|
||||
if (!Actor->IsAlwaysRelevant() && !Actor->UsesOwnerRelevancy() && !Actor->IsOnlyRelevantToOwner())
|
||||
if (Addresses::ActorChannelClose && Offsets::IsNetRelevantFor)
|
||||
{
|
||||
if (Connection && Connection->GetViewTarget())
|
||||
static void (*ActorChannelClose)(UActorChannel*) = decltype(ActorChannelClose)(Addresses::ActorChannelClose);
|
||||
|
||||
std::vector<FNetViewer> ConnectionViewers;
|
||||
ConnectionViewers.push_back(ConstructNetViewer(Connection));
|
||||
|
||||
if (!Actor->IsAlwaysRelevant() && !Actor->UsesOwnerRelevancy() && !Actor->IsOnlyRelevantToOwner())
|
||||
{
|
||||
auto Viewer = Connection->GetViewTarget();
|
||||
auto Loc = Viewer->GetActorLocation();
|
||||
|
||||
if (!IsActorRelevantToConnection(Actor, ConnectionViewers))
|
||||
if (Connection && Connection->GetViewTarget())
|
||||
{
|
||||
if (Channel)
|
||||
ActorChannelClose(Channel);
|
||||
auto Viewer = Connection->GetViewTarget();
|
||||
auto Loc = Viewer->GetActorLocation();
|
||||
|
||||
continue;
|
||||
if (!IsActorRelevantToConnection(Actor, ConnectionViewers))
|
||||
{
|
||||
if (Channel)
|
||||
ActorChannelClose(Channel);
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -326,7 +342,7 @@ int32 UNetDriver::ServerReplicateActors()
|
||||
|
||||
if (!Channel)
|
||||
{
|
||||
if (Actor->IsA(APlayerController::StaticClass()) && Actor != Connection->GetPlayerController()) // isnetreelvantfor should handle this iirc
|
||||
if (Actor->IsA(APlayerController::StaticClass()) && Actor != Connection->GetPlayerController()) // isnetrelevantfor should handle this iirc
|
||||
continue;
|
||||
|
||||
Channel = (UActorChannel*)CreateChannel(Connection, 2, true, -1);
|
||||
|
||||
@@ -45,7 +45,6 @@ void Addresses::SetupVersion()
|
||||
std::string FNVer = FullVersion;
|
||||
std::string EngineVer = FullVersion;
|
||||
std::string CLStr;
|
||||
int CL = 0;
|
||||
|
||||
if (!FullVersion.contains("Live") && !FullVersion.contains(("Next")) && !FullVersion.contains(("Cert")))
|
||||
{
|
||||
@@ -82,14 +81,23 @@ void Addresses::SetupVersion()
|
||||
// Engine_Version = FullVersion.contains(("Next")) ? 419 : 416;
|
||||
CLStr = FullVersion.substr(FullVersion.find_first_of('-') + 1);
|
||||
CLStr = CLStr.substr(0, CLStr.find_first_of('+'));
|
||||
CL = std::stoi(CLStr);
|
||||
Engine_Version = CL <= 3775276 ? 416 : 419; // std::stoi(FullVersion.substr(0, FullVersion.find_first_of('-')));
|
||||
Fortnite_CL = std::stoi(CLStr);
|
||||
Engine_Version = Fortnite_CL <= 3775276 ? 416 : 419; // std::stoi(FullVersion.substr(0, FullVersion.find_first_of('-')));
|
||||
Fortnite_Version = FullVersion.contains(("Next")) ? 2.4 : 1.8;
|
||||
}
|
||||
|
||||
// Fortnite_Season = std::floor(Fortnite_Version);
|
||||
|
||||
FFastArraySerializer::bNewSerializer = Fortnite_Version >= 8.30;
|
||||
|
||||
if (Fortnite_CL == 3807424)
|
||||
Fortnite_Version = 1.11;
|
||||
if (Fortnite_CL == 3700114)
|
||||
Fortnite_Version = 1.72;
|
||||
if (Fortnite_CL == 3724489)
|
||||
Fortnite_Version = 1.8;
|
||||
if (Fortnite_CL == 3870737)
|
||||
Fortnite_Version = 2.42;
|
||||
}
|
||||
|
||||
void Addresses::FindAll()
|
||||
@@ -323,12 +331,14 @@ void Offsets::FindAll()
|
||||
else if (std::floor(Fortnite_Version) >= 21)
|
||||
Offsets::ServerReplicateActors = 0x67; // checked onb 22.30
|
||||
|
||||
if (Engine_Version == 416)
|
||||
if (Engine_Version == 416) // checked on 1.7.2 & 1.8
|
||||
Offsets::ReplicationFrame = 0x288;
|
||||
else if (Engine_Version == 419)
|
||||
if (Fortnite_Version == 2.42)
|
||||
Offsets::ReplicationFrame = 0xB2;
|
||||
else if (Fortnite_Version == 2.5)
|
||||
if (Fortnite_Version == 2.5)
|
||||
Offsets::ReplicationFrame = 0xCA;
|
||||
if (Fortnite_Version == 1.11)
|
||||
Offsets::ReplicationFrame = 0x2C8;
|
||||
|
||||
Offsets::IsNetRelevantFor = FindIsNetRelevantForOffset();
|
||||
}
|
||||
@@ -377,6 +387,11 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
|
||||
{
|
||||
std::vector<uint64> toNull;
|
||||
|
||||
if (Fortnite_Version == 1.11)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 6C 24 ? 57 41 56 41 57 48 81 EC ? ? ? ? 48 8B 01 49 8B E9 45 0F B6 F8").Get()); // No Reserve
|
||||
}
|
||||
|
||||
if (Fortnite_Version > 2.5 && Engine_Version == 420)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 57 48 81 EC ? ? ? ? 4C 8B 82 ? ? ? ? 48 8B F9 0F 29 70 E8 0F 29 78 D8").Get()); // Pawn Overlap
|
||||
|
||||
@@ -89,6 +89,7 @@ DWORD WINAPI Main(LPVOID)
|
||||
Addresses::Init();
|
||||
Addresses::Print();
|
||||
|
||||
LOG_INFO(LogDev, "Fortnite_CL: {}", Fortnite_CL);
|
||||
LOG_INFO(LogDev, "Version: {}", Fortnite_Version);
|
||||
|
||||
static auto GameModeDefault = FindObject<AFortGameModeAthena>(L"/Script/FortniteGame.Default__FortGameModeAthena");
|
||||
@@ -288,6 +289,8 @@ DWORD WINAPI Main(LPVOID)
|
||||
AFortPlayerController::ServerEditBuildingActorHook, (PVOID*)&AFortPlayerController::ServerEditBuildingActorOriginal, false, true);
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerEndEditingBuildingActor"),
|
||||
AFortPlayerController::ServerEndEditingBuildingActorHook, nullptr, false);
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerReadyToStartMatch"),
|
||||
AFortPlayerControllerAthena::ServerReadyToStartMatchHook, (PVOID*)&AFortPlayerControllerAthena::ServerReadyToStartMatchOriginal, false);
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerControllerAthena.ServerGiveCreativeItem"),
|
||||
AFortPlayerControllerAthena::ServerGiveCreativeItemHook, nullptr, true);
|
||||
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerControllerAthena.ServerPlaySquadQuickChatMessage"),
|
||||
|
||||
@@ -79,6 +79,9 @@ static inline uint64 FindStaticFindObject(int StringSkip = 1)
|
||||
if (Engine_Version == 416)
|
||||
return Memcury::Scanner::FindPattern("4C 8B DC 57 48 81 EC ? ? ? ? 80 3D ? ? ? ? ? 49 89 6B F0 49 89 73 E8").Get();
|
||||
|
||||
if (Engine_Version == 419)
|
||||
return Memcury::Scanner::FindPattern("4C 8B DC 49 89 5B 08 49 89 6B 18 49 89 73 20 57 41 56 41 57 48 83 EC 60 80 3D").Get();
|
||||
|
||||
auto Addr = Memcury::Scanner::FindStringRef(L"Illegal call to StaticFindObject() while serializing object data!", true, StringSkip, Engine_Version >= 427);
|
||||
auto Final = FindBytes(Addr, { 0x48, 0x89, 0x5C }, 255, 0, true, 0, false); // Addr.ScanFor(bytes, false).Get();
|
||||
|
||||
@@ -208,7 +211,14 @@ static inline uint64 FindPauseBeaconRequests()
|
||||
return Memcury::Scanner::FindPattern("40 53 48 83 EC 30 48 8B D9 84 D2 74 68 80 3D ? ? ? ? ? 72 2C 48 8B 05 ? ? ? ? 4C 8D 44").Get();
|
||||
|
||||
if (Engine_Version == 419)
|
||||
return Memcury::Scanner::FindPattern("40 53 48 83 EC 30 48 8B D9 84 D2 74 68 80 3D ? ? ? ? ? 72").Get(); // i supposed this is just because its getitng wrong string ref
|
||||
{
|
||||
auto aa = Memcury::Scanner::FindPattern("40 53 48 83 EC 30 48 8B D9 84 D2 74 6F 80 3D", false).Get();
|
||||
|
||||
if (!aa)
|
||||
return Memcury::Scanner::FindPattern("40 53 48 83 EC 30 48 8B D9 84 D2 74 68 80 3D ? ? ? ? ? 72").Get(); // i supposed this is just because its getitng wrong string ref
|
||||
|
||||
return aa;
|
||||
}
|
||||
|
||||
if (Engine_Version == 416)
|
||||
return Memcury::Scanner::FindPattern("40 53 48 83 EC 30 48 8B D9 84 D2 74 6F 80 3D ? ? ? ? ? 72 33 48 8B 05").Get();
|
||||
@@ -337,8 +347,10 @@ static inline uint64 FindGetPlayerViewpoint()
|
||||
|
||||
static inline uint64 FindIsNetRelevantForOffset()
|
||||
{
|
||||
if (Engine_Version == 416)
|
||||
return 648 / 8;
|
||||
if (Engine_Version == 416) // checked on 1.7.2 & 1.8
|
||||
return 0x420 / 8;
|
||||
if (Fortnite_Version == 1.11 || Fortnite_Version == 2.42 || Fortnite_Version == 2.5)
|
||||
return 0x418 / 8;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -917,6 +929,12 @@ static inline uint64 FindGIsClient()
|
||||
{
|
||||
// if (Fortnite_Version == 2.5)
|
||||
// return __int64(GetModuleHandleW(0)) + 0x46AD734;
|
||||
if (Fortnite_Version == 1.72)
|
||||
return __int64(GetModuleHandleW(0)) + 0x6536B65;
|
||||
if (Fortnite_Version == 1.8)
|
||||
return __int64(GetModuleHandleW(0)) + 0x66637E5;
|
||||
if (Fortnite_Version == 1.11)
|
||||
return __int64(GetModuleHandleW(0)) + 0x5BAA38F;
|
||||
if (Fortnite_Version == 4.1)
|
||||
return __int64(GetModuleHandleW(0)) + 0x4BF6F17;
|
||||
if (Fortnite_Version == 11.31)
|
||||
@@ -1139,6 +1157,8 @@ static inline uint64 FindGiveAbility()
|
||||
{
|
||||
if (Engine_Version == 416)
|
||||
return Memcury::Scanner::FindPattern("48 89 5C 24 ? 56 57 41 56 48 83 EC 20 83 B9").Get();
|
||||
if (Fortnite_Version == 1.11)
|
||||
return Memcury::Scanner::FindPattern("48 89 5C 24 ? 56 57 41 56 48 83 EC 20 83 B9 ? ? ? ? ? 49 8B F0").Get();
|
||||
if (Engine_Version == 420)
|
||||
return Memcury::Scanner::FindPattern("48 89 5C 24 ? 56 57 41 56 48 83 EC 20 83 B9 ? ? ? ? ? 49 8B F0 4C 8B F2 48 8B D9 7E 61").Get();
|
||||
if (Engine_Version == 421)
|
||||
@@ -1223,7 +1243,14 @@ static inline uint64 FindSetChannelActor()
|
||||
if (Engine_Version == 416)
|
||||
return Memcury::Scanner::FindPattern("4C 8B DC 55 53 57 41 54 49 8D AB ? ? ? ? 48 81 EC ? ? ? ? 45 33").Get();
|
||||
if (Engine_Version >= 419 && Fortnite_Version <= 2.5)
|
||||
return Memcury::Scanner::FindPattern("48 8B C4 55 53 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 48 89 70 E8 48 8B D9").Get();
|
||||
{
|
||||
auto aa = Memcury::Scanner::FindPattern("48 8B C4 55 53 57 41 54 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 45 33 E4 48 89 70", false).Get();
|
||||
|
||||
if (!aa)
|
||||
return Memcury::Scanner::FindPattern("48 8B C4 55 53 48 8D A8 ? ? ? ? 48 81 EC ? ? ? ? 48 89 70 E8 48 8B D9").Get();
|
||||
|
||||
return aa;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ typedef unsigned __int64 uint64;
|
||||
|
||||
extern inline int Engine_Version = 0; // For example, 420, 421, etc. // Prevent using this when possible.
|
||||
extern inline double Fortnite_Version = 0; // For example, 4.1, 6.21, etc. // Prevent using this when possible.
|
||||
extern inline int Fortnite_CL = 0;
|
||||
|
||||
#define MS_ALIGN(n) __declspec(align(n))
|
||||
#define FORCENOINLINE __declspec(noinline)
|
||||
|
||||
Reference in New Issue
Block a user