diff --git a/Project Reboot 3.0/AthenaMarkerComponent.cpp b/Project Reboot 3.0/AthenaMarkerComponent.cpp index 6b11564..79ee833 100644 --- a/Project Reboot 3.0/AthenaMarkerComponent.cpp +++ b/Project Reboot 3.0/AthenaMarkerComponent.cpp @@ -33,9 +33,9 @@ void UAthenaMarkerComponent::ServerAddMapMarkerHook(UAthenaMarkerComponent* Mark MarkerData->GetMarkerType() = MarkerRequestPtr->GetMarkerType(); MarkerData->GetOwner() = PlayerState; MarkerData->GetWorldNormal() = MarkerRequestPtr->GetWorldNormal(); - if (WorldPositionOffset != 0) + if (WorldPositionOffset != -1) MarkerData->GetWorldPosition() = MarkerRequestPtr->GetWorldPosition(); - if (WorldPositionOffset != 0) + if (WorldPositionOffset != -1) MarkerData->GetWorldPositionOffset() = MarkerRequestPtr->GetWorldPositionOffset(); MarkerData->GetMarkerID() = MarkerID; MarkerData->GetMarkedActorClass().SoftObjectPtr.WeakPtr.ObjectIndex = -1; diff --git a/Project Reboot 3.0/BuildingActor.h b/Project Reboot 3.0/BuildingActor.h index c5268bc..57e284d 100644 --- a/Project Reboot 3.0/BuildingActor.h +++ b/Project Reboot 3.0/BuildingActor.h @@ -41,7 +41,7 @@ public: static auto TeamIndexOffset = GetOffset("TeamIndex", false); - if (TeamIndexOffset != 0) + if (TeamIndexOffset != -1) Get(TeamIndexOffset) = InTeam; } else diff --git a/Project Reboot 3.0/FortAthenaCreativePortal.h b/Project Reboot 3.0/FortAthenaCreativePortal.h index 248e554..e31b074 100644 --- a/Project Reboot 3.0/FortAthenaCreativePortal.h +++ b/Project Reboot 3.0/FortAthenaCreativePortal.h @@ -30,7 +30,7 @@ public: { static auto OwningPlayerOffset = GetOffset("OwningPlayer", false); - if (OwningPlayerOffset == 0) + if (OwningPlayerOffset == -1) return nullptr; return GetPtr(OwningPlayerOffset); diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index af9f1de..4192439 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -56,7 +56,7 @@ void ShowFoundation(UObject* BuildingFoundation) static auto bShowHLODWhenDisabledOffset = BuildingFoundation->GetOffset("bShowHLODWhenDisabled", false); - if (bShowHLODWhenDisabledOffset != 0) + if (bShowHLODWhenDisabledOffset != -1) { static auto bShowHLODWhenDisabledFieldMask = GetFieldMask(BuildingFoundation->GetProperty("bShowHLODWhenDisabled")); BuildingFoundation->SetBitfieldValue(bShowHLODWhenDisabledOffset, bShowHLODWhenDisabledFieldMask, true); @@ -67,7 +67,7 @@ void ShowFoundation(UObject* BuildingFoundation) static auto DynamicFoundationRepDataOffset = BuildingFoundation->GetOffset("DynamicFoundationRepData", false); - if (DynamicFoundationRepDataOffset != 0) + if (DynamicFoundationRepDataOffset != -1) { auto DynamicFoundationRepData = BuildingFoundation->GetPtr(DynamicFoundationRepDataOffset); @@ -81,7 +81,7 @@ void ShowFoundation(UObject* BuildingFoundation) static auto FoundationEnabledStateOffset = BuildingFoundation->GetOffset("FoundationEnabledState", false); - if (FoundationEnabledStateOffset != 0) + if (FoundationEnabledStateOffset != -1) BuildingFoundation->Get(FoundationEnabledStateOffset) = EDynamicFoundationEnabledState::Enabled; } @@ -123,7 +123,7 @@ FName AFortGameModeAthena::RedirectLootTier(const FName& LootTier) { static auto RedirectAthenaLootTierGroupsOffset = this->GetOffset("RedirectAthenaLootTierGroups", false); - if (RedirectAthenaLootTierGroupsOffset == 0) + if (RedirectAthenaLootTierGroupsOffset == -1) { static auto Loot_TreasureFName = UKismetStringLibrary::Conv_StringToName(L"Loot_Treasure"); static auto Loot_AmmoFName = UKismetStringLibrary::Conv_StringToName(L"Loot_Ammo"); @@ -276,7 +276,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game { static auto UpdateMapOffset = Scripting->GetOffset("UpdateMap", false); - if (UpdateMapOffset != 0) + if (UpdateMapOffset != -1) { Scripting->Get(UpdateMapOffset) = true; @@ -386,7 +386,7 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game { static auto AdditionalLevelsOffset = PlaylistToUse->GetOffset("AdditionalLevels", false); - if (AdditionalLevelsOffset != 0) + if (AdditionalLevelsOffset != -1) { auto& AdditionalLevels = PlaylistToUse->Get>>(AdditionalLevelsOffset); @@ -710,7 +710,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena static auto CharacterPartsOffset = PlayerStateAthena->GetOffset("CharacterParts", false); static auto CustomCharacterPartsStruct = FindObject("/Script/FortniteGame.CustomCharacterParts"); - if (CharacterPartsOffset != 0) // && CustomCharacterPartsStruct) + if (CharacterPartsOffset != -1) // && CustomCharacterPartsStruct) { auto CharacterParts = PlayerStateAthena->GetPtr<__int64>("CharacterParts"); @@ -732,7 +732,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena static auto SquadIdOffset = PlayerStateAthena->GetOffset("SquadId", false); - if (SquadIdOffset != 0) + if (SquadIdOffset != -1) PlayerStateAthena->GetSquadId() = PlayerStateAthena->GetTeamIndex() - 2; // idk if this is needed @@ -807,7 +807,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena static auto GameMemberInfoArrayOffset = GameState->GetOffset("GameMemberInfoArray", false); // if (false) - // if (GameMemberInfoArrayOffset != 0) + // if (GameMemberInfoArrayOffset != -1) if (Engine_Version >= 423) { struct FGameMemberInfo : public FFastArraySerializerItem @@ -867,7 +867,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena AFortAthenaCreativePortal* Portal = nullptr; - if (AvailablePortalsOffset != 0) + if (AvailablePortalsOffset != -1) { auto& AvailablePortals = CreativePortalManager->Get>(AvailablePortalsOffset); @@ -918,7 +918,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena static auto PlayersReadyOffset = Portal->GetOffset("PlayersReady", false); - if (PlayersReadyOffset != 0) + if (PlayersReadyOffset != -1) { auto& PlayersReady = Portal->Get>(PlayersReadyOffset); PlayersReady.AddPtr(PlayerStateUniqueId, FUniqueNetIdRepl::GetSizeOfStruct()); // im not even sure what this is for @@ -926,7 +926,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena static auto bUserInitiatedLoadOffset = Portal->GetOffset("bUserInitiatedLoad", false); - if (bUserInitiatedLoadOffset != 0) + if (bUserInitiatedLoadOffset != -1) Portal->GetUserInitiatedLoad() = true; Portal->GetInErrorState() = false; @@ -976,7 +976,7 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena { static auto QuickBarsOffset = NewPlayer->GetOffset("QuickBars", false); - if (QuickBarsOffset != 0) + if (QuickBarsOffset != -1) { static auto FortQuickBarsClass = FindObject("/Script/FortniteGame.FortQuickBars"); NewPlayer->Get(QuickBarsOffset) = GetWorld()->SpawnActor(FortQuickBarsClass); diff --git a/Project Reboot 3.0/FortGameStateAthena.cpp b/Project Reboot 3.0/FortGameStateAthena.cpp index 24f6738..b4dbfce 100644 --- a/Project Reboot 3.0/FortGameStateAthena.cpp +++ b/Project Reboot 3.0/FortGameStateAthena.cpp @@ -12,7 +12,7 @@ UObject*& AFortGameStateAthena::GetCurrentPlaylist() { static auto CurrentPlaylistInfoOffset = GetOffset("CurrentPlaylistInfo", false); - if (CurrentPlaylistInfoOffset == 0) + if (CurrentPlaylistInfoOffset == -1) { static auto CurrentPlaylistDataOffset = GetOffset("CurrentPlaylistData"); return Get(CurrentPlaylistDataOffset); diff --git a/Project Reboot 3.0/FortKismetLibrary.cpp b/Project Reboot 3.0/FortKismetLibrary.cpp index ecf8c53..f00b90b 100644 --- a/Project Reboot 3.0/FortKismetLibrary.cpp +++ b/Project Reboot 3.0/FortKismetLibrary.cpp @@ -39,7 +39,7 @@ void UFortKismetLibrary::ApplyCharacterCosmetics(UObject* WorldContextObject, co static auto CharacterPartsOffset = PlayerState->GetOffset("CharacterParts", false); - if (CharacterPartsOffset != 0) + if (CharacterPartsOffset != -1) { auto CharacterPartsPS = PlayerState->GetPtr<__int64>("CharacterParts"); @@ -123,10 +123,10 @@ void UFortKismetLibrary::GiveItemToInventoryOwnerHook(UObject* Context, FFrame& LOG_INFO(LogDev, __FUNCTION__); - if (ItemLevelOffset != 0) + if (ItemLevelOffset != -1) Stack.StepCompiledIn(&ItemLevel); - if (PickupInstigatorHandleOffset != 0) + if (PickupInstigatorHandleOffset != -1) Stack.StepCompiledIn(&PickupInstigatorHandle); if (!ItemDefinition) @@ -395,7 +395,7 @@ bool UFortKismetLibrary::PickLootDropsHook(UObject* Context, FFrame& Stack, bool int WorldLevel; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic) int ForcedLootTier; // (ConstParm, Parm, ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic) - if (WorldContextObjectOffset != 0) + if (WorldContextObjectOffset != -1) Stack.StepCompiledIn(&WorldContextObject); auto& OutLootToDrop = Stack.StepCompiledInRef>(&OutLootToDropTempBuf); diff --git a/Project Reboot 3.0/FortPlayerController.h b/Project Reboot 3.0/FortPlayerController.h index 29fee4a..7e025b9 100644 --- a/Project Reboot 3.0/FortPlayerController.h +++ b/Project Reboot 3.0/FortPlayerController.h @@ -49,10 +49,10 @@ public: { static auto CosmeticLoadoutPCOffset = this->GetOffset("CosmeticLoadoutPC", false); - if (CosmeticLoadoutPCOffset == 0) + if (CosmeticLoadoutPCOffset == -1) CosmeticLoadoutPCOffset = this->GetOffset("CustomizationLoadout"); - if (CosmeticLoadoutPCOffset == 0) + if (CosmeticLoadoutPCOffset == -1) return nullptr; auto CosmeticLoadout = this->GetPtr(CosmeticLoadoutPCOffset); diff --git a/Project Reboot 3.0/NetDriver.cpp b/Project Reboot 3.0/NetDriver.cpp index 36bde19..6097312 100644 --- a/Project Reboot 3.0/NetDriver.cpp +++ b/Project Reboot 3.0/NetDriver.cpp @@ -9,7 +9,7 @@ void UNetDriver::TickFlushHook(UNetDriver* NetDriver) { static auto ReplicationDriverOffset = NetDriver->GetOffset("ReplicationDriver", false); - if (ReplicationDriverOffset == 0) + if (ReplicationDriverOffset == -1) { NetDriver->ServerReplicateActors(); } diff --git a/Project Reboot 3.0/Object.cpp b/Project Reboot 3.0/Object.cpp index 39f4126..0f4ec0e 100644 --- a/Project Reboot 3.0/Object.cpp +++ b/Project Reboot 3.0/Object.cpp @@ -52,7 +52,7 @@ void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound) if (bWarnIfNotFound) LOG_WARN(LogFinder, "Unable to find0{}", ChildName); - return 0; + return nullptr; } int UObject::GetOffset(const std::string& ChildName, bool bWarnIfNotFound) @@ -60,7 +60,7 @@ int UObject::GetOffset(const std::string& ChildName, bool bWarnIfNotFound) auto Property = GetProperty(ChildName, bWarnIfNotFound); if (!Property) - return 0; + return -1; return *(int*)(__int64(Property) + Offsets::Offset_Internal); } diff --git a/Project Reboot 3.0/PlayerState.cpp b/Project Reboot 3.0/PlayerState.cpp index 538b333..caad178 100644 --- a/Project Reboot 3.0/PlayerState.cpp +++ b/Project Reboot 3.0/PlayerState.cpp @@ -6,7 +6,7 @@ int& APlayerState::GetPlayerID() { static auto PlayerIDOffset = FindOffsetStruct("/Script/Engine.PlayerState", "PlayerID", false); - if (PlayerIDOffset == 0) + if (PlayerIDOffset == -1) { static auto PlayerIdOffset = FindOffsetStruct("/Script/Engine.PlayerState", "PlayerId", false); return Get(PlayerIdOffset); diff --git a/Project Reboot 3.0/reboot.h b/Project Reboot 3.0/reboot.h index d6c5224..5f89d0d 100644 --- a/Project Reboot 3.0/reboot.h +++ b/Project Reboot 3.0/reboot.h @@ -270,7 +270,7 @@ inline int FindOffsetStruct(const std::string& StructName, const std::string& Me if (bWarnIfNotFound) LOG_WARN(LogFinder, "Unable to find1 {}", MemberName); - return 0; + return -1; } static void CopyStruct(void* Dest, void* Src, size_t Size) @@ -319,9 +319,7 @@ static UObject* GetPlaylistToUse() auto Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo"); // Playlist = FindObject("/BlueCheese/Playlists/Playlist_ShowdownAlt_BlueCheese_Trios.Playlist_ShowdownAlt_BlueCheese_Trios"); - /* - - if (Globals::bGoingToPlayEvent) + /* if (Globals::bGoingToPlayEvent) { if (Fortnite_Version != 12.61) { @@ -337,8 +335,9 @@ static UObject* GetPlaylistToUse() Playlist = EventPlaylist; } } - } - */ + } */ + + // SET OVERRIDE PLAYLIST DOWN HERE // Playlist = FindObject("/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground"); diff --git a/Project Reboot 3.0/vehicles.h b/Project Reboot 3.0/vehicles.h index db840ad..2347139 100644 --- a/Project Reboot 3.0/vehicles.h +++ b/Project Reboot 3.0/vehicles.h @@ -129,7 +129,7 @@ static inline AActor* SpawnVehicleFromSpawner(AActor* VehicleSpawner) static auto VehicleClassOffset = VehicleSpawner->GetOffset("VehicleClass", false); - if (VehicleClassOffset != 0) // 10.40 and below? + if (VehicleClassOffset != -1) // 10.40 and below? { auto& SoftVehicleClass = VehicleSpawner->Get>(VehicleClassOffset); auto StrongVehicleClass = SoftVehicleClass.Get(); @@ -146,7 +146,7 @@ static inline AActor* SpawnVehicleFromSpawner(AActor* VehicleSpawner) static auto FortVehicleItemDefOffset = VehicleSpawner->GetOffset("FortVehicleItemDef"); - if (FortVehicleItemDefOffset == 0) + if (FortVehicleItemDefOffset == -1) return nullptr; auto& SoftFortVehicleItemDef = VehicleSpawner->Get>(FortVehicleItemDefOffset); @@ -202,7 +202,7 @@ static inline void SpawnVehicles() static auto VIDClass = FindObject("/Script/FortniteGame.FortVehicleItemDefinition"); - if (FortVehicleItemDefVariantsOffset != 0) + if (FortVehicleItemDefVariantsOffset != -1) { struct FVehicleWeightedDef { @@ -250,7 +250,7 @@ static inline void SpawnVehicles() { static auto FortVehicleItemDefOffset = VehicleSpawner->GetOffset("FortVehicleItemDef"); - if (FortVehicleItemDefOffset == 0) + if (FortVehicleItemDefOffset == -1) { }