diff --git a/Project Reboot 3.0/FortGameModeAthena.cpp b/Project Reboot 3.0/FortGameModeAthena.cpp index 9065cb3..ca872d6 100644 --- a/Project Reboot 3.0/FortGameModeAthena.cpp +++ b/Project Reboot 3.0/FortGameModeAthena.cpp @@ -547,7 +547,16 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game ShowFoundation(FindObject(L"/Game/Athena/Apollo/Maps/Apollo_POI_Foundations.Apollo_POI_Foundations.PersistentLevel.Lobby_Foundation3")); // Aircraft Carrier } - auto TheBlock = FindObject(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank + AActor* TheBlock = nullptr; + + if (Fortnite_Version > 10) // todo only checked on 10.40 + { + TheBlock = FindObject(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_4"); + } + else + { + TheBlock = FindObject(L"/Game/Athena/Maps/Athena_POI_Foundations.Athena_POI_Foundations.PersistentLevel.SLAB_2"); // SLAB_3 is blank + } if (TheBlock) ShowFoundation(TheBlock); diff --git a/Project Reboot 3.0/FortPlayerController.cpp b/Project Reboot 3.0/FortPlayerController.cpp index 3099d43..0eef95f 100644 --- a/Project Reboot 3.0/FortPlayerController.cpp +++ b/Project Reboot 3.0/FortPlayerController.cpp @@ -429,9 +429,6 @@ void AFortPlayerController::ServerAttemptInteractHook(UObject* Context, FFrame* static auto ReceivingActorOffset = FindOffsetStruct(StructName, "ReceivingActor"); auto ReceivingActor = *(AActor**)(__int64(Params) + ReceivingActorOffset); - static auto InteractionBeingAttemptedOffset = FindOffsetStruct(StructName, "InteractionBeingAttempted"); - auto InteractionBeingAttempted = *(EInteractionBeingAttempted*)(__int64(Params) + InteractionBeingAttemptedOffset); - // LOG_INFO(LogInteraction, "ReceivingActor: {}", __int64(ReceivingActor)); if (!ReceivingActor) @@ -530,6 +527,9 @@ void AFortPlayerController::ServerAttemptInteractHook(UObject* Context, FFrame* { if (Engine_Version >= 424 && Fortnite_Version < 15 && ReceivingActor->GetFullName().contains("Wumba")) { + static auto InteractionBeingAttemptedOffset = FindOffsetStruct(StructName, "InteractionBeingAttempted"); + auto InteractionBeingAttempted = *(EInteractionBeingAttempted*)(__int64(Params) + InteractionBeingAttemptedOffset); + bool bIsSidegrading = InteractionBeingAttempted == EInteractionBeingAttempted::SecondInteraction ? true : false; LOG_INFO(LogDev, "bIsSidegrading: {}", (bool)bIsSidegrading); diff --git a/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters b/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters index 62285ea..5311c96 100644 --- a/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters +++ b/Project Reboot 3.0/Project Reboot 3.0.vcxproj.filters @@ -307,7 +307,6 @@ - Engine\Source\Runtime\Core\Public\Containers @@ -960,6 +959,9 @@ FortniteGame\Source\FortniteGame\Public + + Reboot\Public + diff --git a/Project Reboot 3.0/finder.cpp b/Project Reboot 3.0/finder.cpp index ac42fd7..69bac66 100644 --- a/Project Reboot 3.0/finder.cpp +++ b/Project Reboot 3.0/finder.cpp @@ -44,6 +44,90 @@ uint64 FindStartAircraftPhase() return 0; } +uint64 FindGIsClient() +{ + /* if (Fortnite_Version >= 20) + return 0; */ + + auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering"); + + std::vector> BytesArray = { + // {0x88, 0x05}, // Idk what version this is + {0xC6, 0x05}, // mov cs X // Checked on 1.11, 12.41 + {0x88, 0x1D}, // mov cs bl // Checked on 17.50, 19.10 + // {0x44, 0x88} // IDK WHAT VERSION This for but it scuffs older builds + }; + + int Skip = Engine_Version <= 420 ? 1 : 2; // Skip GIsServer and some variable i forgot + + uint64 Addy; + + for (int i = 0; i < 50; i++) // we should subtract from skip if go up + { + auto CurrentByte = *(Memcury::ASM::MNEMONIC*)(Addr.Get() - i); + + // if (bPrint) + // std::cout << "CurrentByte: " << std::hex << (int)CurrentByte << '\n'; + + bool ShouldBreak = false; + + // LOG_INFO(LogDev, "[{}] Byte: 0x{:x}", i, (int)CurrentByte); + + for (auto& Bytes : BytesArray) + { + if (CurrentByte == Bytes[0]) + { + bool Found = true; + for (int j = 1; j < Bytes.size(); j++) + { + if (*(Memcury::ASM::MNEMONIC*)(Addr.Get() - i + j) != Bytes[j]) + { + Found = false; + break; + } + } + if (Found) + { + int Relative = Bytes[0] == 0x44 ? 3 : 2; + auto current = Memcury::Scanner(Addr.Get() - i); + // LOG_INFO(LogDev, "[{}] No Rel 0x{:x} Rel: 0x{:x}", Skip, current.Get() - __int64(GetModuleHandleW(0)), Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get() - __int64(GetModuleHandleW(0))); + + if (Skip > 0) + { + Skip--; + continue; + } + + Addy = Bytes[0] == 0xC6 + ? current.RelativeOffset(Relative, 1).Get() // If mov cs then we add 1 because the last byte is the value and makes whole instructions 1 byte longer + : current.RelativeOffset(Relative).Get(); + ShouldBreak = true; + break; + } + } + } + + if (ShouldBreak) + break; + + // std::cout << std::format("CurrentByte: 0x{:x}\n", (uint8_t)CurrentByte); + } + + // LOG_INFO(LogDev, "Addy: 0x{:x}", Addy - __int64(GetModuleHandleW(0))); + + return Addy; // 0; // Memcury::Scanner(Addy3).RelativeOffset(2).Get(); + + /* + auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering"); + int Skip = 1; + auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, Skip); + Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, Skip); + Addy = Addy ? Addy : FindBytes(Addr, { 0x88, 0x1D }, 50, 0, true, Skip); + + return Memcury::Scanner(Addy).RelativeOffset(2).Get(); + */ +} + uint64 FindGetSessionInterface() { auto strRef = Memcury::Scanner::FindStringRef(L"OnDestroyReservedSessionComplete %s bSuccess: %d", true, 0, Fortnite_Version >= 19).Get(); diff --git a/Project Reboot 3.0/finder.h b/Project Reboot 3.0/finder.h index b5df0ec..d993c6f 100644 --- a/Project Reboot 3.0/finder.h +++ b/Project Reboot 3.0/finder.h @@ -1109,7 +1109,7 @@ static inline uint64 FindCollectGarbage() static inline uint64 FindActorGetNetMode() { - // return 0; + return 0; // We *shouldnt* need to hook this now because I fixed FindGIsClient if (Engine_Version == 500) // hah well this and 427 does like nothing cuz inline mostly { @@ -1463,81 +1463,7 @@ static inline uint64 FindMcpIsDedicatedServerOffset() return 0x60; // 1.7.2 & 1.11 & 4.1 } -static inline uint64 FindGIsClient() -{ - /* if (Fortnite_Version >= 20) - return 0; */ - - auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering"); - - std::vector> BytesArray = { {0x88, 0x05}, {0xC6, 0x05}, {0x88, 0x1D}, {0x44, 0x88}}; - - int Skip = Engine_Version <= 420 ? 1 : 2; - - uint64 Addy; - - for (int i = 0; i < 50; i++) // we should subtract from skip if goup - { - auto CurrentByte = *(Memcury::ASM::MNEMONIC*)(Addr.Get() - i); - - // if (bPrint) - // std::cout << "CurrentByte: " << std::hex << (int)CurrentByte << '\n'; - - bool ShouldBreak = false; - - // LOG_INFO(LogDev, "[{}] Byte: 0x{:x}", i, (int)CurrentByte); - - for (auto& Bytes : BytesArray) - { - if (CurrentByte == Bytes[0]) - { - bool Found = true; - for (int j = 1; j < Bytes.size(); j++) - { - if (*(Memcury::ASM::MNEMONIC*)(Addr.Get() - i + j) != Bytes[j]) - { - Found = false; - break; - } - } - if (Found) - { - int Relative = Bytes[0] == 0x44 ? 3 : 2; - // LOG_INFO(LogDev, "[{}] No Rel 0x{:x} Rel: 0x{:x}", Skip, Memcury::Scanner(Addr.Get() - i).Get() - __int64(GetModuleHandleW(0)), Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get() - __int64(GetModuleHandleW(0))); - - if (Skip > 0) - { - Skip--; - continue; - } - - Addy = Memcury::Scanner(Addr.Get() - i).RelativeOffset(Relative).Get(); - ShouldBreak = true; - break; - } - } - } - - if (ShouldBreak) - break; - - // std::cout << std::format("CurrentByte: 0x{:x}\n", (uint8_t)CurrentByte); - } - - // LOG_INFO(LogDev, "Addy: 0x{:x}", Addy - __int64(GetModuleHandleW(0))); - - return Addy; // 0; // Memcury::Scanner(Addy3).RelativeOffset(2).Get(); - - /* - auto Addr = Memcury::Scanner::FindStringRef(L"AllowCommandletRendering"); - int Skip = 1; - auto Addy = FindBytes(Addr, { 0xC6, 0x05 }, 50, 0, true, Skip); - Addy = Addy ? Addy : FindBytes(Addr, { 0x44, 0x88 }, 50, 0, true, Skip); - Addy = Addy ? Addy : FindBytes(Addr, { 0x88, 0x1D }, 50, 0, true, Skip); - - return Memcury::Scanner(Addy).RelativeOffset(2).Get(); - */ -} +uint64 FindGIsClient(); // AHHH static inline uint64 FindGetNetMode() { diff --git a/Project Reboot 3.0/gui.h b/Project Reboot 3.0/gui.h index bb1b4e0..211a235 100644 --- a/Project Reboot 3.0/gui.h +++ b/Project Reboot 3.0/gui.h @@ -110,6 +110,11 @@ static inline void SetIsLategame(bool Value) StartingShield = Value ? 100 : 0; } +static inline bool HasAnyCalendarModification() +{ + return Calendar::HasSnowModification() || Calendar::HasNYE() || std::floor(Fortnite_Version) == 13; +} + static inline void Restart() // todo move? { FString LevelA = Engine_Version < 424 @@ -378,7 +383,7 @@ static inline void MainTabs() } } - if (ImGui::BeginTabItem("Calendar Events")) + if (HasAnyCalendarModification() && ImGui::BeginTabItem("Calendar Events")) { Tab = CALENDAR_TAB; PlayerTab = -1; diff --git a/vendor/memcury.h b/vendor/memcury.h index bd14498..f691aa1 100644 --- a/vendor/memcury.h +++ b/vendor/memcury.h @@ -512,9 +512,9 @@ return _address != address._address; } - auto RelativeOffset(uint32_t offset) -> Address + auto RelativeOffset(uint32_t offset, uint32_t off2 = 0) -> Address { - _address = ((_address + offset + 4) + *(int32_t*)(_address + offset)); + _address = ((_address + offset + 4 + off2) + *(int32_t*)(_address + offset)); return *this; } @@ -1010,7 +1010,7 @@ return *this; } - auto RelativeOffset(uint32_t offset) -> Scanner + auto RelativeOffset(uint32_t offset, uint32_t off2 = 0) -> Scanner { if (!_address.Get()) { @@ -1018,7 +1018,7 @@ return *this; } - _address.RelativeOffset(offset); + _address.RelativeOffset(offset, off2); return *this; }