mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 10:52:22 +01:00
fix 2.3 and 2.4 and 3.5
This commit is contained in:
@@ -12,16 +12,30 @@ public:
|
|||||||
return Get<UFortAthenaAIBotCharacterCustomization*>(CharacterCustomizationOffset);
|
return Get<UFortAthenaAIBotCharacterCustomization*>(CharacterCustomizationOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static void ApplyOverrideCharacterCustomizationHook(UFortAthenaAIBotCustomizationData* InBotData, AFortPlayerPawn* NewBot, __int64 idk)
|
static void ApplyOverrideCharacterCustomizationHook(UFortAthenaAIBotCustomizationData* InBotData, AFortPlayerPawn* NewBot, __int64 idk)
|
||||||
{
|
{
|
||||||
LOG_INFO(LogDev, "ApplyOverrideCharacterCustomizationHook!");
|
LOG_INFO(LogDev, "ApplyOverrideCharacterCustomizationHook!");
|
||||||
|
|
||||||
auto CharacterCustomization = InBotData->GetCharacterCustomization();
|
auto CharacterCustomization = InBotData->GetCharacterCustomization();
|
||||||
|
|
||||||
NewBot->GetCosmeticLoadout()->GetCharacter() = CharacterCustomization->GetCustomizationLoadout()->GetCharacter();
|
auto Controller = NewBot->GetController();
|
||||||
|
|
||||||
NewBot->Get<bool>(0x1B30) = true; // idk this is like a initialize check
|
LOG_INFO(LogDev, "Controller: {}", Controller->IsValidLowLevel() ? Controller->GetPathName() : "BadRead");
|
||||||
} */
|
|
||||||
|
static auto CosmeticLoadoutBCOffset = Controller->GetOffset("CosmeticLoadoutBC");
|
||||||
|
Controller->GetPtr<FFortAthenaLoadout>(CosmeticLoadoutBCOffset)->GetCharacter() = CharacterCustomization->GetCustomizationLoadout()->GetCharacter();
|
||||||
|
|
||||||
|
auto PlayerStateAsFort = Cast<AFortPlayerState>(Controller->GetPlayerState());
|
||||||
|
|
||||||
|
static auto UpdatePlayerCustomCharacterPartsVisualizationFn = FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.UpdatePlayerCustomCharacterPartsVisualization");
|
||||||
|
PlayerStateAsFort->ProcessEvent(UpdatePlayerCustomCharacterPartsVisualizationFn, &PlayerStateAsFort);
|
||||||
|
|
||||||
|
PlayerStateAsFort->ForceNetUpdate();
|
||||||
|
NewBot->ForceNetUpdate();
|
||||||
|
Controller->ForceNetUpdate();
|
||||||
|
|
||||||
|
// NewBot->GetCosmeticLoadout()->GetCharacter() = CharacterCustomization->GetCustomizationLoadout()->GetCharacter();
|
||||||
|
}
|
||||||
|
|
||||||
static UClass* StaticClass()
|
static UClass* StaticClass()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ void AFortPlayerController::ApplyCosmeticLoadout()
|
|||||||
if (!PawnAsFort)
|
if (!PawnAsFort)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
static auto UpdatePlayerCustomCharacterPartsVisualizationFn = FindObject<UFunction>("/Script/FortniteGame.FortKismetLibrary.UpdatePlayerCustomCharacterPartsVisualization");
|
static auto UpdatePlayerCustomCharacterPartsVisualizationFn = FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.UpdatePlayerCustomCharacterPartsVisualization");
|
||||||
|
|
||||||
if (!UpdatePlayerCustomCharacterPartsVisualizationFn)
|
if (!UpdatePlayerCustomCharacterPartsVisualizationFn)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -100,6 +100,10 @@ void Addresses::SetupVersion()
|
|||||||
Fortnite_Version = 1.9;
|
Fortnite_Version = 1.9;
|
||||||
if (Fortnite_CL == 3841827)
|
if (Fortnite_CL == 3841827)
|
||||||
Fortnite_Version = 2.2;
|
Fortnite_Version = 2.2;
|
||||||
|
if (Fortnite_CL == 3847564)
|
||||||
|
Fortnite_Version = 2.3;
|
||||||
|
if (Fortnite_CL == 3858292)
|
||||||
|
Fortnite_Version = 2.4;
|
||||||
if (Fortnite_CL == 3870737)
|
if (Fortnite_CL == 3870737)
|
||||||
Fortnite_Version = 2.42;
|
Fortnite_Version = 2.42;
|
||||||
|
|
||||||
@@ -438,7 +442,7 @@ void Offsets::FindAll()
|
|||||||
{
|
{
|
||||||
Offsets::ClientWorldPackageName = 0x337B8;
|
Offsets::ClientWorldPackageName = 0x337B8;
|
||||||
}
|
}
|
||||||
if (Fortnite_Version == 2.20)
|
if (Fortnite_Version >= 2.2 && Fortnite_Version <= 2.4) // 2.2 & 2.4
|
||||||
{
|
{
|
||||||
Offsets::ClientWorldPackageName = 0xA17A8;
|
Offsets::ClientWorldPackageName = 0xA17A8;
|
||||||
}
|
}
|
||||||
@@ -514,7 +518,7 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
|
|||||||
toNull.push_back(Memcury::Scanner::FindPattern("48 89 54 24 ? 48 89 4C 24 ? 55 53 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 8B 41 08 C1 E8 05").Get()); // Widget class
|
toNull.push_back(Memcury::Scanner::FindPattern("48 89 54 24 ? 48 89 4C 24 ? 55 53 57 48 8D 6C 24 ? 48 81 EC ? ? ? ? 8B 41 08 C1 E8 05").Get()); // Widget class
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Fortnite_Version == 1.11 || Fortnite_Version == 2.2)
|
if (Fortnite_Version == 1.11 || Fortnite_Version >= 2.2 && Fortnite_Version <= 2.4)
|
||||||
{
|
{
|
||||||
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
|
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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public:
|
|||||||
static auto SquadIdOffset = PlayerState->GetOffset("SquadId", false);
|
static auto SquadIdOffset = PlayerState->GetOffset("SquadId", false);
|
||||||
|
|
||||||
if (SquadIdOffset != -1)
|
if (SquadIdOffset != -1)
|
||||||
PlayerState->GetSquadId() = PlayerState->GetTeamIndex() - 2; // NumToSubtractFromSquadId;
|
PlayerState->GetSquadId() = PlayerState->GetTeamIndex() - NumToSubtractFromSquadId;
|
||||||
|
|
||||||
GameState->AddPlayerStateToGameMemberInfo(PlayerState);
|
GameState->AddPlayerStateToGameMemberInfo(PlayerState);
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ namespace Globals
|
|||||||
extern inline int AmountOfListens = 0; // TODO: Switch to this for LastNum
|
extern inline int AmountOfListens = 0; // TODO: Switch to this for LastNum
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern inline int NumToSubtractFromSquadId = 0; // I think 2?
|
||||||
|
|
||||||
extern inline std::string PlaylistName =
|
extern inline std::string PlaylistName =
|
||||||
"/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo";
|
"/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo";
|
||||||
// "/Game/Athena/Playlists/gg/Playlist_Gg_Reverse.Playlist_Gg_Reverse";
|
// "/Game/Athena/Playlists/gg/Playlist_Gg_Reverse.Playlist_Gg_Reverse";
|
||||||
|
|||||||
@@ -59,7 +59,6 @@
|
|||||||
#define LOADOUT_PLAYERTAB 4
|
#define LOADOUT_PLAYERTAB 4
|
||||||
#define FUN_PLAYERTAB 5
|
#define FUN_PLAYERTAB 5
|
||||||
|
|
||||||
extern inline int NumToSubtractFromSquadId = 0; // I think 2?
|
|
||||||
extern inline int SecondsUntilTravel = 5;
|
extern inline int SecondsUntilTravel = 5;
|
||||||
extern inline bool bSwitchedInitialLevel = false;
|
extern inline bool bSwitchedInitialLevel = false;
|
||||||
extern inline bool bIsInAutoRestart = false;
|
extern inline bool bIsInAutoRestart = false;
|
||||||
|
|||||||
@@ -112,8 +112,16 @@ static inline void FillItemCollector(ABuildingItemCollectorActor* ItemCollector,
|
|||||||
LegendaryPrice = 0;
|
LegendaryPrice = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int itemCollectorRecursive = 0;
|
||||||
|
|
||||||
for (int ItemCollectorIt = 0; ItemCollectorIt < ItemCollections.Num(); ItemCollectorIt++)
|
for (int ItemCollectorIt = 0; ItemCollectorIt < ItemCollections.Num(); ItemCollectorIt++)
|
||||||
{
|
{
|
||||||
|
if (itemCollectorRecursive > 3)
|
||||||
|
{
|
||||||
|
itemCollectorRecursive = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
auto ItemCollection = ItemCollections.AtPtr(ItemCollectorIt, FCollectorUnitInfo::GetPropertiesSize());
|
auto ItemCollection = ItemCollections.AtPtr(ItemCollectorIt, FCollectorUnitInfo::GetPropertiesSize());
|
||||||
|
|
||||||
if (ItemCollection->GetOutputItemEntry()->Num() > 0)
|
if (ItemCollection->GetOutputItemEntry()->Num() > 0)
|
||||||
@@ -130,6 +138,7 @@ static inline void FillItemCollector(ABuildingItemCollectorActor* ItemCollector,
|
|||||||
{
|
{
|
||||||
// LOG_WARN(LogGame, "Failed to find LootDrops for vending machine loot tier: {}", LootTier);
|
// LOG_WARN(LogGame, "Failed to find LootDrops for vending machine loot tier: {}", LootTier);
|
||||||
ItemCollectorIt--; // retry (?)
|
ItemCollectorIt--; // retry (?)
|
||||||
|
itemCollectorRecursive++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -167,6 +176,7 @@ static inline void FillItemCollector(ABuildingItemCollectorActor* ItemCollector,
|
|||||||
if (!ItemCollection->GetOutputItem())
|
if (!ItemCollection->GetOutputItem())
|
||||||
{
|
{
|
||||||
ItemCollectorIt--; // retry
|
ItemCollectorIt--; // retry
|
||||||
|
itemCollectorRecursive++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user