fix da crash

This commit is contained in:
Milxnor
2023-03-23 22:59:19 -04:00
parent 757f7b21d3
commit 7d21fef63a
4 changed files with 17 additions and 5 deletions

View File

@@ -737,9 +737,6 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
// idk if this is needed
double (*sub_7FF753D401D0)(UObject* a1) = decltype(sub_7FF753D401D0)(__int64(GetModuleHandleW(0)) + 0x1A001D0);
LOG_INFO(LogDev, "TIme: {}", sub_7FF753D401D0(GetWorld()));
static auto bHasServerFinishedLoadingOffset = NewPlayer->GetOffset("bHasServerFinishedLoading");
NewPlayer->Get<bool>(bHasServerFinishedLoadingOffset) = true;

View File

@@ -387,13 +387,17 @@ AFortPickup* UFortKismetLibrary::K2_SpawnPickupInWorldHook(UObject* Context, FFr
bool UFortKismetLibrary::PickLootDropsHook(UObject* Context, FFrame& Stack, bool* Ret)
{
static auto WorldContextObjectOffset = FindOffsetStruct("/Script/FortniteGame.FortKismetLibrary.PickLootDrops", "WorldContextObject", false);
UObject* WorldContextObject; // (Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
TArray<FFortItemEntry> OutLootToDropTempBuf; // (Parm, OutParm, ZeroConstructor, NativeAccessSpecifierPublic)
FName TierGroupName; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int WorldLevel; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
int ForcedLootTier; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
if (WorldContextObjectOffset != 0)
Stack.StepCompiledIn(&WorldContextObject);
auto& OutLootToDrop = Stack.StepCompiledInRef<TArray<FFortItemEntry>>(&OutLootToDropTempBuf);
Stack.StepCompiledIn(&TierGroupName);
Stack.StepCompiledIn(&WorldLevel);
@@ -403,6 +407,12 @@ bool UFortKismetLibrary::PickLootDropsHook(UObject* Context, FFrame& Stack, bool
auto LootDrops = PickLootDrops(TierGroupName, true);
/* LootDrop skuffed{};
skuffed.ItemDefinition = FindObject<UFortItemDefinition>("AGID_CarminePack", nullptr, ANY_PACKAGE);
skuffed.Count = 1;
LootDrops.push_back(skuffed); */
for (int i = 0; i < LootDrops.size(); i++)
{
auto NewEntry = Alloc<FFortItemEntry>(FFortItemEntry::GetStructSize());

View File

@@ -718,6 +718,9 @@ static inline uint64 FindDispatchRequest()
static inline uint64 FindGIsClient()
{
if (Fortnite_Version == 4.1)
return __int64(GetModuleHandleW(0)) + 0x4BF6F17;
if (Fortnite_Version == 11.31)
return __int64(GetModuleHandleW(0)) + 0x6F41270;

View File

@@ -340,7 +340,9 @@ static UObject* GetPlaylistToUse()
}
*/
Playlist = FindObject("/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground");
// Playlist = FindObject("/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground");
// Playlist = FindObject("/Game/Athena/Playlists/Carmine/Playlist_Carmine.Playlist_Carmine");
// Playlist = FindObject("/MoleGame/Playlists/Playlist_MoleGame.Playlist_MoleGame");
// Playlist = FindObject("/Game/Athena/Playlists/DADBRO/Playlist_DADBRO_Squads_8.Playlist_DADBRO_Squads_8");