mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
someone fix 12.00 floor loot spawn please
This commit is contained in:
@@ -27,7 +27,7 @@ void LoopSpecs(UAbilitySystemComponent* AbilitySystemComponent, std::function<vo
|
||||
|
||||
FActiveGameplayEffectHandle UAbilitySystemComponent::ApplyGameplayEffectToSelf(UClass* GameplayEffectClass, float Level, const FGameplayEffectContextHandle& EffectContext)
|
||||
{
|
||||
static auto BP_ApplyGameplayEffectToSelfFn = FindObject<UFunction>("/Script/GameplayAbilities.AbilitySystemComponent.BP_ApplyGameplayEffectToSelf");
|
||||
static auto BP_ApplyGameplayEffectToSelfFn = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.BP_ApplyGameplayEffectToSelf");
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -74,7 +74,7 @@ void UAbilitySystemComponent::ServerEndAbility(FGameplayAbilitySpecHandle Abilit
|
||||
|
||||
void UAbilitySystemComponent::ClientEndAbility(FGameplayAbilitySpecHandle AbilityToEnd, FGameplayAbilityActivationInfo* ActivationInfo)
|
||||
{
|
||||
static auto ClientEndAbilityFn = FindObject<UFunction>("/Script/GameplayAbilities.AbilitySystemComponent.ClientEndAbility");
|
||||
static auto ClientEndAbilityFn = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ClientEndAbility");
|
||||
|
||||
auto Params = Alloc(ClientEndAbilityFn->GetPropertiesSize());
|
||||
|
||||
@@ -144,7 +144,7 @@ void UAbilitySystemComponent::InternalServerTryActivateAbilityHook(UAbilitySyste
|
||||
|
||||
auto Spec = AbilitySystemComponent->FindAbilitySpecFromHandle(Handle);
|
||||
|
||||
static auto PredictionKeyStruct = FindObject<UStruct>("/Script/GameplayAbilities.PredictionKey");
|
||||
static auto PredictionKeyStruct = FindObject<UStruct>(L"/Script/GameplayAbilities.PredictionKey");
|
||||
static auto PredictionKeySize = PredictionKeyStruct->GetPropertiesSize();
|
||||
static auto CurrentOffset = FindOffsetStruct("/Script/GameplayAbilities.PredictionKey", "Current");
|
||||
|
||||
@@ -239,7 +239,7 @@ FGameplayAbilitySpec* UAbilitySystemComponent::FindAbilitySpecFromHandle(FGamepl
|
||||
|
||||
void UAbilitySystemComponent::RemoveActiveGameplayEffectBySourceEffect(UClass* GameplayEffect, UAbilitySystemComponent* InstigatorAbilitySystemComponent, int StacksToRemove)
|
||||
{
|
||||
static auto RemoveActiveGameplayEffectBySourceEffectFn = FindObject<UFunction>("/Script/GameplayAbilities.AbilitySystemComponent.RemoveActiveGameplayEffectBySourceEffect");
|
||||
static auto RemoveActiveGameplayEffectBySourceEffectFn = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.RemoveActiveGameplayEffectBySourceEffect");
|
||||
|
||||
struct
|
||||
{
|
||||
|
||||
@@ -23,14 +23,7 @@ struct FGameplayAttribute
|
||||
if (!Attribute)
|
||||
return "INVALIDATTRIBUTE";
|
||||
|
||||
FName* NamePrivate = nullptr;
|
||||
|
||||
if (Engine_Version >= 425)
|
||||
NamePrivate = (FName*)(__int64(Attribute) + 0x28);
|
||||
else
|
||||
NamePrivate = &((UField*)Attribute)->NamePrivate;
|
||||
|
||||
return NamePrivate->ToString();
|
||||
return GetFNameOfProp(Attribute)->ToString();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,24 @@ struct UField : UObject
|
||||
// void* pad; void* pad2;
|
||||
};
|
||||
|
||||
template <typename PropertyType = void>
|
||||
static inline PropertyType* GetNext(void* Field)
|
||||
{
|
||||
return Fortnite_Version >= 12.10 ? *(PropertyType**)(__int64(Field) + 0x20) : ((UField*)Field)->Next;
|
||||
}
|
||||
|
||||
static inline FName* GetFNameOfProp(void* Property)
|
||||
{
|
||||
FName* NamePrivate = nullptr;
|
||||
|
||||
if (Fortnite_Version >= 12.10)
|
||||
NamePrivate = (FName*)(__int64(Property) + 0x28);
|
||||
else
|
||||
NamePrivate = &((UField*)Property)->NamePrivate;
|
||||
|
||||
return NamePrivate;
|
||||
}
|
||||
|
||||
class UStruct : public UField
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -645,6 +645,8 @@ bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* Game
|
||||
|
||||
GameState->OnRep_CurrentPlaylistInfo(); // ?
|
||||
|
||||
// Calendar::SetSnow(1000);
|
||||
|
||||
static auto bAlwaysDBNOOffset = GameMode->GetOffset("bAlwaysDBNO");
|
||||
// GameMode->Get<bool>(bAlwaysDBNOOffset) = true;
|
||||
|
||||
@@ -1169,6 +1171,8 @@ void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena
|
||||
}
|
||||
}
|
||||
|
||||
LOG_INFO(LogDev, "Spawning loot!");
|
||||
|
||||
auto SpawnIsland_FloorLoot = FindObject<UClass>(L"/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_Warmup.Tiered_Athena_FloorLoot_Warmup_C");
|
||||
auto BRIsland_FloorLoot = FindObject<UClass>(L"/Game/Athena/Environments/Blueprints/Tiered_Athena_FloorLoot_01.Tiered_Athena_FloorLoot_01_C");
|
||||
|
||||
|
||||
@@ -366,8 +366,6 @@ void PickLootDropsFromLootPackage(const std::vector<UDataTable*>& LPTables, cons
|
||||
}
|
||||
}
|
||||
|
||||
// #define brudda
|
||||
|
||||
std::vector<LootDrop> PickLootDrops(FName TierGroupName, int WorldLevel, int ForcedLootTier, bool bPrint, int recursive, bool bCombineDrops)
|
||||
{
|
||||
std::vector<LootDrop> LootDrops;
|
||||
|
||||
@@ -713,6 +713,8 @@ void AFortPlayerController::ServerAttemptAircraftJumpHook(AFortPlayerController*
|
||||
|
||||
void AFortPlayerController::ServerSuicideHook(AFortPlayerController* PlayerController)
|
||||
{
|
||||
LOG_INFO(LogDev, "Suicide!");
|
||||
|
||||
auto Pawn = PlayerController->GetPawn();
|
||||
|
||||
if (!Pawn)
|
||||
|
||||
@@ -7,18 +7,6 @@
|
||||
#include "UObjectArray.h"
|
||||
#include "Package.h"
|
||||
|
||||
FName* getFNameOfProp(void* Property)
|
||||
{
|
||||
FName* NamePrivate = nullptr;
|
||||
|
||||
if (Engine_Version >= 425)
|
||||
NamePrivate = (FName*)(__int64(Property) + 0x28);
|
||||
else
|
||||
NamePrivate = &((UField*)Property)->NamePrivate;
|
||||
|
||||
return NamePrivate;
|
||||
};
|
||||
|
||||
void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound) const
|
||||
{
|
||||
for (auto CurrentClass = ClassPrivate; CurrentClass; CurrentClass = *(UClass**)(__int64(CurrentClass) + Offsets::SuperStruct))
|
||||
@@ -29,7 +17,7 @@ void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound) c
|
||||
{
|
||||
// LOG_INFO(LogDev, "Reading prop name..");
|
||||
|
||||
std::string PropName = getFNameOfProp(Property)->ToString();
|
||||
std::string PropName = GetFNameOfProp(Property)->ToString();
|
||||
|
||||
// LOG_INFO(LogDev, "PropName: {}", PropName);
|
||||
|
||||
@@ -45,8 +33,8 @@ void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound) c
|
||||
return Property;
|
||||
}
|
||||
|
||||
Property = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
|
||||
PropName = Property ? getFNameOfProp(Property)->ToString() : "";
|
||||
Property = GetNext(Property);
|
||||
PropName = Property ? GetFNameOfProp(Property)->ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,7 +55,7 @@ void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound)
|
||||
{
|
||||
// LOG_INFO(LogDev, "Reading prop name..");
|
||||
|
||||
std::string PropName = getFNameOfProp(Property)->ToString();
|
||||
std::string PropName = GetFNameOfProp(Property)->ToString();
|
||||
|
||||
// LOG_INFO(LogDev, "PropName: {}", PropName);
|
||||
|
||||
@@ -83,8 +71,8 @@ void* UObject::GetProperty(const std::string& ChildName, bool bWarnIfNotFound)
|
||||
return Property;
|
||||
}
|
||||
|
||||
Property = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
|
||||
PropName = Property ? getFNameOfProp(Property)->ToString() : "";
|
||||
Property = GetNext(Property);
|
||||
PropName = Property ? GetFNameOfProp(Property)->ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -819,14 +819,7 @@ namespace EExprToken
|
||||
|
||||
std::string GetNameSafe(void* Property)
|
||||
{
|
||||
FName* NamePrivate = nullptr;
|
||||
|
||||
if (Engine_Version >= 425)
|
||||
NamePrivate = (FName*)(__int64(Property) + 0x28);
|
||||
else
|
||||
NamePrivate = &((UField*)Property)->NamePrivate;
|
||||
|
||||
return NamePrivate->ToString();
|
||||
return GetFNameOfProp(Property)->ToString();
|
||||
}
|
||||
|
||||
void FKismetBytecodeDisassembler::ProcessCommon(int32& ScriptIndex, uint8 Opcode)
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
LOG_INFO(LogDev, "No code!");
|
||||
|
||||
void* Property = GetPropertyChainForCompiledIn();
|
||||
GetPropertyChainForCompiledIn() = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
|
||||
GetPropertyChainForCompiledIn() = GetNext(Property);
|
||||
StepExplicitProperty(Result, Property);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,16 +37,18 @@ public:
|
||||
if (!NewStr/* || std::wcslen(NewStr) == 0 */)
|
||||
return;
|
||||
|
||||
constexpr size_t Inc = 1;
|
||||
|
||||
#ifndef EXPERIMENTAL_FSTRING
|
||||
Data.ArrayMax = Data.ArrayNum = *NewStr ? (int)std::wcslen(NewStr) + 1 : 0;
|
||||
Data.ArrayMax = Data.ArrayNum = *NewStr ? (int)std::wcslen(NewStr) + Inc : 0;
|
||||
|
||||
if (Data.ArrayNum)
|
||||
Data.Data = const_cast<wchar_t*>(NewStr);
|
||||
#else
|
||||
Data.ArrayNum = (int)std::wcslen(NewStr) + 1;
|
||||
Data.ArrayNum = (int)std::wcslen(NewStr) + Inc;
|
||||
Data.ArrayMax = Data.ArrayNum;
|
||||
|
||||
if (Data.ArrayNum > 0) // this should never happen unless std::wcslen returns negative..
|
||||
if (Data.ArrayNum > 0)
|
||||
{
|
||||
int amountToAlloc = (Data.ArrayNum * sizeof(TCHAR));
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ void UWorld::Listen()
|
||||
|
||||
static auto LevelCollectionsOffset = GetWorld()->GetOffset("LevelCollections");
|
||||
auto& LevelCollections = GetWorld()->Get<TArray<__int64>>(LevelCollectionsOffset);
|
||||
static int LevelCollectionSize = FindObject<UStruct>("/Script/Engine.LevelCollection")->GetPropertiesSize();
|
||||
static int LevelCollectionSize = FindObject<UStruct>(L"/Script/Engine.LevelCollection")->GetPropertiesSize();
|
||||
|
||||
*(UNetDriver**)(__int64(LevelCollections.AtPtr(0, LevelCollectionSize)) + 0x10) = NewNetDriver;
|
||||
*(UNetDriver**)(__int64(LevelCollections.AtPtr(1, LevelCollectionSize)) + 0x10) = NewNetDriver;
|
||||
|
||||
@@ -389,15 +389,17 @@ void Addresses::Print()
|
||||
|
||||
void Offsets::FindAll()
|
||||
{
|
||||
Offsets::Offset_Internal = Engine_Version >= 425 && std::floor(Fortnite_Version) < 20 ? 0x4C : 0x44;
|
||||
Offsets::Offset_Internal = Fortnite_Version >= 12.10 && std::floor(Fortnite_Version) < 20 ? 0x4C : 0x44;
|
||||
Offsets::SuperStruct = Engine_Version >= 422 ? 0x40 : 0x30;
|
||||
Offsets::Children = Engine_Version >= 425 ? 0x50 : Offsets::SuperStruct + 8;
|
||||
Offsets::Children = Fortnite_Version >= 12.10 ? 0x50 : Offsets::SuperStruct + 8;
|
||||
Offsets::PropertiesSize = Offsets::Children + 8;
|
||||
|
||||
if (Engine_Version >= 416 && Engine_Version <= 421)
|
||||
Offsets::Func = 0xB0;
|
||||
else if (Engine_Version >= 422 && Engine_Version <= 424)
|
||||
Offsets::Func = 0xC0;
|
||||
else if (Fortnite_Version >= 12.00 && Fortnite_Version < 12.10)
|
||||
Offsets::Func = 0xC8;
|
||||
else if (Engine_Version == 425)
|
||||
Offsets::Func = 0xF0;
|
||||
else if (Engine_Version >= 426)
|
||||
@@ -540,11 +542,6 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
|
||||
toNull.push_back(Memcury::Scanner::FindStringRef(L"Widget Class %s - Running Initialize On Archetype, %s.").ScanFor({ 0x40, 0x55 }, false).Get()); // Widget class
|
||||
}
|
||||
|
||||
if (Engine_Version == 421)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindStringRef(L"Widget Class %s - Running Initialize On Archetype, %s.").ScanFor({ 0x40, 0x55 }, false).Get()); // Widget class
|
||||
}
|
||||
|
||||
if (Engine_Version == 422)
|
||||
{
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 57 48 83 EC 30 48 8B 41 28 48 8B DA 48 8B F9 48 85 C0 74 34 48 8B 4B 08 48 8D").Get()); // widget class
|
||||
@@ -582,7 +579,7 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 55 53 56 57 41 54 41 55 41 56 41 57 48 8D 68 A1 48 81 EC ? ? ? ? 45 33 F6 0F 29 70 A8 44 38 35").Get()); // zone
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 48 89 58 08 55 56 57 41 54 41 55 41 56 41 57 48 8D 68 A8 48 81 EC ? ? ? ? 45").Get()); // GC
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("40 53 48 83 EC 20 8B D9 E8 ? ? ? ? B2 01 8B CB E8").Get()); // GC Caller 1
|
||||
// toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 55 41 56 48 8B EC 48 83 EC 50 83 65 28 00 40 B6 05 40 38 35 ? ? ? ? 4C").Get()); // InitializeUI
|
||||
toNull.push_back(Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 48 89 7C 24 ? 55 41 55 41 56 48 8B EC 48 83 EC 50 83 65 28 00 40 B6 05 40 38 35 ? ? ? ? 4C").Get()); // InitializeUI
|
||||
}
|
||||
|
||||
if (Engine_Version >= 426)
|
||||
|
||||
@@ -66,6 +66,8 @@ namespace Calendar
|
||||
|
||||
LOG_INFO(LogDev, "Called OnReady!");
|
||||
|
||||
return;
|
||||
|
||||
if (NewValue != -1)
|
||||
{
|
||||
static auto SnowAmountOffset = SnowSetup->GetOffset("SnowAmount");
|
||||
@@ -77,6 +79,8 @@ namespace Calendar
|
||||
// SnowSetup->ProcessEvent(SetSnowFn, &NewValue);
|
||||
}
|
||||
|
||||
auto SetFallingSnowFn = FindObject<UFunction>("/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetFallingSnow");
|
||||
|
||||
LOG_INFO(LogDev, "Called SetSnow!");
|
||||
|
||||
static auto ada = FindObject<UFunction>(L"/Game/Athena/Apollo/Environments/Blueprints/CalendarEvents/BP_ApolloSnowSetup.BP_ApolloSnowSetup_C.SetFullSnowEd");
|
||||
|
||||
@@ -168,9 +168,9 @@ void __fastcall ApplyHomebaseEffectsOnPlayerSetupHook(
|
||||
AthenaHeroTypes.push_back(CurrentHeroType);
|
||||
}
|
||||
|
||||
if (AthenaHeroTypes.size())
|
||||
if (AthenaHeroTypes.size() > 0)
|
||||
{
|
||||
HeroType = AthenaHeroTypes.at(std::rand() % AthenaHeroTypes.size());
|
||||
HeroType = AthenaHeroTypes.at(std::rand() % AthenaHeroTypes.size() /* - 1 */);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -512,6 +512,8 @@ DWORD WINAPI Main(LPVOID)
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x41624C8), (PVOID)ActivatePhaseAtIndexHook, (PVOID*)&ActivatePhaseAtIndexOriginal); // 7FF79E3E24C8
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
if (Fortnite_Version == 6.21)
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x191D2E0), (PVOID)CanCreateInCurrentContextHook, (PVOID*)&CanCreateInCurrentContextOriginal);
|
||||
else if (Fortnite_Version == 10.40)
|
||||
@@ -519,6 +521,8 @@ DWORD WINAPI Main(LPVOID)
|
||||
else if (Fortnite_Version == 12.41)
|
||||
Hooking::MinHook::Hook((PVOID)(__int64(GetModuleHandleW(0)) + 0x2DBCBA0), (PVOID)CanCreateInCurrentContextHook, (PVOID*)&CanCreateInCurrentContextOriginal);
|
||||
|
||||
*/
|
||||
|
||||
ChangeLevels();
|
||||
|
||||
auto AddressesToNull = Addresses::GetFunctionsToNull();
|
||||
|
||||
@@ -1277,63 +1277,46 @@ static inline void PregameUI()
|
||||
ImGui::InputText("Playlist", &PlaylistName);
|
||||
}
|
||||
|
||||
static inline HICON LoadIconFromMemory(const char* bytes, int bytes_size, const wchar_t* IconName) {
|
||||
HANDLE hMemory = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, bytes_size, IconName);
|
||||
if (hMemory == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LPVOID lpBuffer = MapViewOfFile(hMemory, FILE_MAP_READ, 0, 0, bytes_size);
|
||||
|
||||
if (lpBuffer == NULL) {
|
||||
CloseHandle(hMemory);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ICONINFO icon_info;
|
||||
|
||||
if (!GetIconInfo((HICON)lpBuffer, &icon_info)) {
|
||||
UnmapViewOfFile(lpBuffer);
|
||||
CloseHandle(hMemory);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
HICON hIcon = CreateIconIndirect(&icon_info);
|
||||
UnmapViewOfFile(lpBuffer);
|
||||
CloseHandle(hMemory);
|
||||
return hIcon;
|
||||
}
|
||||
|
||||
static inline DWORD WINAPI GuiThread(LPVOID)
|
||||
{
|
||||
WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, L"RebootClass", NULL };
|
||||
::RegisterClassEx(&wc);
|
||||
HWND hwnd = ::CreateWindowExW(0L, wc.lpszClassName, L"Project Reboot", (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX), 100, 100, Width, Height, NULL, NULL, wc.hInstance, NULL);
|
||||
|
||||
HGLOBAL hGlobal = GlobalAlloc(GMEM_MOVEABLE, sizeof(reboot_icon_data));
|
||||
|
||||
if (!hGlobal)
|
||||
if (false) // idk why this dont work
|
||||
{
|
||||
LOG_WARN(LogDev, "Failed to allocate global icon data!");
|
||||
}
|
||||
else
|
||||
{
|
||||
void* data = GlobalLock(hGlobal);
|
||||
memcpy(data, reboot_icon_data, sizeof(reboot_icon_data));
|
||||
GlobalUnlock(hGlobal);
|
||||
|
||||
IStream* stream;
|
||||
HRESULT hr = CreateStreamOnHGlobal(hGlobal, FALSE, &stream);
|
||||
if (hr != S_OK)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
|
||||
HBITMAP hBitmap{};
|
||||
HRESULT hr1 = CoInitialize(NULL);
|
||||
hr1 = OleLoadPicture(stream, sizeof(reboot_icon_data), FALSE, IID_IPicture, (void**)&hBitmap);
|
||||
stream->Release();
|
||||
GlobalFree(hGlobal);
|
||||
CoUninitialize();
|
||||
|
||||
if (hr1 != S_OK)
|
||||
{
|
||||
// Handle error
|
||||
}
|
||||
|
||||
// Create the icon from the bitmap
|
||||
ICONINFO iconInfo{};
|
||||
iconInfo.fIcon = TRUE;
|
||||
iconInfo.xHotspot = 0;
|
||||
iconInfo.yHotspot = 0;
|
||||
iconInfo.hbmMask = NULL;
|
||||
iconInfo.hbmColor = hBitmap;
|
||||
|
||||
HICON hIcon = CreateIconIndirect(&iconInfo);
|
||||
|
||||
auto hIcon = LoadIconFromMemory((const char*)reboot_icon_data, strlen((const char*)reboot_icon_data), L"RebootIco");
|
||||
SendMessageW(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
|
||||
SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
|
||||
|
||||
// Cleanup the resources
|
||||
DeleteObject(iconInfo.hbmColor);
|
||||
}
|
||||
|
||||
// HANDLE hIcon = LoadImageW(wc.hInstance, L"Reboot Resources/images/reboot.ico", IMAGE_ICON, 48, 48, LR_LOADFROMFILE);
|
||||
// SendMessageW(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
|
||||
|
||||
// SetWindowLongPtrW(hwnd, GWL_STYLE, WS_POPUP); // Disables windows title bar at the cost of dragging and some quality
|
||||
|
||||
// Initialize Direct3D
|
||||
@@ -1356,8 +1339,7 @@ static inline DWORD WINAPI GuiThread(LPVOID)
|
||||
io.IniFilename = NULL; // Disable imgui.ini generation.
|
||||
io.DisplaySize = ImGui::GetMainViewport()->Size;
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||
// io.Fonts->AddFontFromFileTTF("../vendor/fonts/Aller_Bd.ttf", 17);
|
||||
// io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
|
||||
|
||||
// Setup Dear ImGui style
|
||||
InitFont();
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace Hooking
|
||||
|
||||
LOG_INFO(LogDev, "Hooking {} with Idx 0x{:x} (0x{:x})", FunctionName, AddrOrIdx, __int64(DefaultClass->VFTable[Idx]) - __int64(GetModuleHandleW(0)));
|
||||
|
||||
VirtualSwap(DefaultClass->VFTable, Idx, Detour);
|
||||
VirtualSwap(DefaultClass->VFTable, Idx, Detour); // we should loop thrugh all objects and check if they inherit from the DefaultClass if so also swap that
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -262,25 +262,13 @@ inline void* FindPropertyStruct(const std::string& StructName, const std::string
|
||||
|
||||
// LOG_INFO(LogFinder, "Struct: {}", Struct->GetFullName());
|
||||
|
||||
auto getFNameOfProp = [](void* Property) -> FName*
|
||||
{
|
||||
FName* NamePrivate = nullptr;
|
||||
|
||||
if (Engine_Version >= 425)
|
||||
NamePrivate = (FName*)(__int64(Property) + 0x28);
|
||||
else
|
||||
NamePrivate = &((UField*)Property)->NamePrivate;
|
||||
|
||||
return NamePrivate;
|
||||
};
|
||||
|
||||
for (auto CurrentClass = Struct; CurrentClass; CurrentClass = *(UObject**)(__int64(CurrentClass) + Offsets::SuperStruct))
|
||||
{
|
||||
void* Property = *(void**)(__int64(CurrentClass) + Offsets::Children);
|
||||
|
||||
if (Property)
|
||||
{
|
||||
std::string PropName = getFNameOfProp(Property)->ToString();
|
||||
std::string PropName = GetFNameOfProp(Property)->ToString();
|
||||
|
||||
if (PropName == MemberName)
|
||||
{
|
||||
@@ -297,7 +285,7 @@ inline void* FindPropertyStruct(const std::string& StructName, const std::string
|
||||
}
|
||||
|
||||
Property = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
|
||||
PropName = Property ? getFNameOfProp(Property)->ToString() : "";
|
||||
PropName = Property ? GetFNameOfProp(Property)->ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -322,25 +310,13 @@ inline int FindOffsetStruct(const std::string& StructName, const std::string& Me
|
||||
|
||||
// LOG_INFO(LogFinder, "Struct: {}", Struct->GetFullName());
|
||||
|
||||
auto getFNameOfProp = [](void* Property) -> FName*
|
||||
{
|
||||
FName* NamePrivate = nullptr;
|
||||
|
||||
if (Engine_Version >= 425)
|
||||
NamePrivate = (FName*)(__int64(Property) + 0x28);
|
||||
else
|
||||
NamePrivate = &((UField*)Property)->NamePrivate;
|
||||
|
||||
return NamePrivate;
|
||||
};
|
||||
|
||||
for (auto CurrentClass = Struct; CurrentClass; CurrentClass = *(UObject**)(__int64(CurrentClass) + Offsets::SuperStruct))
|
||||
{
|
||||
void* Property = *(void**)(__int64(CurrentClass) + Offsets::Children);
|
||||
|
||||
if (Property)
|
||||
{
|
||||
std::string PropName = getFNameOfProp(Property)->ToString();
|
||||
std::string PropName = GetFNameOfProp(Property)->ToString();
|
||||
|
||||
if (PropName == MemberName)
|
||||
{
|
||||
@@ -356,8 +332,8 @@ inline int FindOffsetStruct(const std::string& StructName, const std::string& Me
|
||||
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
|
||||
}
|
||||
|
||||
Property = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
|
||||
PropName = Property ? getFNameOfProp(Property)->ToString() : "";
|
||||
Property = GetNext(Property);
|
||||
PropName = Property ? GetFNameOfProp(Property)->ToString() : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user