Add project files.

This commit is contained in:
Milxnor
2023-03-04 15:06:07 -05:00
commit 039731eb68
200 changed files with 32320 additions and 0 deletions

387
- Copy.gitignore Normal file
View File

@@ -0,0 +1,387 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
.vs/Project Reboot 3.0/v17/Browse.VC.db
.vs/Project Reboot 3.0/v17/.suo
.vs/Project Reboot 3.0/v17/fileList.bin
.vs/Project Reboot 3.0/v17/ipch/AutoPCH/389a1fa1f6dcd16f/DLLMAIN.ipch
.vs/Project Reboot 3.0/v17/ipch/AutoPCH/6b05e7771d6ded15/UTIL.ipch
Project Reboot 3.0/x64/Release/Project Reboot 3.0.tlog/CL.read.1.tlog
Project Reboot 3.0/x64/Release/Project Reboot 3.0.tlog/link.read.1.tlog
Project Reboot 3.0/x64/Release/Project Reboot 3.0.tlog/CL.write.1.tlog
Project Reboot 3.0e/x64/Release/vc143.pdb
x64/Release/Project Reboot 3.0.pdb
Project Reboot 3.0/x64/Release/Project Reboot 3.0.log
Project Reboot 3.0/x64/Release/Project Reboot 3.0.ipdb
Project Reboot 3.0/x64/Release/Project Reboot 3.0.iobj
.vs/Project Reboot 3.0/v17/Browse.VC.db
.vs/Project Reboot 3.0/v17/.suo
.vs/Project Reboot 3.0/v17/.suo
*.db
*.bin
*.ipch
*.ipdb
*.iobj
*.tlog
*.ifc
*.pdb

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

387
.gitignore vendored Normal file
View File

@@ -0,0 +1,387 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Oo]ut/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
.vs/Project Reboot 3.0/v17/Browse.VC.db
.vs/Project Reboot 3.0/v17/.suo
.vs/Project Reboot 3.0/v17/fileList.bin
.vs/Project Reboot 3.0/v17/ipch/AutoPCH/389a1fa1f6dcd16f/DLLMAIN.ipch
.vs/Project Reboot 3.0/v17/ipch/AutoPCH/6b05e7771d6ded15/UTIL.ipch
Project Reboot 3.0/x64/Release/Project Reboot 3.0.tlog/CL.read.1.tlog
Project Reboot 3.0/x64/Release/Project Reboot 3.0.tlog/link.read.1.tlog
Project Reboot 3.0/x64/Release/Project Reboot 3.0.tlog/CL.write.1.tlog
Project Reboot 3.0e/x64/Release/vc143.pdb
x64/Release/Project Reboot 3.0.pdb
Project Reboot 3.0/x64/Release/Project Reboot 3.0.log
Project Reboot 3.0/x64/Release/Project Reboot 3.0.ipdb
Project Reboot 3.0/x64/Release/Project Reboot 3.0.iobj
.vs/Project Reboot 3.0/v17/Browse.VC.db
.vs/Project Reboot 3.0/v17/.suo
.vs/Project Reboot 3.0/v17/.suo
*.db
*.bin
*.ipch
*.ipdb
*.iobj
*.tlog
*.ifc
*.pdb

29
LICENSE Normal file
View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2023, Milxnor
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

31
Project Reboot 3.0.sln Normal file
View File

@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project Reboot 3.0", "Project Reboot 3.0\Project Reboot 3.0.vcxproj", "{69618184-B9DB-4982-B4FE-F83E9BDD0555}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Debug|x64.ActiveCfg = Debug|x64
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Debug|x64.Build.0 = Debug|x64
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Debug|x86.ActiveCfg = Debug|Win32
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Debug|x86.Build.0 = Debug|Win32
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Release|x64.ActiveCfg = Release|x64
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Release|x64.Build.0 = Release|x64
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Release|x86.ActiveCfg = Release|Win32
{69618184-B9DB-4982-B4FE-F83E9BDD0555}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {ABF83670-C6F5-441C-9B62-254EF634207B}
EndGlobalSection
EndGlobal

BIN
Project Reboot 3.0.zip Normal file

Binary file not shown.

View File

@@ -0,0 +1,32 @@
#pragma once
#include "Object.h"
#include "GameplayAbilitySpec.h"
struct PadHex18 { char Pad[0x18]; };
struct PadHexB0 { char Pad[0xB0]; };
using FPredictionKey = PadHex18;
using FGameplayEventData = PadHexB0;
class UAbilitySystemComponent : public UObject
{
public:
static inline FGameplayAbilitySpecHandle* (*GiveAbilityOriginal)(UAbilitySystemComponent*, FGameplayAbilitySpecHandle*, __int64 inSpec);
static inline bool (*InternalTryActivateAbilityOriginal)(UAbilitySystemComponent*, FGameplayAbilitySpecHandle Handle, PadHex18 InPredictionKey, UObject** OutInstancedAbility, void* OnGameplayAbilityEndedDelegate, const FGameplayEventData* TriggerEventData);
void ClientActivateAbilityFailed(FGameplayAbilitySpecHandle AbilityToActivate, int16_t PredictionKey)
{
struct { FGameplayAbilitySpecHandle AbilityToActivate; int16_t PredictionKey; } UAbilitySystemComponent_ClientActivateAbilityFailed_Params{ AbilityToActivate, PredictionKey };
static auto fn = FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ClientActivateAbilityFailed");
this->ProcessEvent(fn, &UAbilitySystemComponent_ClientActivateAbilityFailed_Params);
}
FGameplayAbilitySpecHandle GiveAbilityEasy(UClass* AbilityClass);
FGameplayAbilitySpec* FindAbilitySpecFromHandle(FGameplayAbilitySpecHandle Handle);
static void ServerTryActivateAbilityHook(UAbilitySystemComponent* AbilitySystemComponent, FGameplayAbilitySpecHandle Handle, bool InputPressed, FPredictionKey PredictionKey);
static void ServerTryActivateAbilityWithEventDataHook(UAbilitySystemComponent* AbilitySystemComponent, FGameplayAbilitySpecHandle Handle, bool InputPressed, FPredictionKey PredictionKey, FGameplayEventData TriggerEventData);
static void ServerAbilityRPCBatchHook(UAbilitySystemComponent* AbilitySystemComponent, __int64 BatchInfo);
};

View File

@@ -0,0 +1,111 @@
#include "AbilitySystemComponent.h"
#include "NetSerialization.h"
void LoopSpecs(UAbilitySystemComponent* AbilitySystemComponent, std::function<void(FGameplayAbilitySpec*)> func)
{
static auto ActivatableAbilitiesOffset = AbilitySystemComponent->GetOffset("ActivatableAbilities");
auto ActivatableAbilities = AbilitySystemComponent->GetPtr<FFastArraySerializer>(ActivatableAbilitiesOffset);
static auto ItemsOffset = 0x0108;
auto Items = (TArray<__int64>*)(__int64(ActivatableAbilities) + ItemsOffset);
static auto SpecSize = FGameplayAbilitySpec::GetStructSize();
if (ActivatableAbilities && Items)
{
for (int i = 0; i < Items->Num(); i++)
{
auto CurrentSpec = (FGameplayAbilitySpec*)(__int64(Items->Data) + (static_cast<long long>(SpecSize) * i));
func(CurrentSpec);
}
}
}
void InternalServerTryActivateAbility(UAbilitySystemComponent* AbilitySystemComponent, FGameplayAbilitySpecHandle Handle, /* bool InputPressed, */
const FPredictionKey* PredictionKey, const FGameplayEventData* TriggerEventData) // https://github.com/EpicGames/UnrealEngine/blob/4.23/Engine/Plugins/Runtime/GameplayAbilities/Source/GameplayAbilities/Private/AbilitySystemComponent_Abilities.cpp#L1445
{
using UGameplayAbility = UObject;
auto Spec = AbilitySystemComponent->FindAbilitySpecFromHandle(Handle);
static auto CurrentOffset = 0x0000;
if (!Spec)
{
AbilitySystemComponent->ClientActivateAbilityFailed(Handle, *(int16_t*)(__int64(PredictionKey) + CurrentOffset));
return;
}
// ConsumeAllReplicatedData(Handle, PredictionKey);
const UGameplayAbility* AbilityToActivate = Spec->GetAbility();
if (!AbilityToActivate)
return;
UGameplayAbility* InstancedAbility = nullptr;
SetBitfield(Spec, 1, true); // InputPressed = true
if (!AbilitySystemComponent->InternalTryActivateAbilityOriginal(AbilitySystemComponent, Handle, *(PadHex18*)PredictionKey, &InstancedAbility, nullptr, TriggerEventData))
{
AbilitySystemComponent->ClientActivateAbilityFailed(Handle, *(int16_t*)(__int64(PredictionKey) + CurrentOffset));
SetBitfield(Spec, 1, false); // InputPressed = false
static auto ActivatableAbilitiesOffset = AbilitySystemComponent->GetOffset("ActivatableAbilities");
AbilitySystemComponent->Get<FFastArraySerializer>(ActivatableAbilitiesOffset).MarkItemDirty(Spec);
}
}
FGameplayAbilitySpecHandle UAbilitySystemComponent::GiveAbilityEasy(UClass* AbilityClass)
{
auto NewSpec = MakeNewSpec(AbilityClass);
// LOG_INFO(LogDev, "Made spec!");
FGameplayAbilitySpecHandle Handle;
GiveAbilityOriginal(this, &Handle, __int64(NewSpec));
return Handle;
}
FGameplayAbilitySpec* UAbilitySystemComponent::FindAbilitySpecFromHandle(FGameplayAbilitySpecHandle Handle)
{
FGameplayAbilitySpec* SpecToReturn = nullptr;
auto compareHandles = [&Handle, &SpecToReturn](FGameplayAbilitySpec* Spec) {
auto& CurrentHandle = Spec->GetHandle();
if (CurrentHandle.Handle == Handle.Handle)
{
SpecToReturn = Spec;
return;
}
};
LoopSpecs(this, compareHandles);
return SpecToReturn;
}
void UAbilitySystemComponent::ServerTryActivateAbilityHook(UAbilitySystemComponent* AbilitySystemComponent,
FGameplayAbilitySpecHandle Handle, bool InputPressed, FPredictionKey PredictionKey)
{
InternalServerTryActivateAbility(AbilitySystemComponent, Handle, /* InputPressed, */ &PredictionKey, nullptr);
}
void UAbilitySystemComponent::ServerTryActivateAbilityWithEventDataHook(UAbilitySystemComponent* AbilitySystemComponent,
FGameplayAbilitySpecHandle Handle, bool InputPressed, FPredictionKey PredictionKey, FGameplayEventData TriggerEventData)
{
InternalServerTryActivateAbility(AbilitySystemComponent, Handle, /* InputPressed, */
&PredictionKey, &TriggerEventData);
}
void UAbilitySystemComponent::ServerAbilityRPCBatchHook(UAbilitySystemComponent* AbilitySystemComponent, __int64 BatchInfo)
{
static auto AbilitySpecHandleOffset = 0x0;
static auto PredictionKeyOffset = 0x0008;
InternalServerTryActivateAbility(AbilitySystemComponent, *(FGameplayAbilitySpecHandle*)(__int64(BatchInfo) + AbilitySpecHandleOffset),
/* InputPressed, */ (FPredictionKey*)(__int64(BatchInfo) + PredictionKeyOffset), nullptr);
}

View File

@@ -0,0 +1,30 @@
#include "Actor.h"
#include "Transform.h"
#include "reboot.h"
FTransform AActor::GetTransform()
{
FTransform Ret;
static auto fn = FindObject<UFunction>(L"/Script/Engine.Actor.GetTransform");
this->ProcessEvent(fn, &Ret);
return Ret;
}
AActor* AActor::GetOwner()
{
static auto GetOwnerFunction = FindObject<UFunction>("/Script/Engine.Actor.GetOwner");
AActor* Owner = nullptr;
this->ProcessEvent(GetOwnerFunction, &Owner);
return Owner;
}
void AActor::K2_DestroyActor()
{
static auto DestroyActorFn = FindObject<UFunction>("/Script/Engine.Actor.K2_DestroyActor");
this->ProcessEvent(DestroyActorFn);
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include "Object.h"
class AActor : public UObject
{
public:
struct FTransform GetTransform();
AActor* GetOwner();
void K2_DestroyActor();
};

View File

@@ -0,0 +1,11 @@
#include "ActorComponent.h"
#include "reboot.h"
AActor* UActorComponent::GetOwner()
{
auto GetOwnerFn = FindObject<UFunction>(L"/Script/Engine.ActorComponent.GetOwner");
AActor* Owner;
this->ProcessEvent(GetOwnerFn, &Owner);
return Owner;
}

View File

@@ -0,0 +1,9 @@
#pragma once
#include "Actor.h"
class UActorComponent : public UObject
{
public:
AActor* GetOwner();
};

129
Project Reboot 3.0/Array.h Normal file
View File

@@ -0,0 +1,129 @@
#pragma once
#include "inc.h"
struct FMemory
{
static inline void* (*Realloc)(void* Original, SIZE_T Count, uint32_t Alignment /* = DEFAULT_ALIGNMENT */);
};
template<typename InElementType> //, typename InAllocatorType>
class TArray
{
// protected:
public:
friend class FString;
using ElementAllocatorType = InElementType*;
using SizeType = int32;
ElementAllocatorType Data = nullptr;// AllocatorInstance;
SizeType ArrayNum;
SizeType ArrayMax;
public:
inline InElementType At(int i, int Size = sizeof(InElementType)) const { return *(InElementType*)(__int64(Data) + (static_cast<long long>(Size) * i)); }
inline InElementType at(int i, int Size = sizeof(InElementType)) const { return *(InElementType*)(__int64(Data) + (static_cast<long long>(Size) * i)); }
inline InElementType* AtPtr(int i, int Size = sizeof(InElementType)) const { return (InElementType*)(__int64(Data) + (static_cast<long long>(Size) * i)); }
inline int Num() const { return ArrayNum; }
inline int size() const { return ArrayNum; }
FORCEINLINE SizeType CalculateSlackGrow(SizeType NumElements, SizeType NumAllocatedElements, SIZE_T NumBytesPerElement) const
{
return ArrayMax - NumElements;
}
void Reserve(int Number, int Size = sizeof(InElementType))
{
LOG_INFO(LogDev, "ArrayNum {}", ArrayNum);
// Data = (InElementType*)FMemory::Realloc(Data, (ArrayMax = ArrayNum + Number) * Size, 0);
Data = /* (ArrayMax - ArrayNum) >= ArrayNum ? Data : */ (InElementType*)FMemory::Realloc(Data, (ArrayMax = Number + ArrayNum) * Size, 0);
}
FORCENOINLINE void ResizeGrow(int32 OldNum, int Size = sizeof(InElementType))
{
LOG_INFO(LogMemory, "FMemory::Realloc: {}", __int64(FMemory::Realloc));
ArrayMax = ArrayNum; // CalculateSlackGrow(/* ArrayNum */ OldNum, ArrayMax, Size);
// AllocatorInstance.ResizeAllocation(OldNum, ArrayMax, sizeof(ElementType));
LOG_INFO(LogMemory, "ArrayMax: {} Size: {}", ArrayMax, Size);
Data = (InElementType*)FMemory::Realloc(Data, ArrayMax * Size, 0);
}
FORCEINLINE int32 AddUninitialized(int32 Count = 1, int Size = sizeof(InElementType))
{
// CheckInvariants();
if (Count < 0)
{
return 0;
}
const int32 OldNum = ArrayNum;
if ((ArrayNum += Count) > ArrayMax)
{
ResizeGrow(OldNum, Size);
}
return OldNum;
}
FORCEINLINE int32 Emplace(const InElementType& New, int Size = sizeof(InElementType))
{
const int32 Index = AddUninitialized(1, Size); // resizes array
memcpy_s((InElementType*)(__int64(Data) + (Index * Size)), Size, (void*)&New, Size);
// new(GetData() + Index) ElementType(Forward<ArgsType>(Args)...);
return Index;
}
/* int Add(const InElementType& New, int Size = sizeof(InElementType))
{
return Emplace(New, Size);
} */
int Add(const InElementType& New, int Size = sizeof(InElementType))
{
LOG_INFO(LogDev, "ArrayMax: {}", ArrayMax);
if ((ArrayNum + 1) > ArrayMax)
{
Reserve(1, Size);
}
if (Data)
{
memcpy_s((InElementType*)(__int64(Data) + (ArrayNum * Size)), Size, (void*)&New, Size);
++ArrayNum;
return ArrayNum; // - 1;
}
return -1;
};
void Free()
{
if (Data && ArrayNum > 0 && sizeof(InElementType) > 0)
{
VirtualFree(Data, sizeof(InElementType) * ArrayNum, MEM_RELEASE);
}
ArrayNum = 0;
ArrayMax = 0;
}
bool Remove(const int Index)
{
if (Index < ArrayNum)
{
if (Index != ArrayNum - 1)
Data[Index] = Data[ArrayNum - 1];
--ArrayNum;
return true;
}
return false;
};
};

View File

@@ -0,0 +1,21 @@
#pragma once
#include "Actor.h"
#include "reboot.h" // we want to prevent this but im to lazy to make cpp file
class ABuildingActor : public AActor
{
public:
void InitializeBuildingActor(UObject* Controller, ABuildingActor* BuildingOwner, bool bUsePlayerBuildAnimations, UObject* ReplacedBuilding = nullptr)
{
struct {
UObject* BuildingOwner; // ABuildingActor
UObject* SpawningController;
bool bUsePlayerBuildAnimations; // I think this is not on some versions
UObject* ReplacedBuilding; // this also not on like below 18.00
} IBAParams{ BuildingOwner, Controller, bUsePlayerBuildAnimations, ReplacedBuilding };
static auto fn = FindObject<UFunction>("/Script/FortniteGame.BuildingActor.InitializeKismetSpawnedBuildingActor");
this->ProcessEvent(fn, &IBAParams);
}
};

View File

@@ -0,0 +1,35 @@
#pragma once
#include "BuildingActor.h"
#include "PlayerState.h"
class ABuildingSMActor : public ABuildingActor
{
public:
bool IsPlayerPlaced()
{
return true; // FOR NOW
}
void SetPlayerPlaced(bool NewValue)
{
}
bool IsDestroyed()
{
return false; // FOR NOW
}
APlayerState*& GetEditingPlayer()
{
static auto EditingPlayerOffset = GetOffset("EditingPlayer");
return Get<APlayerState*>(EditingPlayerOffset);
}
int& GetCurrentBuildingLevel()
{
static auto CurrentBuildingLevelOffset = GetOffset("CurrentBuildingLevel");
return Get<int>(CurrentBuildingLevelOffset);
}
};

View File

@@ -0,0 +1,9 @@
#include "BuildingWeapons.h"
#include "reboot.h"
UClass* AFortWeap_EditingTool::StaticClass()
{
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortWeap_EditingTool");
return Class;
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include "BuildingSMActor.h"
#include "FortWeapon.h"
class AFortWeap_BuildingToolBase : public AFortWeapon
{
};
class AFortWeap_BuildingTool : public AFortWeap_BuildingToolBase
{
};
class AFortWeap_EditingTool : public AFortWeap_BuildingToolBase
{
public:
ABuildingSMActor*& GetEditActor()
{
static auto EditActorOffset = GetOffset("EditActor");
return Get<ABuildingSMActor*>(EditActorOffset);
}
static UClass* StaticClass();
};

View File

@@ -0,0 +1,42 @@
#pragma once
#include "Class.h"
#include "reboot.h"
UObject* UClass::CreateDefaultObject()
{
static std::unordered_map<std::string, UObject*> defaultAbilities; // normal class name, default ability.
auto name = this->GetFullName();
auto defaultafqaf = defaultAbilities.find(name);
UObject* DefaultObject = nullptr;
if (defaultafqaf != defaultAbilities.end())
{
DefaultObject = defaultafqaf->second;
}
else
{
// skunked class to default
auto ending = name.substr(name.find_last_of(".") + 1);
auto path = name.substr(0, name.find_last_of(".") + 1);
path = path.substr(path.find_first_of(" ") + 1);
auto DefaultAbilityName = std::format("{0}Default__{1}", path, ending);
// std::cout << "DefaultAbilityName: " << DefaultAbilityName << '\n';
DefaultObject = FindObject(DefaultAbilityName);
defaultAbilities.emplace(name, DefaultObject);
}
return DefaultObject;
}
int UClass::GetPropertiesSize()
{
return *(int*)(__int64(this) + Offsets::PropertiesSize);
}

View File

@@ -0,0 +1,29 @@
#pragma once
#include "Object.h"
#include "addresses.h"
struct UField : UObject
{
UField* Next;
// void* pad; void* pad2;
};
class UStruct : public UField
{
};
class UClass : public UStruct
{
public:
UObject* CreateDefaultObject();
int GetPropertiesSize();
};
class UFunction : public UStruct
{
public:
void* GetFunc() { return *(void**)(__int64(this) + Offsets::Func); }
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "Actor.h"
class AController : public AActor
{
public:
};

View File

@@ -0,0 +1,17 @@
#pragma once
#include "World.h"
#include "NetDriver.h"
#include "UnrealString.h"
class UEngine : public UObject
{
public:
static inline UNetDriver* (*Engine_CreateNetDriver)(UEngine* Engine, UWorld* InWorld, FName NetDriverDefinition);
UNetDriver* CreateNetDriver(UWorld* InWorld, FName NetDriverDefinition) { return Engine_CreateNetDriver(this, InWorld, NetDriverDefinition); }
};
// static inline bool (*CreateNamedNetDriver)(UWorld* InWorld, FName NetDriverName, FName NetDriverDefinition);
// static inline UNetDriver* CreateNetDriver_Local(UEngine* Engine, FWorldContext& Context, FName NetDriverDefinition)

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Object.h"
enum class ESpawnActorCollisionHandlingMethod : uint8
{
Undefined,
AlwaysSpawn,
AdjustIfPossibleButAlwaysSpawn,
AdjustIfPossibleButDontSpawnIfColliding,
DontSpawnIfColliding
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "GameMode.h"
class AFortGameMode : public AGameMode
{
public:
};

View File

@@ -0,0 +1,279 @@
#include "FortGameModeAthena.h"
#include "reboot.h"
#include "NetSerialization.h"
#include "FortPlayerControllerAthena.h"
#include "GameplayStatics.h"
static bool bFirstPlayerJoined = false;
bool AFortGameModeAthena::Athena_ReadyToStartMatchHook(AFortGameModeAthena* GameMode)
{
auto GameState = GameMode->GetGameStateAthena();
auto SetPlaylist = [&GameState](UObject* Playlist) -> void {
if (Fortnite_Version >= 6.10)
{
auto CurrentPlaylistInfo = GameState->GetPtr<FFastArraySerializer>("CurrentPlaylistInfo");
static auto PlaylistReplicationKeyOffset = FindOffsetStruct("/Script/FortniteGame.PlaylistPropertyArray", "PlaylistReplicationKey");
static auto BasePlaylistOffset = FindOffsetStruct("/Script/FortniteGame.PlaylistPropertyArray", "BasePlaylist");
*(UObject**)(__int64(CurrentPlaylistInfo) + BasePlaylistOffset) = Playlist;
// CurrentPlaylistInfo.OverridePlaylist = Playlist;
(*(int*)(__int64(CurrentPlaylistInfo) + PlaylistReplicationKeyOffset))++;
CurrentPlaylistInfo->MarkArrayDirty();
GameState->OnRep_CurrentPlaylistInfo();
}
else
{
GameState->Get("CurrentPlaylistData") = Playlist;
}
};
auto& LocalPlayers = GetLocalPlayers();
if (LocalPlayers.Num() && LocalPlayers.Data)
{
LocalPlayers.Remove(0);
}
static int LastNum2 = 1;
if (AmountOfRestarts != LastNum2)
{
LastNum2 = AmountOfRestarts;
auto Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo");
// SetPlaylist(Playlist);
GameMode->Get<int>("WarmupRequiredPlayerCount") = 1;
// LOG_INFO(LogLoading, "Set playlist!");
}
/* static auto FortPlayerStartWarmupClass = FindObject<UClass>("/Script/FortniteGame.FortPlayerStartWarmup");
TArray<AActor*> Actors = UGameplayStatics::GetAllActorsOfClass(GetWorld(), FortPlayerStartWarmupClass);
int ActorsNum = Actors.Num();
Actors.Free();
if (ActorsNum == 0)
return false; */
/* static int LastNum4 = 1;
if (AmountOfRestarts != LastNum4)
{
LastNum4 = AmountOfRestarts;
auto Playlist = FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo");
SetPlaylist(Playlist);
LOG_INFO(LogLoading, "Set playlist!");
} */
static auto MapInfoOffset = GameState->GetOffset("MapInfo");
auto MapInfo = GameState->Get(MapInfoOffset);
if (!MapInfo)
return false;
static auto FlightInfosOffset = MapInfo->GetOffset("FlightInfos");
// if (MapInfo->Get<TArray<__int64>>(FlightInfosOffset).ArrayNum <= 0)
// return false;
static int LastNum3 = 1;
if (AmountOfRestarts != LastNum3)
{
LastNum3 = AmountOfRestarts;
GetWorld()->Listen();
SetBitfield(GameMode->GetPtr<PlaceholderBitfield>("bWorldIsReady"), 1, true);
// GameState->OnRep_CurrentPlaylistInfo();
// return false;
}
// if (GameState->GetPlayersLeft() < GameMode->Get<int>("WarmupRequiredPlayerCount"))
// if (!bFirstPlayerJoined)
// return false;
static int LastNum = 1;
if (AmountOfRestarts != LastNum)
{
LastNum = AmountOfRestarts;
float Duration = 40.f;
float EarlyDuration = Duration;
float TimeSeconds = 35.f; // UGameplayStatics::GetTimeSeconds(GetWorld());
if (Engine_Version >= 424)
{
GameState->GetGamePhase() = EAthenaGamePhase::Warmup;
GameState->OnRep_GamePhase();
}
auto Playlist = FindObject("/Game/Athena/Playlists/Playground/Playlist_Playground.Playlist_Playground"); // FindObject("/Game/Athena/Playlists/Playlist_DefaultSolo.Playlist_DefaultSolo");
SetPlaylist(Playlist);
GameState->Get<float>("WarmupCountdownEndTime") = TimeSeconds + Duration;
GameMode->Get<float>("WarmupCountdownDuration") = Duration;
GameState->Get<float>("WarmupCountdownStartTime") = TimeSeconds;
GameMode->Get<float>("WarmupEarlyCountdownDuration") = EarlyDuration;
LOG_INFO(LogDev, "Initialized!");
}
if (Engine_Version >= 424) // returning true is stripped on c2+
{
// if (GameState->GetPlayersLeft() >= GameMode->Get<int>("WarmupRequiredPlayerCount"))
if (MapInfo->Get<TArray<__int64>>(FlightInfosOffset).ArrayNum <= 0)
return true;
}
return Athena_ReadyToStartMatchOriginal(GameMode);
}
int AFortGameModeAthena::Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint8 preferredTeam, AActor* Controller)
{
static auto NextTeamIndex = 3;
return ++NextTeamIndex;
}
void AFortGameModeAthena::Athena_HandleStartingNewPlayerHook(AFortGameModeAthena* GameMode, AActor* NewPlayerActor)
{
auto GameState = GameMode->GetGameStateAthena();
auto NewPlayer = (AFortPlayerControllerAthena*)NewPlayerActor;
auto WorldInventory = NewPlayer->GetWorldInventory();
static UFortItemDefinition* EditToolItemDefinition = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/EditTool.EditTool");
static UFortItemDefinition* PickaxeDefinition = FindObject<UFortItemDefinition>(L"/Game/Athena/Items/Weapons/WID_Harvest_Pickaxe_Athena_C_T01.WID_Harvest_Pickaxe_Athena_C_T01");
static UFortItemDefinition* BuildingItemData_Wall = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_Wall.BuildingItemData_Wall");
static UFortItemDefinition* BuildingItemData_Floor = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_Floor.BuildingItemData_Floor");
static UFortItemDefinition* BuildingItemData_Stair_W = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_Stair_W.BuildingItemData_Stair_W");
static UFortItemDefinition* BuildingItemData_RoofS = FindObject<UFortItemDefinition>(L"/Game/Items/Weapons/BuildingTools/BuildingItemData_RoofS.BuildingItemData_RoofS");
static UFortItemDefinition* WoodItemData = FindObject<UFortItemDefinition>(L"/Game/Items/ResourcePickups/WoodItemData.WoodItemData");
WorldInventory->AddItem(EditToolItemDefinition, nullptr);
WorldInventory->AddItem(PickaxeDefinition, nullptr);
WorldInventory->AddItem(BuildingItemData_Wall, nullptr);
WorldInventory->AddItem(BuildingItemData_Floor, nullptr);
WorldInventory->AddItem(BuildingItemData_Stair_W, nullptr);
WorldInventory->AddItem(BuildingItemData_RoofS, nullptr);
WorldInventory->AddItem(WoodItemData, nullptr, 100);
WorldInventory->Update(true);
auto PlayerStateAthena = NewPlayer->GetPlayerStateAthena();
PlayerStateAthena->GetSquadId() = PlayerStateAthena->GetTeamIndex() - 2;
// if (false)
{
// idk if this is needed
static auto bHasServerFinishedLoadingOffset = NewPlayer->GetOffset("bHasServerFinishedLoading");
NewPlayer->Get<bool>(bHasServerFinishedLoadingOffset) = true;
static auto OnRep_bHasServerFinishedLoadingFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.OnRep_bHasServerFinishedLoading");
NewPlayer->ProcessEvent(OnRep_bHasServerFinishedLoadingFn);
static auto bHasStartedPlayingOffset = PlayerStateAthena->GetOffset("bHasStartedPlaying");
PlayerStateAthena->Get<bool>(bHasStartedPlayingOffset) = true; // this is a bitfield!!!
static auto OnRep_bHasStartedPlayingFn = FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerState.OnRep_bHasStartedPlaying");
PlayerStateAthena->ProcessEvent(OnRep_bHasStartedPlayingFn);
}
// if (false)
{
static auto GameplayAbilitySet = FindObject<UObject>("/Game/Abilities/Player/Generic/Traits/DefaultPlayer/GAS_AthenaPlayer.GAS_AthenaPlayer");
static auto GameplayAbilitiesOffset = GameplayAbilitySet->GetOffset("GameplayAbilities");
auto GameplayAbilities = GameplayAbilitySet->GetPtr<TArray<UClass*>>(GameplayAbilitiesOffset);
for (int i = 0; i < GameplayAbilities->Num(); i++)
{
UClass* AbilityClass = GameplayAbilities->At(i);
// LOG_INFO(LogDev, "AbilityClass {}", __int64(AbilityClass));
if (!AbilityClass)
continue;
// LOG_INFO(LogDev, "AbilityClass Name {}", AbilityClass->GetFullName());
auto DefaultAbility = AbilityClass->CreateDefaultObject();
// LOG_INFO(LogDev, "DefaultAbility {}", __int64(DefaultAbility));
// LOG_INFO(LogDev, "DefaultAbility Name {}", DefaultAbility->GetFullName());
PlayerStateAthena->GetAbilitySystemComponent()->GiveAbilityEasy(AbilityClass);
}
}
// if (false)
{
struct FUniqueNetIdRepl
{
unsigned char ahh[0x0028];
};
struct FGameMemberInfo : public FFastArraySerializerItem
{
unsigned char SquadId; // 0x000C(0x0001) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
unsigned char TeamIndex; // 0x000D(0x0001) (ZeroConstructor, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
unsigned char UnknownData00[0x2]; // 0x000E(0x0002) MISSED OFFSET
FUniqueNetIdRepl MemberUniqueId; // 0x0010(0x0028) (HasGetValueTypeHash, NativeAccessSpecifierPublic)
};
static auto GameMemberInfoStructSize = 0x38;
// LOG_INFO(LogDev, "Compare: 0x{:x} 0x{:x}", GameMemberInfoStructSize, sizeof(FGameMemberInfo));
auto GameMemberInfo = Alloc<FGameMemberInfo>(GameMemberInfoStructSize);
((FFastArraySerializerItem*)GameMemberInfo)->MostRecentArrayReplicationKey = -1;
((FFastArraySerializerItem*)GameMemberInfo)->ReplicationID = -1;
((FFastArraySerializerItem*)GameMemberInfo)->ReplicationKey = -1;
if (false)
{
static auto GameMemberInfo_SquadIdOffset = 0x000C;
static auto GameMemberInfo_TeamIndexOffset = 0x000D;
static auto GameMemberInfo_MemberUniqueIdOffset = 0x0010;
static auto UniqueIdSize = 0x0028;
*(uint8*)(__int64(GameMemberInfo) + GameMemberInfo_SquadIdOffset) = PlayerStateAthena->GetSquadId();
*(uint8*)(__int64(GameMemberInfo) + GameMemberInfo_TeamIndexOffset) = PlayerStateAthena->GetTeamIndex();
CopyStruct((void*)(__int64(GameMemberInfo) + GameMemberInfo_MemberUniqueIdOffset), PlayerStateAthena->Get<void*>("UniqueId"), UniqueIdSize);
}
else
{
GameMemberInfo->SquadId = PlayerStateAthena->GetSquadId();
GameMemberInfo->TeamIndex = PlayerStateAthena->GetTeamIndex();
GameMemberInfo->MemberUniqueId = PlayerStateAthena->Get<FUniqueNetIdRepl>("UniqueId");
}
static auto GameMemberInfoArray_MembersOffset = 0x0108;
static auto GameMemberInfoArrayOffset = GameState->GetOffset("GameMemberInfoArray");
auto GameMemberInfoArray = GameState->GetPtr<FFastArraySerializer>(GameMemberInfoArrayOffset);
((TArray<FGameMemberInfo>*)(__int64(GameMemberInfoArray) + GameMemberInfoArray_MembersOffset))->Add(*GameMemberInfo, GameMemberInfoStructSize);
GameMemberInfoArray->MarkArrayDirty();
}
return Athena_HandleStartingNewPlayerOriginal(GameMode, NewPlayer);
}

View File

@@ -0,0 +1,21 @@
#pragma once
#include "FortGameModePvPBase.h"
// #include "FortPlayerControllerAthena.h"
#include "FortGameStateAthena.h"
class AFortGameModeAthena : public AFortGameModePvPBase
{
public:
static inline bool (*Athena_ReadyToStartMatchOriginal)(AFortGameModeAthena* GameMode);
static inline void (*Athena_HandleStartingNewPlayerOriginal)(AFortGameModeAthena* GameMode, AActor* NewPlayer);
static bool Athena_ReadyToStartMatchHook(AFortGameModeAthena* GameMode);
static int Athena_PickTeamHook(AFortGameModeAthena* GameMode, uint8 preferredTeam, AActor* Controller);
static void Athena_HandleStartingNewPlayerHook(AFortGameModeAthena* GameMode, AActor* NewPlayerActor);
AFortGameStateAthena* GetGameStateAthena()
{
return (AFortGameStateAthena*)GetGameState();
}
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "FortGameModeZone.h"
class AFortGameModePvPBase : public AFortGameModeZone
{
public:
};

View File

@@ -0,0 +1,11 @@
#include "FortGameModeZone.h"
#include "KismetStringLibrary.h"
#include "reboot.h"
UClass* AFortGameModeZone::StaticClass()
{
static auto Class = FindObject<UClass>(L"/Script/FortniteGame.FortGameModeZone");
return Class;
}

View File

@@ -0,0 +1,11 @@
#pragma once
#include "FortGameMode.h"
#include "Engine.h"
class AFortGameModeZone : public AFortGameMode
{
public:
static UClass* StaticClass();
};

View File

@@ -0,0 +1,26 @@
#include "FortGameStateAthena.h"
#include "reboot.h"
void AFortGameStateAthena::OnRep_GamePhase()
{
EAthenaGamePhase OldGamePhase = GetGamePhase();
static auto OnRep_GamePhase = FindObject<UFunction>("/Script/FortniteGame.FortGameStateAthena.OnRep_GamePhase");
this->ProcessEvent(OnRep_GamePhase, &OldGamePhase);
}
void AFortGameStateAthena::OnRep_CurrentPlaylistInfo()
{
static auto OnRep_CurrentPlaylistData = FindObject<UFunction>("/Script/FortniteGame.FortGameStateAthena.OnRep_CurrentPlaylistData");
if (OnRep_CurrentPlaylistData)
{
this->ProcessEvent(OnRep_CurrentPlaylistData);
}
else
{
static auto OnRep_CurrentPlaylistInfo = FindObject<UFunction>("/Script/FortniteGame.FortGameStateAthena.OnRep_CurrentPlaylistInfo");
this->ProcessEvent(OnRep_CurrentPlaylistInfo);
}
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include "GameState.h"
enum class EAthenaGamePhase : uint8_t
{
None = 0,
Setup = 1,
Warmup = 2,
Aircraft = 3,
SafeZones = 4,
EndGame = 5,
Count = 6,
EAthenaGamePhase_MAX = 7
};
class AFortGameStateAthena : public AGameState
{
public:
int& GetPlayersLeft()
{
static auto PlayersLeftOffset = GetOffset("PlayersLeft");
return Get<int>(PlayersLeftOffset);
}
EAthenaGamePhase& GetGamePhase()
{
static auto GamePhaseOffset = GetOffset("GamePhase");
return Get<EAthenaGamePhase>(GamePhaseOffset);
}
void OnRep_GamePhase();
void OnRep_CurrentPlaylistInfo();
};

View File

@@ -0,0 +1,61 @@
#include "FortInventory.h"
#include "FortPlayerController.h"
UFortItem* CreateItemInstance(AFortPlayerController* PlayerController, UFortItemDefinition* ItemDefinition, int Count)
{
UFortItem* NewItemInstance = ItemDefinition->CreateTemporaryItemInstanceBP(Count);
if (NewItemInstance)
NewItemInstance->SetOwningControllerForTemporaryItem(PlayerController);
return NewItemInstance;
}
std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddItem(UFortItemDefinition* ItemDefinition, bool* bShouldUpdate, int Count)
{
if (bShouldUpdate)
*bShouldUpdate = false;
std::vector<UFortItem*> NewItemInstances;
std::vector<UFortItem*> ModifiedItemInstances;
auto PlayerController = Cast<AFortPlayerController>(GetOwner());
UFortItem* NewItemInstance = CreateItemInstance(PlayerController, ItemDefinition, Count);
if (NewItemInstance)
{
NewItemInstances.push_back(NewItemInstance);
// NewItemInstance->GetItemEntry()->GetItemDefinition() = ItemDefinition;
static auto FortItemEntryStruct = FindObject("/Script/FortniteGame.FortItemEntry");
static auto FortItemEntrySize = *(int*)(__int64(FortItemEntryStruct) + Offsets::PropertiesSize);
// LOG_INFO(LogDev, "FortItemEntryStruct {}", __int64(FortItemEntryStruct));
LOG_INFO(LogDev, "FortItemEntrySize {}", __int64(FortItemEntrySize));
GetItemList().GetItemInstances().Add(NewItemInstance);
GetItemList().GetReplicatedEntries().Add(*NewItemInstance->GetItemEntry(), FortItemEntrySize);
if (bShouldUpdate)
*bShouldUpdate = true;
}
return std::make_pair(NewItemInstances, ModifiedItemInstances);
}
UFortItem* AFortInventory::FindItemInstance(const FGuid& Guid)
{
auto& ItemInstances = GetItemList().GetItemInstances();
for (int i = 0; i < ItemInstances.Num(); i++)
{
auto ItemInstance = ItemInstances.At(i);
if (ItemInstance->GetItemEntry()->GetItemGuid() == Guid)
return ItemInstance;
}
return nullptr;
}

View File

@@ -0,0 +1,69 @@
#pragma once
#include "Actor.h"
#include "Class.h"
#include "NetSerialization.h"
#include "FortItem.h"
#include "FortItemDefinition.h"
#include "reboot.h"
enum class EFortInventoryType : unsigned char
{
World = 0,
Account = 1,
Outpost = 2,
MAX = 3,
};
struct FFortItemList : public FFastArraySerializer
{
TArray<UFortItem*>& GetItemInstances()
{
static auto ItemInstancesOffset = FindOffsetStruct("/Script/FortniteGame.FortItemList", "ItemInstances");
return *(TArray<UFortItem*>*)(__int64(this) + ItemInstancesOffset);
}
TArray<FFastArraySerializerItem>& GetReplicatedEntries()
{
static auto ReplicatedEntriesOffset = FindOffsetStruct("/Script/FortniteGame.FortItemList", "ReplicatedEntries");
return *(TArray<FFastArraySerializerItem>*)(__int64(this) + ReplicatedEntriesOffset);
}
};
class AFortInventory : public AActor
{
public:
FFortItemList& GetItemList()
{
static auto InventoryOffset = GetOffset("Inventory");
return Get<FFortItemList>(InventoryOffset);
}
EFortInventoryType& GetInventoryType()
{
static auto InventoryOffset = GetOffset("InventoryType");
return Get<EFortInventoryType>(InventoryOffset);
}
void HandleInventoryLocalUpdate()
{
static auto HandleInventoryLocalUpdateFn = FindObject<UFunction>(L"/Script/FortniteGame.FortInventory.HandleInventoryLocalUpdate");
ProcessEvent(HandleInventoryLocalUpdateFn);
}
FORCENOINLINE void Update(bool bMarkArrayDirty = false)
{
HandleInventoryLocalUpdate();
if (bMarkArrayDirty)
{
GetItemList().MarkArrayDirty();
}
}
std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AddItem(UFortItemDefinition* ItemDefinition, bool* bShouldUpdate, int Count = 1);
UFortItem* FindItemInstance(const FGuid& Guid);
};

View File

@@ -0,0 +1,7 @@
#include "FortItem.h"
void UFortItem::SetOwningControllerForTemporaryItem(UObject* Controller)
{
static auto SOCFTIFn = FindObject<UFunction>("/Script/FortniteGame.FortItem.SetOwningControllerForTemporaryItem");
this->ProcessEvent(SOCFTIFn, &Controller);
}

View File

@@ -0,0 +1,33 @@
#pragma once
#include "NetSerialization.h"
#include "Class.h"
#include "reboot.h"
struct FFortItemEntry : FFastArraySerializerItem
{
FGuid& GetItemGuid()
{
static auto ItemGuidOffset = FindOffsetStruct("/Script/FortniteGame.FortItemEntry", "ItemGuid");
return *(FGuid*)(__int64(this) + ItemGuidOffset);
}
UObject*& GetItemDefinition()
{
static auto ItemDefinitionOffset = FindOffsetStruct("/Script/FortniteGame.FortItemEntry", "ItemDefinition");
return *(UObject**)(__int64(this) + ItemDefinitionOffset);
}
};
class UFortItem : public UObject
{
public:
FFortItemEntry* GetItemEntry()
{
static auto ItemEntryOffset = this->GetOffset("ItemEntry");
return &Get<FFortItemEntry>(ItemEntryOffset);
}
void SetOwningControllerForTemporaryItem(UObject* Controller);
};

View File

@@ -0,0 +1,11 @@
#include "FortItemDefinition.h"
UFortItem* UFortItemDefinition::CreateTemporaryItemInstanceBP(int Count, int Level)
{
static auto CreateTemporaryItemInstanceBPFunction = FindObject<UFunction>("/Script/FortniteGame.FortItemDefinition.CreateTemporaryItemInstanceBP");
struct { int Count; int Level; UFortItem* ReturnValue; } CreateTemporaryItemInstanceBP_Params{ Count, 1 };
ProcessEvent(CreateTemporaryItemInstanceBPFunction, &CreateTemporaryItemInstanceBP_Params);
return CreateTemporaryItemInstanceBP_Params.ReturnValue;
}

View File

@@ -0,0 +1,13 @@
#pragma once
#include "FortItem.h"
#include "Object.h"
#include "Class.h"
#include "reboot.h"
class UFortItemDefinition : public UObject
{
public:
UFortItem* CreateTemporaryItemInstanceBP(int Count, int Level = 1);
};

View File

@@ -0,0 +1,19 @@
#include "FortPawn.h"
#include "reboot.h"
AFortWeapon* AFortPawn::EquipWeaponDefinition(UFortWeaponItemDefinition* WeaponData, const FGuid& ItemEntryGuid)
{
static auto EquipWeaponDefinitionFn = FindObject<UFunction>("/Script/FortniteGame.FortPawn.EquipWeaponDefinition");
struct { UObject* Def; FGuid Guid; AFortWeapon* Wep; } params{ WeaponData, ItemEntryGuid };
this->ProcessEvent(EquipWeaponDefinitionFn, &params);
return params.Wep;
}
UClass* AFortPawn::StaticClass()
{
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortPawn");
return Class;
}

View File

@@ -0,0 +1,19 @@
#pragma once
#include "Pawn.h"
#include "FortWeapon.h"
#include "FortWeaponItemDefinition.h"
class AFortPawn : public APawn
{
public:
AFortWeapon* EquipWeaponDefinition(UFortWeaponItemDefinition* WeaponData, const FGuid& ItemEntryGuid);
AFortWeapon*& GetCurrentWeapon()
{
static auto CurrentWeaponOffset = GetOffset("CurrentWeapon");
return Get<AFortWeapon*>(CurrentWeaponOffset);
}
static UClass* StaticClass();
};

View File

@@ -0,0 +1,168 @@
#include "FortPlayerController.h"
#include "Rotator.h"
#include "BuildingSMActor.h"
#include "FortGameModeAthena.h"
#include "FortPlayerState.h"
#include "BuildingWeapons.h"
#include "ActorComponent.h"
void AFortPlayerController::ServerAttemptAircraftJumpHook(AFortPlayerController* PC, FRotator ClientRotation)
{
auto PlayerController = Cast<APlayerController>(Engine_Version < 424 ? PC : ((UActorComponent*)PC)->GetOwner());
LOG_INFO(LogDev, "PlayerController: {}", __int64(PlayerController));
if (!PlayerController)
return;
// if (!PlayerController->bInAircraft)
// return;
auto GameMode = (AFortGameModeAthena*)GetWorld()->GetGameMode();
auto GameState = GameMode->GetGameStateAthena();
static auto AircraftsOffset = GameState->GetOffset("Aircrafts");
auto Aircrafts = GameState->GetPtr<TArray<AActor*>>(AircraftsOffset);
if (Aircrafts->Num() <= 0)
return;
auto NewPawn = GameMode->SpawnDefaultPawnForHook(GameMode, (AController*)PlayerController, Aircrafts->at(0));
PlayerController->Possess(NewPawn);
// PC->ServerRestartPlayer();
}
void AFortPlayerController::ServerCreateBuildingActorHook(AFortPlayerController* PlayerController, FCreateBuildingActorData CreateBuildingData)
{
UClass* BuildingClass = nullptr;
FVector BuildLocation;
FRotator BuildRotator;
bool bMirrored;
if (Fortnite_Version >= 8.30)
{
BuildLocation = CreateBuildingData.BuildLoc;
BuildRotator = CreateBuildingData.BuildRot;
bMirrored = CreateBuildingData.bMirrored;
static auto BroadcastRemoteClientInfoOffset = PlayerController->GetOffset("BroadcastRemoteClientInfo");
auto BroadcastRemoteClientInfo = PlayerController->Get(BroadcastRemoteClientInfoOffset);
static auto RemoteBuildableClassOffset = BroadcastRemoteClientInfo->GetOffset("RemoteBuildableClass");
BuildingClass = BroadcastRemoteClientInfo->Get<UClass*>(RemoteBuildableClassOffset);
}
else
{
}
// LOG_INFO(LogDev, "BuildingClass {}", __int64(BuildingClass));
if (!BuildingClass)
return;
TArray<ABuildingSMActor*> ExistingBuildings;
char idk;
static __int64 (*CantBuild)(UObject*, UObject*, FVector, FRotator, char, TArray<ABuildingSMActor*>*, char*) = decltype(CantBuild)(Addresses::CantBuild);
bool bCanBuild = !CantBuild(GetWorld(), BuildingClass, BuildLocation, BuildRotator, bMirrored, &ExistingBuildings, &idk);
if (!bCanBuild)
{
// LOG_INFO(LogDev, "cant build");
return;
}
for (int i = 0; i < ExistingBuildings.Num(); i++)
{
auto ExistingBuilding = ExistingBuildings.At(i);
ExistingBuilding->K2_DestroyActor();
}
FTransform Transform{};
Transform.Translation = BuildLocation;
Transform.Rotation = BuildRotator.Quaternion();
Transform.Scale3D = { 1, 1, 1 };
auto BuildingActor = GetWorld()->SpawnActor<ABuildingSMActor>(BuildingClass, Transform);
if (!BuildingActor)
return;
BuildingActor->InitializeBuildingActor(PlayerController, BuildingActor, true);
}
void AFortPlayerController::ServerBeginEditingBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToEdit)
{
if (!BuildingActorToEdit || !BuildingActorToEdit->IsPlayerPlaced())
return;
auto Pawn = Cast<AFortPawn>(PlayerController->GetPawn(), false);
if (!Pawn)
return;
static auto EditToolDef = FindObject<UFortWeaponItemDefinition>("/Game/Items/Weapons/BuildingTools/EditTool.EditTool");
if (auto EditTool = Cast<AFortWeap_EditingTool>(Pawn->EquipWeaponDefinition(EditToolDef, FGuid{})))
{
BuildingActorToEdit->GetEditingPlayer() = PlayerController->GetPlayerState();
// Onrep?
EditTool->GetEditActor() = BuildingActorToEdit;
// Onrep?
}
}
void AFortPlayerController::ServerEditBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToEdit, UClass* NewBuildingClass, int RotationIterations, char bMirrored)
{
auto PlayerState = (AFortPlayerState*)PlayerController->GetPlayerState();
if (!BuildingActorToEdit || !NewBuildingClass || BuildingActorToEdit->IsDestroyed() || BuildingActorToEdit->GetEditingPlayer() != PlayerState)
return;
// if (!PlayerState || PlayerState->GetTeamIndex() != BuildingActorToEdit->GetTeamIndex())
// return;
BuildingActorToEdit->GetEditingPlayer() = nullptr;
static ABuildingSMActor* (*BuildingSMActorReplaceBuildingActor)(ABuildingSMActor*, __int64, UClass*, int, int, uint8_t, AFortPlayerController*) =
decltype(BuildingSMActorReplaceBuildingActor)(Addresses::ReplaceBuildingActor);
if (auto BuildingActor = BuildingSMActorReplaceBuildingActor(BuildingActorToEdit, 1, NewBuildingClass,
BuildingActorToEdit->GetCurrentBuildingLevel(), RotationIterations, bMirrored, PlayerController))
{
BuildingActor->SetPlayerPlaced(true);
// if (auto PlayerState = Cast<AFortPlayerStateAthena>(PlayerController->PlayerState))
// BuildingActor->SetTeam(PlayerState->TeamIndex);
// BuildingActor->OnRep_Team();
}
}
void AFortPlayerController::ServerEndEditingBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToStopEditing)
{
auto Pawn = PlayerController->GetMyFortPawn();
if (!BuildingActorToStopEditing || !Pawn
// || BuildingActorToStopEditing->EditingPlayer != PlayerController->PlayerState
|| BuildingActorToStopEditing->IsDestroyed())
return;
auto EditTool = Cast<AFortWeap_EditingTool>(Pawn->GetCurrentWeapon());
BuildingActorToStopEditing->GetEditingPlayer() = nullptr;
// BuildingActorToStopEditing->OnRep_EditingPlayer();
if (EditTool)
{
// EditTool->bEditConfirmed = true;
EditTool->GetEditActor() = nullptr;
// EditTool->OnRep_EditActor();
}
}

View File

@@ -0,0 +1,53 @@
#pragma once
#include "PlayerController.h"
#include "FortInventory.h"
#include "FortPawn.h"
#include "Rotator.h"
#include "BuildingSMActor.h"
struct FCreateBuildingActorData { uint32_t BuildingClassHandle; FVector BuildLoc; FRotator BuildRot; bool bMirrored; };
class AFortPlayerController : public APlayerController
{
public:
AFortInventory*& GetWorldInventory()
{
static auto WorldInventoryOffset = GetOffset("WorldInventory");
return Get<AFortInventory*>(WorldInventoryOffset);
}
AFortPawn*& GetMyFortPawn() // AFortPlayerPawn
{
static auto MyFortPawnOffset = GetOffset("MyFortPawn");
return Get<AFortPawn*>(MyFortPawnOffset);
}
static UClass* StaticClass()
{
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortPlayerController");
return Class;
}
static void ServerExecuteInventoryItemHook(AFortPlayerController* PlayerController, FGuid ItemGuid)
{
auto ItemInstance = PlayerController->GetWorldInventory()->FindItemInstance(ItemGuid);
auto Pawn = Cast<AFortPawn>(PlayerController->GetPawn());
if (!ItemInstance || !Pawn)
return;
if (auto Weapon = Pawn->EquipWeaponDefinition((UFortWeaponItemDefinition*)ItemInstance->GetItemEntry()->GetItemDefinition(), ItemInstance->GetItemEntry()->GetItemGuid()))
{
}
}
static void ServerAttemptAircraftJumpHook(AFortPlayerController* PC, FRotator ClientRotation);
static void ServerCreateBuildingActorHook(AFortPlayerController* PlayerController, FCreateBuildingActorData CreateBuildingData);
static void ServerBeginEditingBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToEdit);
static void ServerEditBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToEdit, UClass* NewBuildingClass, int RotationIterations, char bMirrored);
static void ServerEndEditingBuildingActorHook(AFortPlayerController* PlayerController, ABuildingSMActor* BuildingActorToStopEditing);
};

View File

@@ -0,0 +1,19 @@
#pragma once
#include "FortPlayerController.h"
#include "FortPlayerStateAthena.h"
class AFortPlayerControllerAthena : public AFortPlayerController
{
public:
static void ServerAcknowledgePossessionHook(APlayerController* Controller, APawn* Pawn)
{
static auto AcknowledgedPawnOffset = Controller->GetOffset("AcknowledgedPawn");
Controller->Get<APawn*>(AcknowledgedPawnOffset) = Pawn;
}
AFortPlayerStateAthena* GetPlayerStateAthena()
{
return (AFortPlayerStateAthena*)GetPlayerState();
}
};

View File

@@ -0,0 +1,14 @@
#pragma once
#include "PlayerState.h"
#include "AbilitySystemComponent.h"
class AFortPlayerState : public APlayerState
{
public:
UAbilitySystemComponent*& GetAbilitySystemComponent()
{
static auto AbilitySystemComponentOffset = GetOffset("AbilitySystemComponent");
return this->Get<UAbilitySystemComponent*>(AbilitySystemComponentOffset);
}
};

View File

@@ -0,0 +1,19 @@
#pragma once
#include "FortPlayerState.h"
class AFortPlayerStateAthena : public AFortPlayerState
{
public:
uint8& GetSquadId()
{
static auto SquadIdOffset = GetOffset("SquadId");
return Get<uint8>(SquadIdOffset);
}
uint8& GetTeamIndex()
{
static auto TeamIndexOffset = GetOffset("TeamIndex");
return Get<uint8>(TeamIndexOffset);
}
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "Actor.h"
class AFortWeapon : public AActor
{
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "FortWorldItemDefinition.h"
class UFortWeaponItemDefinition : public UFortWorldItemDefinition
{
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "FortItemDefinition.h"
class UFortWorldItemDefinition : public UFortItemDefinition
{
};

View File

@@ -0,0 +1,14 @@
#pragma once
#include "GameModeBase.h"
class AGameMode : public AGameModeBase
{
public:
class AGameState*& GetGameState()
{
static auto GameStateOffset = this->GetOffset("GameState");
return this->Get<class AGameState*>(GameStateOffset);
}
};

View File

@@ -0,0 +1,21 @@
#include "GameModeBase.h"
#include "reboot.h"
#include "FortPlayerController.h"
APawn* AGameModeBase::SpawnDefaultPawnForHook(AGameModeBase* GameMode, AController* NewPlayer, AActor* StartSpot)
{
static auto PawnClass = FindObject<UClass>("/Game/Athena/PlayerPawn_Athena.PlayerPawn_Athena_C");
GameMode->Get<UClass*>("DefaultPawnClass") = PawnClass;
LOG_INFO(LogDev, "SpawnDefaultPawnFor: 0x{:x}!", __int64(_ReturnAddress()) - __int64(GetModuleHandleW(0)));
static auto fn = FindObject<UFunction>(L"/Script/Engine.GameModeBase.SpawnDefaultPawnAtTransform");
struct { AController* NewPlayer; FTransform SpawnTransform; APawn* ReturnValue; }
AGameModeBase_SpawnDefaultPawnAtTransform_Params{NewPlayer, StartSpot->GetTransform()};
GameMode->ProcessEvent(fn, &AGameModeBase_SpawnDefaultPawnAtTransform_Params);
return AGameModeBase_SpawnDefaultPawnAtTransform_Params.ReturnValue;
}

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Actor.h"
#include "Controller.h"
#include "Pawn.h"
class AGameModeBase : public AActor // AInfo
{
public:
static APawn* SpawnDefaultPawnForHook(AGameModeBase* GameMode, AController* NewPlayer, AActor* StartSpot);
};

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Controller.h"
class AGameSession : public AActor
{
public:
static inline void (*KickPlayerOriginal)(AGameSession*, AController*);
static void KickPlayerHook(AGameSession*, AController*) { return; }
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "Actor.h"
class AGameState : public AActor
{
public:
};

View File

@@ -0,0 +1,64 @@
#pragma once
#include "Class.h"
#include "NetSerialization.h"
#include "reboot.h"
struct FGameplayAbilitySpecHandle
{
int Handle;
void GenerateNewHandle()
{
static int GHandle = 1;
Handle = ++GHandle;
}
};
struct FGameplayAbilitySpec : FFastArraySerializerItem
{
static int GetStructSize()
{
static auto StructSize = 0x00C8;
return StructSize;
}
UObject*& GetAbility()
{
static auto AbilityOffset = 0x0010;
return *(UObject**)(__int64(this) + AbilityOffset);
}
FGameplayAbilitySpecHandle& GetHandle()
{
static auto HandleOffset = 0xC;
return *(FGameplayAbilitySpecHandle*)(__int64(this) + HandleOffset);
}
};
static FGameplayAbilitySpec* MakeNewSpec(UClass* GameplayAbilityClass, UObject* SourceObject = nullptr)
{
auto NewSpec = Alloc<FGameplayAbilitySpec>(FGameplayAbilitySpec::GetStructSize());
if (!NewSpec)
return nullptr;
static auto HandleOffset = 0xC;
static auto AbilityOffset = 0x0010;
static auto LevelOffset = 0x0018;
static auto InputIDOffset = 0x001C;
static auto SourceObjectOffset = 0x0020;
((FFastArraySerializerItem*)NewSpec)->MostRecentArrayReplicationKey = -1;
((FFastArraySerializerItem*)NewSpec)->ReplicationID = -1;
((FFastArraySerializerItem*)NewSpec)->ReplicationKey = -1;
NewSpec->GetHandle().GenerateNewHandle();
NewSpec->GetAbility() = GameplayAbilityClass->CreateDefaultObject();
*(int*)(__int64(NewSpec) + LevelOffset) = 0;
*(int*)(__int64(NewSpec) + InputIDOffset) = -1;
*(UObject**)(__int64(NewSpec) + SourceObjectOffset) = SourceObject;
return NewSpec;
}

View File

@@ -0,0 +1,36 @@
#include "GameplayStatics.h"
#include "reboot.h"
TArray<AActor*> UGameplayStatics::GetAllActorsOfClass(const UObject* WorldContextObject, UClass* ActorClass)
{
static auto fn = FindObject<UFunction>(L"/Script/Engine.GameplayStatics.GetAllActorsOfClass");
TArray<AActor*> ahh;
struct { const UObject* WorldContextObject; UClass* ActorClass; TArray<AActor*> OutActors; }
UGameplayStatics_GetAllActorsOfClass_Params{ WorldContextObject, ActorClass, ahh };
static auto defaultObj = StaticClass();
defaultObj->ProcessEvent(fn, &UGameplayStatics_GetAllActorsOfClass_Params);
return ahh;
}
float UGameplayStatics::GetTimeSeconds(const UObject* WorldContextObject)
{
static auto fn = FindObject<UFunction>(L"/Script/Engine.GameplayStatics.GetTimeSeconds");
float TimeSeconds = 0;
static auto defaultObj = StaticClass();
defaultObj->ProcessEvent(fn, &TimeSeconds);
return TimeSeconds;
}
UClass* UGameplayStatics::StaticClass()
{
static auto Class = FindObject<UClass>(L"/Script/Engine.GameplayStatics");
return Class;
}

View File

@@ -0,0 +1,14 @@
#pragma once
#include "Object.h"
#include "Array.h"
#include "Actor.h"
class UGameplayStatics : public UObject
{
public:
static TArray<AActor*> GetAllActorsOfClass(const UObject* WorldContextObject, UClass* ActorClass);
static float GetTimeSeconds(const UObject* WorldContextObject);
static UClass* StaticClass();
};

View File

@@ -0,0 +1,15 @@
#include "KismetStringLibrary.h"
#include "reboot.h"
FName UKismetStringLibrary::Conv_StringToName(const FString& InString)
{
static auto Conv_StringToName = FindObject<UFunction>(L"/Script/Engine.KismetStringLibrary.Conv_StringToName");
static auto Default__KismetStringLibrary = FindObject<UKismetStringLibrary>(L"/Script/Engine.Default__KismetStringLibrary");
struct { FString InString; FName ReturnValue; } Conv_StringToName_Params{ InString };
Default__KismetStringLibrary->ProcessEvent(Conv_StringToName, &Conv_StringToName_Params);
return Conv_StringToName_Params.ReturnValue;
}

View File

@@ -0,0 +1,10 @@
#pragma once
#include "Object.h"
#include "UnrealString.h"
class UKismetStringLibrary : public UObject
{
public:
static FName Conv_StringToName(const FString& InString);
};

View File

@@ -0,0 +1,24 @@
#pragma once
#include "Object.h"
#include "UnrealString.h"
#include "reboot.h"
class UKismetSystemLibrary : public UObject
{
public:
static FString GetPathName(UObject* Object)
{
static auto GetPathNameFunction = FindObject<UFunction>("/Script/Engine.KismetSystemLibrary.GetPathName");
static auto KismetSystemLibrary = FindObject("/Script/Engine.Default__KismetSystemLibrary");
struct { UObject* Object; FString ReturnValue; } GetPathName_Params{ Object };
KismetSystemLibrary->ProcessEvent(GetPathNameFunction, &GetPathName_Params);
auto Ret = GetPathName_Params.ReturnValue;
return Ret;
}
};

View File

@@ -0,0 +1 @@
#include "World.h"

View File

View File

@@ -0,0 +1,16 @@
#pragma once
#include "inc.h"
struct FNameEntryId
{
uint32 Value;
};
struct FName
{
FNameEntryId ComparisonIndex;
uint32 Number;
std::string ToString();
};

View File

@@ -0,0 +1,13 @@
#include "NetDriver.h"
#include "reboot.h"
void UNetDriver::TickFlushHook(UNetDriver* NetDriver)
{
static auto ReplicationDriverOffset = NetDriver->GetOffset("ReplicationDriver");
if (auto ReplicationDriver = NetDriver->Get(ReplicationDriverOffset))
reinterpret_cast<void(*)(UObject*)>(ReplicationDriver->VFTable[Offsets::ServerReplicateActors])(ReplicationDriver);
return TickFlushOriginal(NetDriver);
}

View File

@@ -0,0 +1,33 @@
#pragma once
#include "Object.h"
#include "UnrealString.h"
#include "World.h"
class UWorld;
struct FURL // idk where this actually goes
{
FString Protocol; // 0x0000(0x0010) (ZeroConstructor)
FString Host; // 0x0010(0x0010) (ZeroConstructor)
int Port; // 0x0020(0x0004) (ZeroConstructor, IsPlainOldData)
int Valid; // 0x0024(0x0004) (ZeroConstructor, IsPlainOldData)
FString Map; // 0x0028(0x0010) (ZeroConstructor)
FString RedirectUrl; // 0x0038(0x0010) (ZeroConstructor)
TArray<FString> Op; // 0x0048(0x0010) (ZeroConstructor)
FString Portal; // 0x0058(0x0010) (ZeroConstructor)
};
class UNetDriver : public UObject
{
public:
static inline bool (*InitListenOriginal)(UNetDriver* NetDriver, FNetworkNotify* InNotify, FURL& ListenURL, bool bReuseAddressAndPort, FString& Error);
static inline void (*SetWorldOriginal)(UNetDriver* NetDriver, UWorld* World);
static inline void (*TickFlushOriginal)(UNetDriver* NetDriver);
static void TickFlushHook(UNetDriver* NetDriver);
bool InitListen(FNetworkNotify* InNotify, FURL& ListenURL, bool bReuseAddressAndPort, FString& Error) { return InitListenOriginal(this, InNotify, ListenURL, bReuseAddressAndPort, Error); }
void SetWorld(UWorld* World) { return SetWorldOriginal(this, World); }
};

View File

@@ -0,0 +1,126 @@
#pragma once
struct FFastArraySerializerItem
{
int ReplicationID; // 0x0000(0x0004) (ZeroConstructor, IsPlainOldData, RepSkip, RepNotify, Interp, NonTransactional, EditorOnly, NoDestructor, AutoWeak, ContainsInstancedReference, AssetRegistrySearchable, SimpleDisplay, AdvancedDisplay, Protected, BlueprintCallable, BlueprintAuthorityOnly, TextExportTransient, NonPIEDuplicateTransient, ExposeOnSpawn, PersistentInstance, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic, NativeAccessSpecifierProtected, NativeAccessSpecifierPrivate)
int ReplicationKey; // 0x0004(0x0004) (ZeroConstructor, IsPlainOldData, RepSkip, RepNotify, Interp, NonTransactional, EditorOnly, NoDestructor, AutoWeak, ContainsInstancedReference, AssetRegistrySearchable, SimpleDisplay, AdvancedDisplay, Protected, BlueprintCallable, BlueprintAuthorityOnly, TextExportTransient, NonPIEDuplicateTransient, ExposeOnSpawn, PersistentInstance, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic, NativeAccessSpecifierProtected, NativeAccessSpecifierPrivate)
int MostRecentArrayReplicationKey; // 0x0008(0x0004) (ZeroConstructor, IsPlainOldData, RepSkip, RepNotify, Interp, NonTransactional, EditorOnly, NoDestructor, AutoWeak, ContainsInstancedReference, AssetRegistrySearchable, SimpleDisplay, AdvancedDisplay, Protected, BlueprintCallable, BlueprintAuthorityOnly, TextExportTransient, NonPIEDuplicateTransient, ExposeOnSpawn, PersistentInstance, UObjectWrapper, HasGetValueTypeHash, NativeAccessSpecifierPublic, NativeAccessSpecifierProtected, NativeAccessSpecifierPrivate)
FFastArraySerializerItem()
{
ReplicationID = -1;
ReplicationKey = -1;
MostRecentArrayReplicationKey = -1;
}
};
struct FFastArraySerializer2
{
char ItemMap[0x50];
int IDCounter;
int ArrayReplicationKey;
char GuidReferencesMap[0x50];
char GuidReferencesMap_StructDelta[0x50];
/* void MarkItemDirty(FFastArraySerializerItem& Item)
{
if (Item.ReplicationID == -1)
{
Item.ReplicationID = ++IDCounter;
if (IDCounter == -1)
{
IDCounter++;
}
}
Item.ReplicationKey++;
MarkArrayDirty();
} */
void MarkArrayDirty()
{
IncrementArrayReplicationKey();
CachedNumItems = -1;
CachedNumItemsToConsiderForWriting = -1;
}
void IncrementArrayReplicationKey()
{
ArrayReplicationKey++;
if (ArrayReplicationKey == -1)
{
ArrayReplicationKey++;
}
}
int CachedNumItems;
int CachedNumItemsToConsiderForWriting;
unsigned char DeltaFlags; // EFastArraySerializerDeltaFlags
int idkwhatthisis;
};
struct FFastArraySerializer
{
static inline bool bNewSerializer;
int& GetArrayReplicationKey()
{
static int ArrayReplicationKeyOffset = 0x50 + 0x4;
return *(int*)(__int64(this) + ArrayReplicationKeyOffset);
}
int& GetIDCounter()
{
static int IDCounterOffset = 0x50;
return *(int*)(__int64(this) + IDCounterOffset);
}
int& GetCachedNumItems()
{
static int CachedNumItemsOffset = 0x50 + 0x8 + 0x50 + (bNewSerializer ? 0x50 : 0x0);
// LOG_INFO(LogDev, "bNewSerializer: {}", bNewSerializer);
return *(int*)(__int64(this) + CachedNumItemsOffset);
}
int& GetCachedNumItemsToConsiderForWriting()
{
static int CachedNumItemsToConsiderForWritingOffset = 0x50 + 0x8 + 0x50 + 0x4 + (bNewSerializer ? 0x50 : 0x0);
return *(int*)(__int64(this) + CachedNumItemsToConsiderForWritingOffset);
}
void MarkItemDirty(FFastArraySerializerItem* Item)
{
if (Item->ReplicationID == -1)
{
Item->ReplicationID = ++GetIDCounter();
if (GetIDCounter() == -1)
GetIDCounter()++;
}
Item->ReplicationKey++;
MarkArrayDirty();
}
void MarkArrayDirty()
{
((FFastArraySerializer2*)this)->MarkArrayDirty();
return;
// ItemMap.Reset(); // This allows to clients to add predictive elements to arrays without affecting replication.
GetArrayReplicationKey()++;
if (GetArrayReplicationKey() == -1)
GetArrayReplicationKey()++;
// Invalidate the cached item counts so that they're recomputed during the next write
GetCachedNumItems() = -1;
GetCachedNumItemsToConsiderForWriting() = -1;
}
};

View File

@@ -0,0 +1,73 @@
#include "Object.h"
#include "addresses.h"
#include "Class.h"
#include "KismetSystemLibrary.h"
int UObject::GetOffset(const std::string& ChildName)
{
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 = ClassPrivate; CurrentClass; CurrentClass = *(UClass**)(__int64(CurrentClass) + Offsets::SuperStruct))
{
void* Property = *(void**)(__int64(CurrentClass) + Offsets::Children);
if (Property)
{
std::string PropName = getFNameOfProp(Property)->ToString();
// LOG_INFO(LogDev, "PropName: {}", PropName);
if (PropName == ChildName)
{
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
}
while (Property)
{
if (PropName == ChildName)
{
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
}
Property = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
PropName = Property ? getFNameOfProp(Property)->ToString() : "";
}
}
}
LOG_WARN(LogFinder, "Unable to find0{}", ChildName);
return 0;
}
std::string UObject::GetFullName()
{
return ClassPrivate ? ClassPrivate->GetName() + " " + UKismetSystemLibrary::GetPathName(this).ToString() : "NoClassPrivate";
}
bool UObject::IsA(UClass* otherClass)
{
UClass* super = ClassPrivate;
while (super)
{
if (otherClass == super)
return true;
super = *(UClass**)(__int64(super) + Offsets::SuperStruct);
}
return false;
}

View File

@@ -0,0 +1,83 @@
#pragma once
#include "ObjectMacros.h"
#include "NameTypes.h"
#include "addresses.h"
class UClass;
class UFunction;
struct FGuid
{
unsigned int A;
unsigned int B;
unsigned int C;
unsigned int D;
bool operator==(const FGuid& other)
{
return A == other.A && B == other.B && C == other.C && D == other.D;
}
};
class UObject
{
public:
void** VFTable;
/*EObjectFlags */ int32 ObjectFlags;
int32 InternalIndex;
UClass* ClassPrivate;
FName NamePrivate;
UObject* OuterPrivate;
static inline void (*ProcessEventOriginal)(UObject*, UFunction*, void*);
/* virtual */ void ProcessEvent(UFunction* Function, void* Parms = nullptr)
{
// LOG_INFO(LogDev, "PE: 0x{:x}", __int64(ProcessEventOriginal) - __int64(GetModuleHandleW(0)));
ProcessEventOriginal(this, Function, Parms);
}
std::string GetName() { return NamePrivate.ToString(); }
std::string GetFullName();
bool IsA(UClass* Other);
int GetOffset(const std::string& ChildName);
template <typename T = UObject*>
T& Get(int Offset) { return *(T*)(__int64(this) + Offset); }
template <typename T = UObject*>
T& GetCached(const std::string& ChildName)
{
// We need to find a better way to do this because if there is a member with the same name in a different class then it will return the wrong offset.
static std::unordered_map<std::string, int32_t> SavedOffsets; // Name (formatted in {Member}) and Offset
auto CachedName = /* ClassPrivate->GetName() + */ ChildName;
auto Offset = SavedOffsets.find(CachedName);
if (Offset != SavedOffsets.end())
{
int off = Offset->second;
return *(T*)(__int64(this) + off);
}
auto Offset = Get(ChildName);
SavedOffsets.emplace(CachedName, Offset->second);
return *(T*)(__int64(this) + Offset->second);
}
template <typename T = UObject*>
T& Get(const std::string& ChildName) { return Get<T>(GetOffset(ChildName)); }
template <typename T = UObject*>
T* GetPtr(int Offset) { return (T*)(__int64(this) + Offset); }
template <typename T = UObject*>
T* GetPtr(const std::string& ChildName) { return GetPtr<T>(GetOffset(ChildName)); }
};

View File

@@ -0,0 +1,35 @@
#pragma once
enum EObjectFlags
{
RF_NoFlags = 0x00000000,
RF_Public = 0x00000001,
RF_Standalone = 0x00000002,
RF_MarkAsNative = 0x00000004,
RF_Transactional = 0x00000008,
RF_ClassDefaultObject = 0x00000010,
RF_ArchetypeObject = 0x00000020,
RF_Transient = 0x00000040,
RF_MarkAsRootSet = 0x00000080,
RF_TagGarbageTemp = 0x00000100,
RF_NeedInitialization = 0x00000200,
RF_NeedLoad = 0x00000400,
RF_KeepForCooker = 0x00000800,
RF_NeedPostLoad = 0x00001000,
RF_NeedPostLoadSubobjects = 0x00002000,
RF_NewerVersionExists = 0x00004000,
RF_BeginDestroyed = 0x00008000,
RF_FinishDestroyed = 0x00010000,
RF_BeingRegenerated = 0x00020000,
RF_DefaultSubObject = 0x00040000,
RF_WasLoaded = 0x00080000,
RF_TextExportTransient = 0x00100000,
RF_LoadCompleted = 0x00200000,
RF_InheritableComponentTemplate = 0x00400000,
RF_DuplicateTransient = 0x00800000,
RF_StrongRefOnFrame = 0x01000000,
RF_NonPIEDuplicateTransient = 0x02000000,
RF_WillBeLoaded = 0x08000000,
RF_HasExternalPackage = 0x10000000,
RF_AllocatedInSharedPage = 0x80000000,
};

View File

@@ -0,0 +1,6 @@
class FOutputDevice
{
public:
bool bSuppressEventTag;
bool bAutoEmitLineTerminator;
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "Actor.h"
class APawn : public AActor
{
public:
};

View File

@@ -0,0 +1,21 @@
#include "PlayerController.h"
#include "reboot.h"
void APlayerController::Possess(class APawn* Pawn)
{
static auto fn = FindObject<UFunction>("/Script/Engine.Controller.Possess");
this->ProcessEvent(fn, &Pawn);
}
void APlayerController::ServerRestartPlayer()
{
static auto fn = FindObject<UFunction>("/Script/Engine.PlayerController.ServerRestartPlayer");
this->ProcessEvent(fn);
}
UClass* APlayerController::StaticClass()
{
static auto Class = FindObject<UClass>("/Script/Engine.PlayerController");
return Class;
}

View File

@@ -0,0 +1,37 @@
#pragma once
#include "Class.h"
#include "Actor.h"
class APlayerController : public AActor
{
public:
/* void Possess(APawn* Pawn)
{
static auto Possess = FindObject<UFunction>("/Script/Engine.Controller.Possess");
this->ProcessEvent(Possess, &Pawn);
}
static inline void ServerAcknowledgePossessionHook(APlayerController* PlayerController, APawn* P)
{
static auto AcknowledgedPawnOffset = PlayerController->GetOffset("AcknowledgedPawn");
PlayerController->Get<APawn*>(AcknowledgedPawnOffset) = P;
} */
class APlayerState*& GetPlayerState()
{
static auto PlayerStateOffset = this->GetOffset("PlayerState");
return this->Get<class APlayerState*>(PlayerStateOffset);
}
class APawn*& GetPawn()
{
static auto PawnOffset = this->GetOffset("Pawn");
return this->Get<class APawn*>(PawnOffset);
}
void Possess(class APawn* Pawn);
void ServerRestartPlayer();
static UClass* StaticClass();
};

View File

@@ -0,0 +1,8 @@
#pragma once
#include "Actor.h"
class APlayerState : public AActor
{
public:
};

View File

@@ -0,0 +1,263 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{69618184-b9db-4982-b4fe-f83e9bdd0555}</ProjectGuid>
<RootNamespace>ProjectReboot30</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;PROJECTREBOOT30_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalIncludeDirectories>../vendor</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>../vendor</AdditionalLibraryDirectories>
<AdditionalDependencies>MinHook/minhook.x64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;PROJECTREBOOT30_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalIncludeDirectories>../vendor</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<StringPooling>WOah!</StringPooling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>../vendor</AdditionalLibraryDirectories>
<AdditionalDependencies>MinHook/minhook.x64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;PROJECTREBOOT30_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalIncludeDirectories>../vendor</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>../vendor</AdditionalLibraryDirectories>
<AdditionalDependencies>Onecore.lib;MinHook/minhook.x64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;PROJECTREBOOT30_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<LanguageStandard>stdcpplatest</LanguageStandard>
<AdditionalIncludeDirectories>../vendor</AdditionalIncludeDirectories>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<StringPooling>
</StringPooling>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalLibraryDirectories>../vendor</AdditionalLibraryDirectories>
<AdditionalDependencies>Onecore.lib;MinHook/minhook.x64.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="AbilitySystemComponent_Abilities.cpp" />
<ClCompile Include="Actor.cpp" />
<ClCompile Include="ActorComponent.cpp" />
<ClCompile Include="addresses.cpp" />
<ClCompile Include="BuildingWeapons.cpp" />
<ClCompile Include="Class.cpp" />
<ClCompile Include="dllmain.cpp" />
<ClCompile Include="FortGameModeAthena.cpp" />
<ClCompile Include="FortGameModeZone.cpp" />
<ClCompile Include="FortGameStateAthena.cpp" />
<ClCompile Include="FortInventory.cpp" />
<ClCompile Include="FortInventory.h" />
<ClCompile Include="FortItem.cpp" />
<ClCompile Include="FortItemDefinition.cpp" />
<ClCompile Include="FortPawn.cpp" />
<ClCompile Include="FortPlayerController.cpp" />
<ClCompile Include="GameModeBase.cpp" />
<ClCompile Include="GameplayStatics.cpp" />
<ClCompile Include="KismetStringLibrary.cpp" />
<ClCompile Include="LevelActor.cpp" />
<ClCompile Include="NameTypes.cpp" />
<ClCompile Include="NetDriver.cpp" />
<ClCompile Include="Object.cpp" />
<ClCompile Include="PlayerController.cpp" />
<ClCompile Include="UnrealMath.cpp" />
<ClCompile Include="UnrealNames.cpp" />
<ClCompile Include="UObjectGlobals.cpp" />
<ClCompile Include="World.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="AbilitySystemComponent.h" />
<ClInclude Include="Actor.h" />
<ClInclude Include="ActorComponent.h" />
<ClInclude Include="addresses.h" />
<ClInclude Include="Array.h" />
<ClInclude Include="BuildingActor.h" />
<ClInclude Include="BuildingSMActor.h" />
<ClInclude Include="Class.h" />
<ClInclude Include="Controller.h" />
<ClInclude Include="Engine.h" />
<ClInclude Include="EngineTypes.h" />
<ClInclude Include="finder.h" />
<ClInclude Include="FortGameMode.h" />
<ClInclude Include="FortGameModeAthena.h" />
<ClInclude Include="FortGameModePvPBase.h" />
<ClInclude Include="FortGameModeZone.h" />
<ClInclude Include="FortGameStateAthena.h" />
<ClInclude Include="FortItem.h" />
<ClInclude Include="FortItemDefinition.h" />
<ClInclude Include="FortPawn.h" />
<ClInclude Include="FortPlayerController.h" />
<ClInclude Include="FortPlayerControllerAthena.h" />
<ClInclude Include="FortPlayerState.h" />
<ClInclude Include="FortPlayerStateAthena.h" />
<ClInclude Include="FortWeapon.h" />
<ClInclude Include="FortWeaponItemDefinition.h" />
<ClInclude Include="BuildingWeapons.h" />
<ClInclude Include="FortWorldItemDefinition.h" />
<ClInclude Include="GameMode.h" />
<ClInclude Include="GameModeBase.h" />
<ClInclude Include="GameplayAbilitySpec.h" />
<ClInclude Include="GameplayStatics.h" />
<ClInclude Include="GameSession.h" />
<ClInclude Include="GameState.h" />
<ClInclude Include="hooking.h" />
<ClInclude Include="inc.h" />
<ClInclude Include="KismetStringLibrary.h" />
<ClInclude Include="KismetSystemLibrary.h" />
<ClInclude Include="log.h" />
<ClInclude Include="NameTypes.h" />
<ClInclude Include="NetDriver.h" />
<ClInclude Include="NetSerialization.h" />
<ClInclude Include="Object.h" />
<ClInclude Include="ObjectMacros.h" />
<ClInclude Include="OutputDevice.h" />
<ClInclude Include="Pawn.h" />
<ClInclude Include="PlayerController.h" />
<ClInclude Include="PlayerState.h" />
<ClInclude Include="Quat.h" />
<ClInclude Include="reboot.h" />
<ClInclude Include="Rotator.h" />
<ClInclude Include="ScriptInterface.h" />
<ClInclude Include="Stack.h" />
<ClInclude Include="Transform.h" />
<ClInclude Include="UnrealString.h" />
<ClInclude Include="UObjectArray.h" />
<ClInclude Include="UObjectGlobals.h" />
<ClInclude Include="Vector.h" />
<ClInclude Include="World.h" />
</ItemGroup>
<ItemGroup>
<None Include="UnrealEngine.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@@ -0,0 +1,403 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="UnrealNames.cpp">
<Filter>Engine\Source\Runtime\Core\Private\UObject</Filter>
</ClCompile>
<ClCompile Include="Class.cpp">
<Filter>Engine\Source\Runtime\CoreUObject\Private</Filter>
</ClCompile>
<ClCompile Include="NameTypes.cpp">
<Filter>Engine\Source\Runtime\CoreUObject\Private</Filter>
</ClCompile>
<ClCompile Include="UObjectGlobals.cpp">
<Filter>Engine\Source\Runtime\CoreUObject\Private</Filter>
</ClCompile>
<ClCompile Include="KismetStringLibrary.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="FortGameModeZone.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private</Filter>
</ClCompile>
<ClCompile Include="addresses.cpp">
<Filter>Reboot</Filter>
</ClCompile>
<ClCompile Include="Object.cpp">
<Filter>Engine\Source\Runtime\CoreUObject\Private</Filter>
</ClCompile>
<ClCompile Include="LevelActor.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="FortGameModeAthena.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private</Filter>
</ClCompile>
<ClCompile Include="World.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="GameModeBase.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="Actor.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="NetDriver.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="FortInventory.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Items</Filter>
</ClCompile>
<ClCompile Include="FortInventory.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Items</Filter>
</ClCompile>
<ClCompile Include="FortPawn.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Pawns</Filter>
</ClCompile>
<ClCompile Include="AbilitySystemComponent_Abilities.cpp">
<Filter>Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Private</Filter>
</ClCompile>
<ClCompile Include="FortPlayerController.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Player</Filter>
</ClCompile>
<ClCompile Include="UnrealMath.cpp">
<Filter>Engine\Source\Runtime\Core\Private\Math</Filter>
</ClCompile>
<ClCompile Include="FortItem.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Items</Filter>
</ClCompile>
<ClCompile Include="FortItemDefinition.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Items</Filter>
</ClCompile>
<ClCompile Include="BuildingWeapons.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private\Weapons</Filter>
</ClCompile>
<ClCompile Include="FortGameStateAthena.cpp">
<Filter>FortniteGame\Source\FortniteGame\Private</Filter>
</ClCompile>
<ClCompile Include="GameplayStatics.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="PlayerController.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</ClCompile>
<ClCompile Include="ActorComponent.cpp">
<Filter>Engine\Source\Runtime\Engine\Private\Components</Filter>
</ClCompile>
<ClCompile Include="dllmain.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="log.h" />
<ClInclude Include="finder.h" />
<ClInclude Include="inc.h" />
<ClInclude Include="Array.h">
<Filter>Engine\Source\Runtime\Core\Public\Containers</Filter>
</ClInclude>
<ClInclude Include="UnrealString.h">
<Filter>Engine\Source\Runtime\Core\Public\Containers</Filter>
</ClInclude>
<ClInclude Include="NameTypes.h">
<Filter>Engine\Source\Runtime\Core\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="reboot.h">
<Filter>Reboot</Filter>
</ClInclude>
<ClInclude Include="Class.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="Object.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="ObjectMacros.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="UObjectArray.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="UObjectGlobals.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="Engine.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="Stack.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="OutputDevice.h">
<Filter>Engine\Source\Runtime\Core\Public\Misc</Filter>
</ClInclude>
<ClInclude Include="NetDriver.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="World.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="KismetStringLibrary.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Kismet</Filter>
</ClInclude>
<ClInclude Include="Actor.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="GameMode.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="FortGameModeZone.h">
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
</ClInclude>
<ClInclude Include="FortGameMode.h">
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
</ClInclude>
<ClInclude Include="FortGameModeAthena.h">
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
</ClInclude>
<ClInclude Include="FortGameModePvPBase.h">
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
</ClInclude>
<ClInclude Include="addresses.h">
<Filter>Reboot</Filter>
</ClInclude>
<ClInclude Include="Transform.h">
<Filter>Engine\Source\Runtime\Core\Public\Math</Filter>
</ClInclude>
<ClInclude Include="Vector.h">
<Filter>Engine\Source\Runtime\Core\Public\Math</Filter>
</ClInclude>
<ClInclude Include="Quat.h">
<Filter>Engine\Source\Runtime\Core\Public\Math</Filter>
</ClInclude>
<ClInclude Include="EngineTypes.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="hooking.h" />
<ClInclude Include="GameModeBase.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="Controller.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="Pawn.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="GameSession.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="NetSerialization.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="FortItem.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Items</Filter>
</ClInclude>
<ClInclude Include="FortItemDefinition.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Items</Filter>
</ClInclude>
<ClInclude Include="FortPlayerControllerAthena.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Player</Filter>
</ClInclude>
<ClInclude Include="PlayerController.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Engine</Filter>
</ClInclude>
<ClInclude Include="FortPlayerController.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Player</Filter>
</ClInclude>
<ClInclude Include="FortPawn.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Pawns</Filter>
</ClInclude>
<ClInclude Include="FortWeapon.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Weapons</Filter>
</ClInclude>
<ClInclude Include="FortWorldItemDefinition.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Items</Filter>
</ClInclude>
<ClInclude Include="FortWeaponItemDefinition.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Items</Filter>
</ClInclude>
<ClInclude Include="PlayerState.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="FortPlayerState.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Player</Filter>
</ClInclude>
<ClInclude Include="FortPlayerStateAthena.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Player</Filter>
</ClInclude>
<ClInclude Include="FortGameStateAthena.h">
<Filter>FortniteGame\Source\FortniteGame\Public</Filter>
</ClInclude>
<ClInclude Include="GameState.h">
<Filter>Engine\Source\Runtime\Engine\Classes\GameFramework</Filter>
</ClInclude>
<ClInclude Include="AbilitySystemComponent.h">
<Filter>Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public</Filter>
</ClInclude>
<ClInclude Include="GameplayAbilitySpec.h">
<Filter>Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public</Filter>
</ClInclude>
<ClInclude Include="KismetSystemLibrary.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Kismet</Filter>
</ClInclude>
<ClInclude Include="BuildingActor.h">
<Filter>FortniteGame\Source\FortniteGame\Private\Building</Filter>
</ClInclude>
<ClInclude Include="BuildingSMActor.h">
<Filter>FortniteGame\Source\FortniteGame\Private\Building</Filter>
</ClInclude>
<ClInclude Include="Rotator.h">
<Filter>Engine\Source\Runtime\Core\Public\Math</Filter>
</ClInclude>
<ClInclude Include="ScriptInterface.h">
<Filter>Engine\Source\Runtime\CoreUObject\Public\UObject</Filter>
</ClInclude>
<ClInclude Include="BuildingWeapons.h">
<Filter>FortniteGame\Source\FortniteGame\Public\Weapons</Filter>
</ClInclude>
<ClInclude Include="GameplayStatics.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Kismet</Filter>
</ClInclude>
<ClInclude Include="ActorComponent.h">
<Filter>Engine\Source\Runtime\Engine\Classes\Components</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Engine">
<UniqueIdentifier>{b88dd971-6115-4cb9-92c3-7bb9a4d9474a}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source">
<UniqueIdentifier>{44b71ed5-9173-4e31-9938-2214bbc4b0e8}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime">
<UniqueIdentifier>{3cc1cd7a-b3d3-47e9-960e-3fb3814fb588}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core">
<UniqueIdentifier>{f9419e52-4764-4d38-b071-87c82b9c2317}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Private">
<UniqueIdentifier>{40e6dd42-e035-44da-8cc3-768d479865f6}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Private\UObject">
<UniqueIdentifier>{9613f557-a37d-4e60-9462-19db955824bc}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Public">
<UniqueIdentifier>{eabe5e8e-f084-4bcb-b302-af5d52ebfe39}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Public\Containers">
<UniqueIdentifier>{d7b8c9a5-5bbe-49a8-b5b0-3ff6d626534f}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Public\UObject">
<UniqueIdentifier>{e959a791-dbdf-4ec3-a3b3-7f75724d3ce5}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame">
<UniqueIdentifier>{81055b71-1fa3-44f0-b3b8-1b6c8c464514}</UniqueIdentifier>
</Filter>
<Filter Include="Reboot">
<UniqueIdentifier>{08555946-4ef9-4777-94fb-9025ca2dfe61}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\CoreUObject">
<UniqueIdentifier>{34d20f6d-7b34-47a0-b7d5-fcfff1e61401}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\CoreUObject\Private">
<UniqueIdentifier>{71e5f0ae-2081-44af-9847-63afa97ecb00}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\CoreUObject\Public">
<UniqueIdentifier>{b7da14ca-b328-43b1-988b-84af45b808ba}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\CoreUObject\Public\UObject">
<UniqueIdentifier>{493b9ebf-983a-4560-a8fc-72781136acdd}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine">
<UniqueIdentifier>{a7131bef-c957-4218-a28c-f1ed68b3fcf2}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Classes">
<UniqueIdentifier>{f889566a-76be-45e4-824e-71bd6d57c8a6}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Private">
<UniqueIdentifier>{58aa6032-1f71-43db-8de6-de3fd72baae5}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Classes\Engine">
<UniqueIdentifier>{812667a2-87b9-4901-bea3-1b5f9f757892}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Public\Misc">
<UniqueIdentifier>{52fcb572-6fc2-4315-a929-690dc0ab0f97}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Classes\GameFramework">
<UniqueIdentifier>{a736197d-560f-4eb7-9beb-8add1012ce04}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Classes\Kismet">
<UniqueIdentifier>{ffd2b7f3-d44a-45f3-8c06-7c24cd9909de}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source">
<UniqueIdentifier>{2f1b66bd-6006-4ab0-9924-8aaaac4af427}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame">
<UniqueIdentifier>{f97d67ee-e06e-4721-8318-a23f4279e620}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private">
<UniqueIdentifier>{21ca8107-eea3-4cf5-ae5a-17159838820c}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public">
<UniqueIdentifier>{717548a7-0c7f-4bdb-bb99-5744b0e206c0}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Public\Math">
<UniqueIdentifier>{4533fd04-0668-4607-a456-0f781bad54f9}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Items">
<UniqueIdentifier>{02d68293-0dad-48ba-a61f-60fbfdab971e}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public\Items">
<UniqueIdentifier>{7b146e1a-c896-42ff-bffe-b7a6f6b0240a}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public\Player">
<UniqueIdentifier>{ccf18d87-2aa4-4f58-bd54-7271e99845b5}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Pawns">
<UniqueIdentifier>{3a7564c8-56c2-4273-8a34-67dafe5522c4}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public\Pawns">
<UniqueIdentifier>{4f177a72-585d-4b79-a258-26bb6d2c225c}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Public\Weapons">
<UniqueIdentifier>{bcb0d983-0b85-4ca6-9fac-6567c7d79921}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins">
<UniqueIdentifier>{826a509f-03f4-4a18-a9bf-d67b69fe3b93}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins\Runtime">
<UniqueIdentifier>{55eb1be2-e289-436e-9a10-68ca9f20d6d9}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins\Runtime\GameplayAbilities">
<UniqueIdentifier>{ff05565d-6ed7-4f30-9378-1951bab60567}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins\Runtime\GameplayAbilities\Source">
<UniqueIdentifier>{d42d8fb0-7e1c-4194-bc0e-a0257dd6dbec}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities">
<UniqueIdentifier>{a29f6a34-9f04-43ac-adae-48d4751a761d}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Private">
<UniqueIdentifier>{87195f09-7368-4d8d-88cb-224e3f96ae43}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public">
<UniqueIdentifier>{9cdf2185-5e04-4d3e-82a0-2e936f905379}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Player">
<UniqueIdentifier>{a12cb364-3e34-454a-958f-b1fe54534353}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Building">
<UniqueIdentifier>{a6fd658c-6824-4186-b45e-2edf5d20eeae}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Core\Private\Math">
<UniqueIdentifier>{6c0193a3-7b06-4298-99fe-a5a18be27d58}</UniqueIdentifier>
</Filter>
<Filter Include="FortniteGame\Source\FortniteGame\Private\Weapons">
<UniqueIdentifier>{4ec49a59-4f0a-424b-9ac7-24901766da09}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Classes\Components">
<UniqueIdentifier>{aa080dc3-54fb-43f1-b53f-2439e559198d}</UniqueIdentifier>
</Filter>
<Filter Include="Engine\Source\Runtime\Engine\Private\Components">
<UniqueIdentifier>{eab3cd46-ced6-4e56-9fda-ed35ec9f9f64}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="UnrealEngine.cpp">
<Filter>Engine\Source\Runtime\Engine\Private</Filter>
</None>
</ItemGroup>
</Project>

20
Project Reboot 3.0/Quat.h Normal file
View File

@@ -0,0 +1,20 @@
#pragma once
#include "inc.h"
MS_ALIGN(16) struct FQuat
{
public:
/** The quaternion's X-component. */
float X;
/** The quaternion's Y-component. */
float Y;
/** The quaternion's Z-component. */
float Z;
/** The quaternion's W-component. */
float W;
};

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Quat.h"
struct FRotator
{
float Pitch;
float Yaw;
float Roll;
FQuat Quaternion();
};

View File

@@ -0,0 +1,15 @@
#pragma once
#include "Object.h"
class FScriptInterface
{
private:
UObject* ObjectPointer;
void* InterfacePointer;
};
template<class InterfaceType>
class TScriptInterface : public FScriptInterface
{
};

View File

@@ -0,0 +1,18 @@
#pragma once
#include "OutputDevice.h"
#include "Class.h"
struct FFrame : public FOutputDevice // https://github.com/EpicGames/UnrealEngine/blob/7acbae1c8d1736bb5a0da4f6ed21ccb237bc8851/Engine/Source/Runtime/CoreUObject/Public/UObject/Stack.h#L83
{
public:
void** VFT;
// Variables.
UFunction* Node;
UObject* Object;
uint8* Code;
uint8* Locals;
// MORE STUFF HERE
};

View File

@@ -0,0 +1,13 @@
#pragma once
#include "Vector.h"
#include "Quat.h"
MS_ALIGN(16) struct FTransform
{
FQuat Rotation; // 0x0000(0x0010) (Edit, BlueprintVisible, SaveGame, IsPlainOldData, NoDestructor, NativeAccessSpecifierPublic)
FVector Translation; // 0x0010(0x000C) (Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
unsigned char UnknownData00[0x4]; // 0x001C(0x0004) MISSED OFFSET
FVector Scale3D; // 0x0020(0x000C) (Edit, BlueprintVisible, ZeroConstructor, SaveGame, IsPlainOldData, NoDestructor, HasGetValueTypeHash, NativeAccessSpecifierPublic)
unsigned char UnknownData01[0x4]; // 0x002C(0x0004) MISSED OFFSET
};

View File

@@ -0,0 +1,87 @@
#pragma once
#include "inc.h"
#include "Object.h"
struct FUObjectItem
{
UObject* Object;
int32 Flags;
int32 ClusterRootIndex;
int32 SerialNumber;
};
class FFixedUObjectArray
{
FUObjectItem* Objects;
int32 MaxElements;
int32 NumElements;
public:
FORCEINLINE int32 Num() const { return NumElements; }
FORCEINLINE int32 Capacity() const { return MaxElements; }
FORCEINLINE bool IsValidIndex(int32 Index) const { return Index < Num() && Index >= 0; }
FORCEINLINE FUObjectItem* GetItemByIndex(int32 Index)
{
if (!IsValidIndex(Index)) return nullptr;
return &Objects[Index];
}
FORCEINLINE UObject* GetObjectByIndex(int32 Index)
{
if (auto Item = GetItemByIndex(Index))
return Item->Object;
return nullptr;
}
};
class FChunkedFixedUObjectArray
{
enum { NumElementsPerChunk = 64 * 1024, };
FUObjectItem** Objects;
FUObjectItem* PreAllocatedObjects;
int32 MaxElements;
int32 NumElements;
int32 MaxChunks;
int32 NumChunks;
public:
FORCEINLINE int32 Num() const { return NumElements; }
FORCEINLINE int32 Capacity() const { return MaxElements; }
FORCEINLINE bool IsValidIndex(int32 Index) const { return Index < Num() && Index >= 0; }
FORCEINLINE FUObjectItem* GetItemByIndex(int32 Index)
{
if (!IsValidIndex(Index)) return nullptr;
const int32 ChunkIndex = Index / NumElementsPerChunk;
const int32 WithinChunkIndex = Index % NumElementsPerChunk;
// checkf(ChunkIndex < NumChunks, TEXT("ChunkIndex (%d) < NumChunks (%d)"), ChunkIndex, NumChunks);
// checkf(Index < MaxElements, TEXT("Index (%d) < MaxElements (%d)"), Index, MaxElements);
FUObjectItem* Chunk = Objects[ChunkIndex];
if (!Chunk)
return nullptr;
return Chunk + WithinChunkIndex;
}
FORCEINLINE UObject* GetObjectByIndex(int32 Index)
{
if (auto Item = GetItemByIndex(Index))
return Item->Object;
return nullptr;
}
};
static inline FChunkedFixedUObjectArray* ChunkedObjects;
static inline FFixedUObjectArray* UnchunkedObjects;
FORCEINLINE UObject* GetObjectByIndex(int32 Index)
{
return ChunkedObjects ? ChunkedObjects->GetObjectByIndex(Index) : UnchunkedObjects->GetObjectByIndex(Index);
}

View File

View File

@@ -0,0 +1,12 @@
#pragma once
#include "Object.h"
extern inline UObject* (*StaticFindObjectOriginal)(UClass* Class, UObject* InOuter, const TCHAR* Name, bool ExactClass) = nullptr;
template <typename T>
static inline T* StaticFindObject(UClass* Class, UObject* InOuter, const TCHAR* Name, bool ExactClass = false)
{
// LOG_INFO(LogDev, "StaticFindObjectOriginal: {}", __int64(StaticFindObjectOriginal));
return (T*)StaticFindObjectOriginal(Class, InOuter, Name, ExactClass);
}

View File

View File

@@ -0,0 +1,104 @@
#include "Rotator.h"
#define INV_PI (0.31830988618f)
#define HALF_PI (1.57079632679f)
#define PI (3.1415926535897932f)
static FORCEINLINE void SinCos(float* ScalarSin, float* ScalarCos, float Value)
{
// Map Value to y in [-pi,pi], x = 2*pi*quotient + remainder.
float quotient = (INV_PI * 0.5f) * Value;
if (Value >= 0.0f)
{
quotient = (float)((int)(quotient + 0.5f));
}
else
{
quotient = (float)((int)(quotient - 0.5f));
}
float y = Value - (2.0f * PI) * quotient;
// Map y to [-pi/2,pi/2] with sin(y) = sin(Value).
float sign;
if (y > HALF_PI)
{
y = PI - y;
sign = -1.0f;
}
else if (y < -HALF_PI)
{
y = -PI - y;
sign = -1.0f;
}
else
{
sign = +1.0f;
}
float y2 = y * y;
// 11-degree minimax approximation
*ScalarSin = (((((-2.3889859e-08f * y2 + 2.7525562e-06f) * y2 - 0.00019840874f) * y2 + 0.0083333310f) * y2 - 0.16666667f) * y2 + 1.0f) * y;
// 10-degree minimax approximation
float p = ((((-2.6051615e-07f * y2 + 2.4760495e-05f) * y2 - 0.0013888378f) * y2 + 0.041666638f) * y2 - 0.5f) * y2 + 1.0f;
*ScalarCos = sign * p;
}
struct FQuat FRotator::Quaternion()
{
#if PLATFORM_ENABLE_VECTORINTRINSICS
const VectorRegister Angles = MakeVectorRegister(Rotator.Pitch, Rotator.Yaw, Rotator.Roll, 0.0f);
const VectorRegister HalfAngles = VectorMultiply(Angles, DEG_TO_RAD_HALF);
VectorRegister SinAngles, CosAngles;
VectorSinCos(&SinAngles, &CosAngles, &HalfAngles);
// Vectorized conversion, measured 20% faster than using scalar version after VectorSinCos.
// Indices within VectorRegister (for shuffles): P=0, Y=1, R=2
const VectorRegister SR = VectorReplicate(SinAngles, 2);
const VectorRegister CR = VectorReplicate(CosAngles, 2);
const VectorRegister SY_SY_CY_CY_Temp = VectorShuffle(SinAngles, CosAngles, 1, 1, 1, 1);
const VectorRegister SP_SP_CP_CP = VectorShuffle(SinAngles, CosAngles, 0, 0, 0, 0);
const VectorRegister SY_CY_SY_CY = VectorShuffle(SY_SY_CY_CY_Temp, SY_SY_CY_CY_Temp, 0, 2, 0, 2);
const VectorRegister CP_CP_SP_SP = VectorShuffle(CosAngles, SinAngles, 0, 0, 0, 0);
const VectorRegister CY_SY_CY_SY = VectorShuffle(SY_SY_CY_CY_Temp, SY_SY_CY_CY_Temp, 2, 0, 2, 0);
const uint32 Neg = uint32(1 << 31);
const uint32 Pos = uint32(0);
const VectorRegister SignBitsLeft = MakeVectorRegister(Pos, Neg, Pos, Pos);
const VectorRegister SignBitsRight = MakeVectorRegister(Neg, Neg, Neg, Pos);
const VectorRegister LeftTerm = VectorBitwiseXor(SignBitsLeft, VectorMultiply(CR, VectorMultiply(SP_SP_CP_CP, SY_CY_SY_CY)));
const VectorRegister RightTerm = VectorBitwiseXor(SignBitsRight, VectorMultiply(SR, VectorMultiply(CP_CP_SP_SP, CY_SY_CY_SY)));
FQuat RotationQuat;
const VectorRegister Result = VectorAdd(LeftTerm, RightTerm);
VectorStoreAligned(Result, &RotationQuat);
#else
const float DEG_TO_RAD = PI / (180.f);
const float DIVIDE_BY_2 = DEG_TO_RAD / 2.f;
float SP, SY, SR;
float CP, CY, CR;
SinCos(&SP, &CP, Pitch * DIVIDE_BY_2);
SinCos(&SY, &CY, Yaw * DIVIDE_BY_2);
SinCos(&SR, &CR, Roll * DIVIDE_BY_2);
FQuat RotationQuat{};
RotationQuat.X = CR * SP * SY - SR * CP * CY;
RotationQuat.Y = -CR * SP * CY - SR * CP * SY;
RotationQuat.Z = CR * CP * SY - SR * SP * CY;
RotationQuat.W = CR * CP * CY + SR * SP * SY;
#endif // PLATFORM_ENABLE_VECTORINTRINSICS
#if ENABLE_NAN_DIAGNOSTIC || DO_CHECK
// Very large inputs can cause NaN's. Want to catch this here
ensureMsgf(!RotationQuat.ContainsNaN(), TEXT("Invalid input to FRotator::Quaternion - generated NaN output: %s"), *RotationQuat.ToString());
#endif
return RotationQuat;
}

View File

@@ -0,0 +1,23 @@
#include "NameTypes.h"
#include "reboot.h"
#include "UnrealString.h"
#include "KismetStringLibrary.h"
std::string FName::ToString()
{
static auto KismetStringLibrary = FindObject<UKismetStringLibrary>(L"/Script/Engine.Default__KismetStringLibrary");
static auto Conv_NameToString = FindObject<UFunction>(L"/Script/Engine.KismetStringLibrary.Conv_NameToString");
struct { FName InName; FString OutStr; } Conv_NameToString_Params{ *this };
KismetStringLibrary->ProcessEvent(Conv_NameToString, &Conv_NameToString_Params);
auto Str = Conv_NameToString_Params.OutStr.ToString();
// Conv_NameToString_Params.OutStr.Free();
return Str;
}

View File

@@ -0,0 +1,47 @@
#pragma once
#include <locale>
#include "Array.h"
class FString
{
TArray<TCHAR> Data;
public:
std::string ToString() const
{
auto length = std::wcslen(Data.Data);
std::string str(length, '\0');
std::use_facet<std::ctype<wchar_t>>(std::locale()).narrow(Data.Data, Data.Data + length, '?', &str[0]);
return str;
}
void Free()
{
Data.Free();
}
bool IsValid()
{
return Data.Data;
}
void Set(const wchar_t* NewStr) // by fischsalat
{
if (!NewStr || std::wcslen(NewStr) == 0) return;
Data.ArrayMax = Data.ArrayNum = *NewStr ? (int)std::wcslen(NewStr) + 1 : 0;
if (Data.ArrayNum)
Data.Data = const_cast<wchar_t*>(NewStr);
}
FString() {}
FString(const wchar_t* str)
{
Set(str);
}
};

View File

@@ -0,0 +1,9 @@
#pragma once
struct FVector
{
public:
float X;
float Y;
float Z;
};

View File

@@ -0,0 +1,73 @@
#include "World.h"
#include "KismetStringLibrary.h"
#include "Actor.h"
#include "reboot.h"
void UWorld::Listen()
{
auto GameNetDriverName = UKismetStringLibrary::Conv_StringToName(L"GameNetDriver");
UNetDriver* NewNetDriver = nullptr;
constexpr bool bUseBeacons = true;
if (bUseBeacons)
{
static auto BeaconClass = FindObject<UClass>(L"/Script/FortniteGame.FortOnlineBeaconHost");
auto NewBeacon = GetWorld()->SpawnActor<AActor>(BeaconClass);
if (!NewBeacon)
{
LOG_ERROR(LogNet, "Failed to spawn beacon!");
return;
}
static bool (*InitHost)(UObject* Beacon) = decltype(InitHost)(Addresses::InitHost);
static void (*PauseBeaconRequests)(UObject* Beacon, bool bPause) = decltype(PauseBeaconRequests)(Addresses::PauseBeaconRequests);
InitHost(NewBeacon);
PauseBeaconRequests(NewBeacon, false);
NewNetDriver = NewBeacon->Get<UNetDriver*>("NetDriver");
}
else
{
NewNetDriver = GetEngine()->CreateNetDriver(GetWorld(), GameNetDriverName);
}
if (!NewNetDriver)
{
LOG_ERROR(LogNet, "Failed to create net driver!");
return;
}
NewNetDriver->Get<FName>("NetDriverName") = GameNetDriverName;
GetWorld()->Get("NetDriver") = NewNetDriver;
int Port = 7777;
FURL URL = FURL();
URL.Port = Port - (Engine_Version >= 426);
FString Error;
if (!NewNetDriver->InitListen(GetWorld(), URL, false, Error))
{
LOG_ERROR(LogNet, "Failed to init listen!");
return;
}
NewNetDriver->SetWorld(GetWorld());
// LEVEL COLLECTIONS
auto& LevelCollections = GetWorld()->Get<TArray<__int64>>("LevelCollections");
int LevelCollectionSize = 0x78;
*(UNetDriver**)(__int64(LevelCollections.AtPtr(0, LevelCollectionSize)) + 0x10) = NewNetDriver;
*(UNetDriver**)(__int64(LevelCollections.AtPtr(1, LevelCollectionSize)) + 0x10) = NewNetDriver;
LOG_INFO(LogNet, "Listening on port {}!", Port);
}

View File

@@ -0,0 +1,49 @@
#pragma once
#include "EngineTypes.h"
#include "Transform.h"
#include "Object.h"
struct FNetworkNotify
{
};
struct FActorSpawnParameters
{
FName Name;
UObject* Template;
UObject* Owner;
UObject** Instigator;
UObject* OverrideLevel;
ESpawnActorCollisionHandlingMethod SpawnCollisionHandlingOverride;
uint16 bRemoteOwned : 1;
uint16 bNoFail : 1;
uint16 bDeferConstruction : 1;
uint16 bAllowDuringConstructionScript : 1;
#if WITH_EDITOR
uint16 bTemporaryEditorActor : 1;
#endif
EObjectFlags ObjectFlags;
};
class UWorld : public UObject, public FNetworkNotify
{
public:
static inline UObject* (*SpawnActorOriginal)(UWorld* World, UClass* Class, FTransform const* UserTransformPtr, const FActorSpawnParameters& SpawnParameters);
template <typename T = AActor>
T* GetGameMode()
{
static auto AuthorityGameModeOffset = GetOffset("AuthorityGameMode");
return this->Get<T*>(AuthorityGameModeOffset);
}
template <typename ActorType>
ActorType* SpawnActor(UClass* Class, FTransform UserTransformPtr = FTransform(), const FActorSpawnParameters& SpawnParameters = FActorSpawnParameters())
{
return (ActorType*)SpawnActorOriginal(this, Class, &UserTransformPtr, SpawnParameters);
}
void Listen();
};

View File

@@ -0,0 +1,152 @@
#include "addresses.h"
#include "UObjectGlobals.h"
#include "World.h"
#include "NetDriver.h"
#include "GameSession.h"
#include "NetSerialization.h"
#include "Array.h"
#include "AbilitySystemComponent.h"
#include "finder.h"
void Addresses::SetupVersion()
{
// if (false)
{
Engine_Version = 423;
Fortnite_Version = 10.40;
}
if (false)
{
Engine_Version = 424;
Fortnite_Version = 11.01;
}
if (false)
{
Engine_Version = 425;
Fortnite_Version = 12.41;
}
FFastArraySerializer::bNewSerializer = Fortnite_Version >= 8.30;
}
void Addresses::FindAll()
{
Addresses::ProcessEvent = FindProcessEvent();
Addresses::StaticFindObject = FindStaticFindObject();
Addresses::GetPlayerViewpoint = FindGetPlayerViewpoint();
Addresses::CreateNetDriver = FindCreateNetDriver();
Addresses::InitHost = FindInitHost();
Addresses::PauseBeaconRequests = FindPauseBeaconRequests();
Addresses::SpawnActor = FindSpawnActor();
Addresses::InitListen = FindInitListen();
Addresses::SetWorld = FindSetWorld();
Addresses::KickPlayer = FindKickPlayer();
Addresses::TickFlush = FindTickFlush();
Addresses::GetNetMode = FindGetNetMode();
Addresses::Realloc = FindRealloc();
Addresses::CollectGarbage = FindCollectGarbage();
Addresses::NoMCP = FindNoMCP();
Addresses::PickTeam = FindPickTeam();
Addresses::InternalTryActivateAbility = FindInternalTryActivateAbility();
Addresses::GiveAbility = FindGiveAbility();
Addresses::CantBuild = FindCantBuild();
Addresses::ReplaceBuildingActor = FindReplaceBuildingActor();
}
void Addresses::Print()
{
auto Base = __int64(GetModuleHandleW(0));
LOG_INFO(LogDev, "Base: 0x{:x}", Base);
LOG_INFO(LogDev, "ProcessEvent: 0x{:x}", ProcessEvent - Base);
LOG_INFO(LogDev, "StaticFindObject: 0x{:x}", StaticFindObject - Base);
LOG_INFO(LogDev, "GetPlayerViewpoint: 0x{:x}", GetPlayerViewpoint - Base);
LOG_INFO(LogDev, "CreateNetDriver: 0x{:x}", CreateNetDriver - Base);
LOG_INFO(LogDev, "InitHost: 0x{:x}", InitHost - Base);
LOG_INFO(LogDev, "PauseBeaconRequests: 0x{:x}", PauseBeaconRequests - Base);
LOG_INFO(LogDev, "SpawnActor: 0x{:x}", SpawnActor - Base);
LOG_INFO(LogDev, "InitListen: 0x{:x}", InitListen - Base);
LOG_INFO(LogDev, "SetWorld: 0x{:x}", SetWorld - Base);
LOG_INFO(LogDev, "KickPlayer: 0x{:x}", KickPlayer - Base);
LOG_INFO(LogDev, "TickFlush: 0x{:x}", TickFlush - Base);
LOG_INFO(LogDev, "GetNetMode: 0x{:x}", GetNetMode - Base);
LOG_INFO(LogDev, "Realloc: 0x{:x}", Realloc - Base);
LOG_INFO(LogDev, "CollectGarbage: 0x{:x}", CollectGarbage - Base);
LOG_INFO(LogDev, "NoMCP: 0x{:x}", NoMCP - Base);
LOG_INFO(LogDev, "PickTeam: 0x{:x}", PickTeam - Base);
LOG_INFO(LogDev, "InternalTryActivateAbility: 0x{:x}", InternalTryActivateAbility - Base);
LOG_INFO(LogDev, "GiveAbility: 0x{:x}", GiveAbility - Base);
LOG_INFO(LogDev, "CantBuild: 0x{:x}", CantBuild - Base);
LOG_INFO(LogDev, "ReplaceBuildingActor: 0x{:x}", ReplaceBuildingActor - Base);
}
void Offsets::FindAll()
{
Offsets::Offset_Internal = Engine_Version >= 425 && std::floor(Fortnite_Version) < 20 ? 0x4C : 0x44;
Offsets::SuperStruct = Engine_Version >= 422 ? 0x40 : 0x30;
Offsets::Children = Engine_Version >= 425 ? 0x50 : Offsets::SuperStruct + 8;
Offsets::PropertiesSize = Offsets::Children + 8;
if (Engine_Version == 420 || Engine_Version == 421)
Offsets::Func = 0xB0;
else if (Engine_Version == 423 || Engine_Version == 424)
Offsets::Func = 0xC0;
else if (Engine_Version == 425)
Offsets::Func = 0xF0;
else if (Engine_Version >= 426)
Offsets::Func = 0xD8;
if (Engine_Version == 420)
Offsets::ServerReplicateActors = 0x53;
else if (Engine_Version == 421)
Offsets::ServerReplicateActors = std::floor(Fortnite_Version) == 5 ? 0x54 : 0x56;
else if (Engine_Version >= 422 && Engine_Version <= 424)
Offsets::ServerReplicateActors = Fortnite_Version >= 7.40 && Fortnite_Version < 8.40 ? 0x57 :
Engine_Version == 424 ? (Fortnite_Version >= 11.00 && Fortnite_Version <= 11.01 ? 0x57 :
(Fortnite_Version == 11.30 || Fortnite_Version == 11.31 ? 0x59 : 0x5A)) : 0x56;
// ^ I know this makes no sense, 7.40-8.40 is 0x57, other 7-10 is 0x56, 11.00-11.01 = 0x57, 11.31 = 0x59, other S11 is 0x5A
else if (std::floor(Fortnite_Version) == 12 || std::floor(Fortnite_Version) == 13)
Offsets::ServerReplicateActors = 0x5D;
else if (std::floor(Fortnite_Version) == 14 || Fortnite_Version <= 15.2) // never tested 15.2
Offsets::ServerReplicateActors = 0x5E;
else if (Fortnite_Version >= 15.3 && Engine_Version < 500) // 15.3-18 = 0x5F
Offsets::ServerReplicateActors = 0x5F;
else if (std::floor(Fortnite_Version) >= 19 && std::floor(Fortnite_Version) <= 20)
Offsets::ServerReplicateActors = 0x66;
else if (std::floor(Fortnite_Version) >= 21)
Offsets::ServerReplicateActors = 0x67; // checked onb 22.30
}
void Offsets::Print()
{
LOG_INFO(LogDev, "Offset_Internal: 0x{:x}", Offset_Internal);
LOG_INFO(LogDev, "SuperStruct: 0x{:x}", SuperStruct);
LOG_INFO(LogDev, "Children: 0x{:x}", Children);
LOG_INFO(LogDev, "PropertiesSize: 0x{:x}", PropertiesSize);
LOG_INFO(LogDev, "Func: 0x{:x}", Func);
}
void Addresses::Init()
{
UObject::ProcessEventOriginal = decltype(UObject::ProcessEventOriginal)(ProcessEvent);
StaticFindObjectOriginal = decltype(StaticFindObjectOriginal)(StaticFindObject);
UWorld::SpawnActorOriginal = decltype(UWorld::SpawnActorOriginal)(SpawnActor);
UNetDriver::InitListenOriginal = decltype(UNetDriver::InitListenOriginal)(InitListen);
UNetDriver::SetWorldOriginal = decltype(UNetDriver::SetWorldOriginal)(SetWorld);
AGameSession::KickPlayerOriginal = decltype(AGameSession::KickPlayerOriginal)(KickPlayer);
UNetDriver::TickFlushOriginal = decltype(UNetDriver::TickFlushOriginal)(TickFlush);
FMemory::Realloc = decltype(FMemory::Realloc)(Realloc);
UAbilitySystemComponent::GiveAbilityOriginal = decltype(UAbilitySystemComponent::GiveAbilityOriginal)(GiveAbility);
UAbilitySystemComponent::InternalTryActivateAbilityOriginal = decltype(UAbilitySystemComponent::InternalTryActivateAbilityOriginal)(InternalTryActivateAbility);
// if (Engine_Version >= 421) ChunkedObjects = decltype(ChunkedObjects)(ObjectArray);
// else UnchunkedObjects = decltype(UnchunkedObjects)(ObjectArray);
}

View File

@@ -0,0 +1,51 @@
#pragma once
// #include "finder.h"
#include "log.h"
#include "inc.h"
namespace Addresses
{
extern inline uint64 StaticFindObject = 0;
extern inline uint64 StaticLoadObject = 0;
extern inline uint64 ObjectArray = 0;
extern inline uint64 InitListen = 0;
extern inline uint64 CreateNetDriver = 0;
extern inline uint64 SetWorld = 0;
extern inline uint64 ProcessEvent = 0;
extern inline uint64 PickupDelay = 0;
extern inline uint64 GetMaxTickRate = 0;
extern inline uint64 GetPlayerViewpoint = 0;
extern inline uint64 InitHost = 0;
extern inline uint64 PauseBeaconRequests = 0;
extern inline uint64 SpawnActor = 0;
extern inline uint64 KickPlayer = 0;
extern inline uint64 TickFlush = 0;
extern inline uint64 GetNetMode = 0;
extern inline uint64 Realloc = 0;
extern inline uint64 CollectGarbage = 0;
extern inline uint64 NoMCP = 0;
extern inline uint64 PickTeam = 0;
extern inline uint64 InternalTryActivateAbility = 0;
extern inline uint64 GiveAbility = 0;
extern inline uint64 CantBuild = 0;
extern inline uint64 ReplaceBuildingActor = 0;
void SetupVersion(); // Finds Engine Version
void FindAll();
void Print();
void Init();
}
namespace Offsets
{
extern inline uint64 Func = 0;
extern inline uint64 PropertiesSize = 0;
extern inline uint64 Children = 0;
extern inline uint64 SuperStruct = 0;
extern inline uint64 Offset_Internal = 0;
extern inline uint64 ServerReplicateActors = 0;
void FindAll();
void Print();
}

View File

@@ -0,0 +1,132 @@
#include <Windows.h>
#include <iostream>
#include "FortGameModeAthena.h"
#include "reboot.h"
#include "finder.h"
#include "hooking.h"
#include "GameSession.h"
#include "FortPlayerControllerAthena.h"
#include "AbilitySystemComponent.h"
enum ENetMode
{
NM_Standalone,
NM_DedicatedServer,
NM_ListenServer,
NM_Client,
NM_MAX,
};
static ENetMode GetNetModeHook() { /* std::cout << "AA!\n"; */ return ENetMode::NM_DedicatedServer; }
static void NoMCPHook() { return; }
static void CollectGarbageHook() { return; }
DWORD WINAPI Main(LPVOID)
{
InitLogger();
std::cin.tie(0);
std::cout.tie(0);
std::ios_base::sync_with_stdio(false);
auto MH_InitCode = MH_Initialize();
if (MH_InitCode != MH_OK)
{
LOG_ERROR(LogInit, "Failed to initialize MinHook {}!", MH_StatusToString(MH_InitCode));
return 1;
}
LOG_INFO(LogInit, "Initializing Project Reboot!");
Addresses::SetupVersion();
Offsets::FindAll(); // We have to do this before because FindCantBuild uses FortAIController.CreateBuildingActor
Offsets::Print();
Addresses::FindAll();
Addresses::Print();
Addresses::Init();
static auto GameModeDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortGameModeAthena");
static auto FortPlayerControllerAthenaDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortPlayerControllerAthena");
static auto FortAbilitySystemComponentAthenaDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortAbilitySystemComponentAthena");
static auto SwitchLevel = FindObject<UFunction>(L"/Script/Engine.PlayerController.SwitchLevel");
FString Level = Engine_Version < 424 ? L"Athena_Terrain" : Engine_Version >= 500 ? Engine_Version >= 501 ? L"Asteria_Terrain" : L"Artemis_Terrain" : L"Apollo_Terrain";
// if (Hooking::MinHook::Hook((PVOID)Addresses::NoMCP, (PVOID)NoMCPHook, nullptr))
{
LOG_INFO(LogHook, "Hooking GetNetMode!");
Hooking::MinHook::Hook((PVOID)Addresses::GetNetMode, (PVOID)GetNetModeHook, nullptr);
}
GetLocalPlayerController()->ProcessEvent(SwitchLevel, &Level);
auto& LocalPlayers = GetLocalPlayers();
if (LocalPlayers.Num() && LocalPlayers.Data)
{
LocalPlayers.Remove(0);
}
Hooking::MinHook::Hook(GameModeDefault, FindObject<UFunction>(L"/Script/Engine.GameMode.ReadyToStartMatch"), AFortGameModeAthena::Athena_ReadyToStartMatchHook,
(PVOID*)&AFortGameModeAthena::Athena_ReadyToStartMatchOriginal, false);
Hooking::MinHook::Hook(GameModeDefault, FindObject<UFunction>(L"/Script/Engine.GameModeBase.SpawnDefaultPawnFor"),
AGameModeBase::SpawnDefaultPawnForHook, nullptr, false);
Hooking::MinHook::Hook(GameModeDefault, FindObject<UFunction>(L"/Script/Engine.GameModeBase.HandleStartingNewPlayer"), AFortGameModeAthena::Athena_HandleStartingNewPlayerHook,
(PVOID*)&AFortGameModeAthena::Athena_HandleStartingNewPlayerOriginal, false);
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerExecuteInventoryItem"),
AFortPlayerController::ServerExecuteInventoryItemHook, nullptr, false);
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortPlayerController.ServerCreateBuildingActor"),
AFortPlayerController::ServerCreateBuildingActorHook, nullptr, false);
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>("/Script/FortniteGame.FortPlayerController.ServerBeginEditingBuildingActor"),
AFortPlayerController::ServerBeginEditingBuildingActorHook, nullptr, false);
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>("/Script/FortniteGame.FortPlayerController.ServerEditBuildingActor"),
AFortPlayerController::ServerEditBuildingActorHook, nullptr, false);
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>("/Script/FortniteGame.FortPlayerController.ServerEndEditingBuildingActor"),
AFortPlayerController::ServerEndEditingBuildingActorHook, nullptr, false);
Hooking::MinHook::Hook(FortPlayerControllerAthenaDefault, FindObject<UFunction>(L"/Script/Engine.PlayerController.ServerAcknowledgePossession"),
AFortPlayerControllerAthena::ServerAcknowledgePossessionHook, nullptr, false);
Hooking::MinHook::Hook(FortAbilitySystemComponentAthenaDefault, FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ServerTryActivateAbility"),
UAbilitySystemComponent::ServerTryActivateAbilityHook, nullptr, false);
Hooking::MinHook::Hook(FortAbilitySystemComponentAthenaDefault, FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ServerTryActivateAbilityWithEventData"),
UAbilitySystemComponent::ServerTryActivateAbilityWithEventDataHook, nullptr, false);
Hooking::MinHook::Hook(FortAbilitySystemComponentAthenaDefault, FindObject<UFunction>(L"/Script/GameplayAbilities.AbilitySystemComponent.ServerAbilityRPCBatch"),
UAbilitySystemComponent::ServerAbilityRPCBatchHook, nullptr, false);
if (Engine_Version >= 424)
{
static auto FortControllerComponent_AircraftDefault = FindObject<UClass>(L"/Script/FortniteGame.Default__FortControllerComponent_Aircraft");
Hooking::MinHook::Hook(FortControllerComponent_AircraftDefault, FindObject<UFunction>(L"/Script/FortniteGame.FortControllerComponent_Aircraft.ServerAttemptAircraftJump"),
AFortPlayerController::ServerAttemptAircraftJumpHook, nullptr, false);
}
Hooking::MinHook::Hook((PVOID)Addresses::KickPlayer, (PVOID)AGameSession::KickPlayerHook, (PVOID*)&AGameSession::KickPlayerOriginal);
Hooking::MinHook::Hook((PVOID)Addresses::TickFlush, (PVOID)UNetDriver::TickFlushHook, (PVOID*)&UNetDriver::TickFlushOriginal);
Hooking::MinHook::Hook((PVOID)Addresses::CollectGarbage, (PVOID)CollectGarbageHook, nullptr);
Hooking::MinHook::Hook((PVOID)Addresses::PickTeam, (PVOID)AFortGameModeAthena::Athena_PickTeamHook, nullptr);
srand(time(0));
return 0;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason)
{
case DLL_PROCESS_ATTACH:
CreateThread(0, 0, Main, 0, 0, 0);
break;
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

213
Project Reboot 3.0/finder.h Normal file
View File

@@ -0,0 +1,213 @@
#pragma once
#include "memcury.h"
#include "inc.h"
#include "hooking.h"
static inline uintptr_t FindBytes(Memcury::Scanner& Scanner, const std::vector<uint8_t>& Bytes, int Count = 255, int SkipBytes = 0, bool bGoUp = false, int Skip = 0, const bool bPrint = false)
{
if (!Scanner.Get())
{
return 0;
}
for (int i = 0 + SkipBytes; i < Count + SkipBytes; i++) // we should subtract from skip if goup
{
auto CurrentByte = *(Memcury::ASM::MNEMONIC*)(bGoUp ? Scanner.Get() - i : Scanner.Get() + i);
// if (bPrint)
// std::cout << "CurrentByte: " << std::hex << (int)CurrentByte << '\n';
if (CurrentByte == Bytes[0])
{
bool Found = true;
for (int j = 1; j < Bytes.size(); j++)
{
if (*(Memcury::ASM::MNEMONIC*)(bGoUp ? Scanner.Get() - i + j : Scanner.Get() + i + j) != Bytes[j])
{
Found = false;
break;
}
}
if (Found)
{
if (Skip > 0)
{
Skip--;
continue;
}
return bGoUp ? Scanner.Get() - i : Scanner.Get() + i;
}
}
// std::cout << std::format("CurrentByte: 0x{:x}\n", (uint8_t)CurrentByte);
}
return -1;// Scanner.Get();
}
static inline uint64 FindStaticFindObject()
{
auto Addr = Memcury::Scanner::FindStringRef(L"Illegal call to StaticFindObject() while serializing object data!");
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 255, 0, true); // Addr.ScanFor(bytes, false).Get();
}
static inline uint64 FindProcessEvent()
{
auto Addr = Memcury::Scanner::FindStringRef(L"AccessNoneNoContext");
return FindBytes(Addr, { 0x40, 0x55 }, 2000); // Addr.ScanFor({ 0x40, 0x55 }).Get();
}
static inline uint64 FindObjectArray()
{
}
static inline uint64 FindCreateNetDriver()
{
return 0;
}
static inline uint64 FindKickPlayer()
{
// return Memcury::Scanner::FindPattern("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC ? 49 8B F0 48 8B DA 48 85 D2").Get(); // 12.41
auto Addr = Memcury::Scanner::FindStringRef(L"Validation Failure: %s. kicking %s", false);
if (Addr.Get())
{
return FindBytes(Addr, { 0x40, 0x55 }, 2000, 0, true);
}
auto Addr2 = Memcury::Scanner::FindStringRef(L"KickPlayer %s Reason %s");
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true);
}
static inline uint64 FindInitHost()
{
auto Addr = Memcury::Scanner::FindStringRef(L"BeaconPort=");
return FindBytes(Addr, { 0x48, 0x8B, 0xC4 }, 1000, 0, true);
}
static inline uint64 FindPauseBeaconRequests()
{
auto Addr = Memcury::Scanner::FindStringRef(L"All Beacon Requests Resumed.");
return FindBytes(Addr, { 0x40, 0x53 }, 1000, 0, true);
}
static inline uint64 FindGetPlayerViewpoint()
{
auto Addr = Memcury::Scanner::FindStringRef(L"APlayerController::GetPlayerViewPoint: out_Location, ViewTarget=%s");
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true);
}
static inline uint64 FindSpawnActor()
{
auto Addr = Memcury::Scanner::FindStringRef(L"SpawnActor failed because no class was specified");
return FindBytes(Addr, { 0x4C, 0x8B, 0xDC }, 3000, 0, true);
}
static inline uint64 FindSetWorld()
{
return Memcury::Scanner::FindStringRef(L"AOnlineBeaconHost::InitHost failed")
.ScanFor({ 0x48, 0x8B, 0xD0, 0xE8 }, false)
.RelativeOffset(4)
.Get(); // THANKS ENDER
// return Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 55 57 41 56 48 8B EC 48 83 EC 30 48 8B 99").Get(); // s12 i think
return Memcury::Scanner::FindPattern("48 89 5C 24 ? 48 89 74 24 ? 57 48 83 EC 20 48 8B 99 ? ? ? ? 48 8B F2 48 8B F9 48 85 DB 0F 84 ? ? ? ? 48 8B 97").Get();
}
static inline uint64 FindInitListen()
{
auto Addr = Memcury::Scanner::FindStringRef(L"%s IpNetDriver listening on port %i");
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true, 1);
}
static inline uint64 FindNoMCP()
{
// return (uintptr_t)GetModuleHandleW(0) + 0x1791CF0; // 11.01
return 0;
return (uintptr_t)GetModuleHandleW(0) + 0x161d600;
}
static inline uint64 FindCollectGarbage()
{
auto Addr = Memcury::Scanner::FindStringRef(L"STAT_CollectGarbageInternal");
return FindBytes(Addr, { 0x48, 0x89, 0x5C }, 2000, 0, true, 1);
}
static inline uint64 FindTickFlush()
{
auto Addr = Memcury::Scanner::FindStringRef(L"STAT_NetTickFlush");
return FindBytes(Addr, { 0x4C, 0x8B }, 1000, 0, true);
}
static inline uint64 FindGetNetMode()
{
auto Addr = Memcury::Scanner::FindStringRef(L"PREPHYSBONES");
auto BeginningFunction = Memcury::Scanner(FindBytes(Addr, { 0x40, 0x55 }, 1000, 0, true));
auto CallToFunc = Memcury::Scanner(FindBytes(BeginningFunction, { 0xE8 }));
return CallToFunc.RelativeOffset(1).Get();
// return (uintptr_t)GetModuleHandleW(0) + 0x34d2140;
}
static inline uint64 FindRealloc()
{
auto Addr = Memcury::Scanner::FindStringRef(L"a.Budget.BudgetMs");
auto BeginningFunction = Memcury::Scanner(FindBytes(Addr, { 0x40, 0x53 }, 1000, 0, true));
auto CallToFunc = Memcury::Scanner(FindBytes(BeginningFunction, { 0xE8 }));
return CallToFunc.RelativeOffset(1).Get();
// return Memcury::Scanner::FindPattern("48 89 5C 24 08 48 89 74 24 10 57 48 83 EC ? 48 8B F1 41 8B D8 48 8B 0D ? ? ? ?").Get();
}
static inline uint64 FindPickTeam()
{
auto Addr = Memcury::Scanner::FindStringRef(L"PickTeam for [%s] used beacon value [%d]");
return FindBytes(Addr, { 0x40, 0x55 }, 1000, 0, true);
}
static inline uint64 FindInternalTryActivateAbility()
{
auto Addr = Memcury::Scanner::FindStringRef(L"InternalTryActivateAbility called with invalid Handle! ASC: %s. AvatarActor: %s");
return FindBytes(Addr, { 0x4C, 0x89, 0x4C }, 1000, 0, true);
}
static inline uint64 FindGiveAbility()
{
auto Addr = Memcury::Scanner::FindStringRef(L"GiveAbilityAndActivateOnce called on ability %s on the client, not allowed!");
auto /* callToGiveAbility */ realGiveAbility = Memcury::Scanner(FindBytes(Addr, { 0xE8 }, 1000, 0)).RelativeOffset(1).Get();
// auto realGiveAbility = ((callToGiveAbility + 1 + 4) + *(int*)(callToGiveAbility + 1));
return realGiveAbility;
}
static inline uint64 FindCantBuild()
{
return Memcury::Scanner::FindPattern("48 89 5C 24 10 48 89 6C 24 18 48 89 74 24 20 41 56 48 83 EC ? 49 8B E9 4D 8B F0").Get();
auto CreateBuildingActorAddr = Memcury::Scanner(GetFunctionIdxOrPtr(FindObject<UFunction>("/Script/FortniteGame.FortAIController.CreateBuildingActor")));
auto LikeHuh = Memcury::Scanner(FindBytes(CreateBuildingActorAddr, { 0x40, 0x88 }, 3000));
auto callaa = Memcury::Scanner(FindBytes(LikeHuh, { 0xE8 }));
return callaa.RelativeOffset(1).Get();
}
static inline uint64 FindReplaceBuildingActor()
{
auto StringRef = Memcury::Scanner::FindStringRef(L"STAT_Fort_BuildingSMActorReplaceBuildingActor");
if (!StringRef.Get()) // we are on a version where stats dont exist
{
// todo hardcode sigs
return 0;
}
return FindBytes(StringRef, { 0x4C, 0x8B }, 1000, 0, true);
}

View File

@@ -0,0 +1,239 @@
#pragma once
#include <functional>
#include <MinHook/MinHook.h>
#include "memcury.h"
#include "Class.h"
inline __int64 GetFunctionIdxOrPtr2(UFunction* Function)
{
auto NativeAddr = __int64(Function->GetFunc());
auto FuncName = Function->GetName();
std::cout << std::format("{} Exec: 0x{:x}\n", Function->GetName(), NativeAddr - __int64(GetModuleHandleW(0)));
std::wstring ValidateWStr = (std::wstring(FuncName.begin(), FuncName.end()) + L"_Validate");
const wchar_t* ValidateWCStr = ValidateWStr.c_str();
bool bHasValidateFunc = Memcury::Scanner::FindStringRef(ValidateWCStr, false).Get();
bool bFoundValidate = !bHasValidateFunc;
__int64 RetAddr = 0;
for (int i = 0; i < 2000; i++)
{
// std::cout << std::format("CURRENT 0x{:x}\n", __int64((uint8_t*)(NativeAddr + i)) - __int64(GetModuleHandleW(0)));
if (!RetAddr && *(uint8_t*)(NativeAddr + i) == 0xC3)
{
RetAddr = NativeAddr + i;
break;
}
}
std::cout << std::format("RETT {}: 0x{:x}\n", Function->GetName(), RetAddr - __int64(GetModuleHandleW(0)));
int i = 0;
__int64 functionAddyOrOffset = 0;
for (__int64 CurrentAddy = RetAddr; CurrentAddy != NativeAddr && i < 2000; CurrentAddy -= 1) // Find last call
{
// LOG_INFO(LogDev, "[{}] 0x{:x}", i, *(uint8_t*)CurrentAddy);
/* if (*(uint8_t*)CurrentAddy == 0xE8) // BAD
{
// LOG_INFO(LogDev, "CurrentAddy 0x{:x}", CurrentAddy - __int64(GetModuleHandleW(0)));
functionAddyOrOffset = (CurrentAddy + 1 + 4) + *(int*)(CurrentAddy + 1);
break;
}
else */ if ((*(uint8_t*)(CurrentAddy) == 0xFF && *(uint8_t*)(CurrentAddy + 1) == 0x90) ||
*(uint8_t*)(CurrentAddy) == 0xFF && *(uint8_t*)(CurrentAddy + 1) == 0x93)
{
std::cout << "found vcall!\n";
auto SecondByte = *(uint8_t*)(CurrentAddy + 2);
auto ThirdByte = *(uint8_t*)(CurrentAddy + 3);
std::string bytes = GetBytes(CurrentAddy + 2, 2);
std::string last2bytes;
last2bytes += bytes[3];
last2bytes += bytes[4];
std::string neww;
if (last2bytes != "00")
neww = last2bytes;
neww += bytes[0];
neww += bytes[1];
bytes = neww;
functionAddyOrOffset = HexToDec(bytes);
break;
}
i++;
}
std::cout << "FOUND: " << functionAddyOrOffset << '\n';
return functionAddyOrOffset;
}
inline __int64 GetFunctionIdxOrPtr(UFunction* Function)
{
auto NativeAddr = __int64(Function->GetFunc());
std::cout << std::format("{} Exec: 0x{:x}\n", Function->GetName(), NativeAddr - __int64(GetModuleHandleW(0)));
auto FuncName = Function->GetName();
std::wstring ValidateWStr = (std::wstring(FuncName.begin(), FuncName.end()) + L"_Validate");
const wchar_t* ValidateWCStr = ValidateWStr.c_str();
bool bHasValidateFunc = Memcury::Scanner::FindStringRef(ValidateWCStr, false).Get();
// LOG_INFO(LogDev, "[{}] bHasValidateFunc: {}", Function->GetName(), bHasValidateFunc);
// LOG_INFO(LogDev, "NativeAddr: 0x{:x}", __int64(NativeAddr) - __int64(GetModuleHandleW(0)));
bool bFoundValidate = !bHasValidateFunc;
__int64 RetAddr = 0;
for (int i = 0; i < 2000; i++)
{
// LOG_INFO(LogDev, "0x{:x}", *(uint8_t*)(NativeAddr + i));
if ((*(uint8_t*)(NativeAddr + i) == 0xFF && *(uint8_t*)(NativeAddr + i + 1) == 0x90) ||
*(uint8_t*)(NativeAddr + i) == 0xFF && *(uint8_t*)(NativeAddr + i + 1) == 0x93)
{
if (bFoundValidate)
{
std::string wtf = "";
int shots = 0;
bool bFoundFirstNumber = false;
for (__int64 z = (NativeAddr + i + 5); z != (NativeAddr + i + 1); z -= 1)
{
auto anafa = (int)(*(uint8_t*)z);
auto asfk = anafa < 10 ? "0" + std::format("{:x}", anafa) : std::format("{:x}", anafa);
// std::cout << std::format("[{}] 0x{}\n", shots, asfk);
if (*(uint8_t*)z == 0 ? bFoundFirstNumber : true)
{
wtf += asfk;
bFoundFirstNumber = true;
}
shots++;
}
std::transform(wtf.begin(), wtf.end(), wtf.begin(), ::toupper);
// std::cout << "wtf: " << wtf << '\n';
return HexToDec(wtf);
}
else
{
bFoundValidate = true;
continue;
}
}
if (!RetAddr && *(uint8_t*)(NativeAddr + i) == 0xC3)
{
RetAddr = NativeAddr + i;
// break;
}
}
// The function isn't virtual
__int64 functionAddy = 0;
if (RetAddr)
{
// LOG_INFO(LogDev, "RetAddr 0x{:x}", RetAddr - __int64(GetModuleHandleW(0)));
int i = 0;
for (__int64 CurrentAddy = RetAddr; CurrentAddy != NativeAddr && i < 2000; CurrentAddy -= 1) // Find last call
{
// LOG_INFO(LogDev, "[{}] 0x{:x}", i, *(uint8_t*)CurrentAddy);
if (*(uint8_t*)CurrentAddy == 0xE8)
{
// LOG_INFO(LogDev, "CurrentAddy 0x{:x}", CurrentAddy - __int64(GetModuleHandleW(0)));
functionAddy = (CurrentAddy + 1 + 4) + *(int*)(CurrentAddy + 1);
break;
}
i++;
}
}
return !functionAddy ? -1 : functionAddy;
}
namespace Hooking
{
namespace MinHook
{
static bool Hook(void* Addr, void* Detour, void** Original = nullptr)
{
auto ret1 = MH_CreateHook(Addr, Detour, Original);
auto ret2 = MH_EnableHook(Addr);
return ret1 == MH_OK && ret2 == MH_OK;
}
static bool Hook(UObject* DefaultClass, UFunction* Function, void* Detour, void** Original = nullptr, bool bUseSecondMethod = true, bool bHookExec = false) // Native hook
{
auto Exec = Function->GetFunc();
if (bHookExec)
return Hook(Exec, Detour, Original);
auto AddrOrIdx = bUseSecondMethod ? GetFunctionIdxOrPtr2(Function) : GetFunctionIdxOrPtr(Function);
if (AddrOrIdx == -1)
{
LOG_ERROR(LogInit, "Failed to find anything for {}.", Function->GetName());
return false;
}
if (IsBadReadPtr((void*)AddrOrIdx))
{
auto Idx = AddrOrIdx / 8;
if (Original)
*Original = DefaultClass->VFTable[Idx];
VirtualSwap(DefaultClass->VFTable, Idx, Detour);
return true;
}
return Hook((PVOID)AddrOrIdx, Detour, Original);
}
static bool Unhook(void* Addr)
{
return MH_DisableHook((PVOID)Addr) == MH_OK;
}
}
static bool Hook(UFunction* Function, std::function<void(UObject*, void*)> Detour) // ProcessEvent hook
{
return true;
}
}

19
Project Reboot 3.0/inc.h Normal file
View File

@@ -0,0 +1,19 @@
#pragma once
#include <Windows.h>
#include <iostream>
#include <format>
#include <string>
typedef unsigned short uint16;
typedef unsigned char uint8;
typedef int int32;
typedef __int64 int64;
typedef unsigned int uint32;
typedef unsigned __int64 uint64;
extern inline int Engine_Version = 0; // For example, 420, 421, etc. // Prevent using this when possible.
extern inline double Fortnite_Version = 0; // For example, 4.1, 6.21, etc. // Prevent using this when possible.
#define MS_ALIGN(n) __declspec(align(n))
#define FORCENOINLINE __declspec(noinline)

85
Project Reboot 3.0/log.h Normal file
View File

@@ -0,0 +1,85 @@
#pragma once
#include <iostream>
#include <format>
// #define Log(...) std::cout << std::format(__VA_ARGS__) << '\n';
#include <vector>
#include <spdlog/spdlog.h>
#include <spdlog/sinks/basic_file_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include <filesystem>
static inline std::vector<spdlog::sink_ptr> sinks;
enum ELogLevel : uint8_t
{
Trace,
Debug,
Info,
Warning,
Error,
Critical,
Disabled,
All = Trace
};
inline void MakeLogger(const std::string& LoggerName)
{
auto logger = std::make_shared<spdlog::logger>(LoggerName, sinks.begin(), sinks.end());
spdlog::register_logger(logger);
logger->set_level(spdlog::level::level_enum::info);
logger->flush_on(spdlog::level::level_enum::info);
}
inline void InitLogger()
{
// FreeConsole();
AllocConsole();
// AttachConsole(ATTACH_PARENT_PROCESS);
FILE* stream = nullptr;
// bad but idk how to stop printing
freopen_s(&stream, "in.txt", "r", stdin);
freopen_s(&stream, "out.txt", "w+", stdout);
freopen_s(&stream, "err.txt", "w", stderr);
SetConsoleTitleA("Project Reboot 3.0");
std::string logName = "reboot.log"; // GenerateLogFileName();
sinks.emplace_back(std::make_shared<spdlog::sinks::stdout_color_sink_mt>())->set_pattern("[%D-%T] %n: %^%v%$");
sinks.emplace_back(std::make_shared<spdlog::sinks::basic_file_sink_mt>(logName, true))->set_pattern("[%D-%T] %n: %l: %v");
MakeLogger("LogMemory");
MakeLogger("LogFinder");
MakeLogger("LogInit");
MakeLogger("LogNet");
MakeLogger("LogDev");
MakeLogger("LogPlayer");
MakeLogger("LogLoot");
MakeLogger("LogLoading");
MakeLogger("LogHook");
MakeLogger("LogAbilities");
}
#define LOG_DEBUG(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->debug(std::format(__VA_ARGS__));
#define LOG_INFO(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->info(std::format(__VA_ARGS__));
#define LOG_WARN(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->warn(std::format(__VA_ARGS__));
#define LOG_ERROR(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->error(std::format(__VA_ARGS__));
#define LOG_FATAL(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->critical(std::format(__VA_ARGS__));

241
Project Reboot 3.0/reboot.h Normal file
View File

@@ -0,0 +1,241 @@
#pragma once
#include "UObjectGlobals.h"
#include "Engine.h"
// #include "World.h"
#include "Class.h"
/* enum class REBOOT_ERROR : uint8
{
FAILED_STRINGREF = 1,
FAILED_CREATE_NETDRIVER = 2,
FAILED_LISTEN = 3
}; */
template <typename T = UObject>
static inline T* FindObject(const TCHAR* Name, UClass* Class = nullptr)
{
return StaticFindObject<T>(Class, nullptr, Name);
}
template <typename T = UObject>
static inline T* FindObject(const std::string& NameStr, UClass* Class = nullptr)
{
auto NameCWSTR = std::wstring(NameStr.begin(), NameStr.end()).c_str();
return StaticFindObject<T>(Class, nullptr, NameCWSTR);
}
static inline UEngine* GetEngine()
{
static UEngine* Engine = FindObject<UEngine>(L"/Engine/Transient.FortEngine_0");
if (!Engine)
{
__int64 starting = 2147482000;
for (__int64 i = starting; i < (starting + 1000); i++)
{
if (Engine = FindObject<UEngine>("/Engine/Transient.FortEngine_" + std::to_string(i)))
break;
}
}
return Engine;
}
static inline class UWorld* GetWorld()
{
static UObject* Engine = GetEngine();
static auto GameViewportOffset = Engine->GetOffset("GameViewport");
auto GameViewport = Engine->Get<UObject*>(GameViewportOffset);
static auto WorldOffset = GameViewport->GetOffset("World");
return GameViewport->Get<class UWorld*>(WorldOffset);
}
static TArray<UObject*>& GetLocalPlayers()
{
static UObject* Engine = GetEngine();
static auto GameInstanceOffset = Engine->GetOffset("GameInstance");
UObject* GameInstance = Engine->Get(GameInstanceOffset);
static auto LocalPlayersOffset = GameInstance->GetOffset("LocalPlayers");
return GameInstance->Get<TArray<UObject*>>(LocalPlayersOffset);
}
static UObject* GetLocalPlayer()
{
auto& LocalPlayers = GetLocalPlayers();
return LocalPlayers.Num() ? LocalPlayers.At(0) : nullptr;
}
static inline UObject* GetLocalPlayerController()
{
auto LocalPlayer = GetLocalPlayer();
if (!LocalPlayer)
return nullptr;
static auto PlayerControllerOffset = LocalPlayer->GetOffset("PlayerController");
return LocalPlayer->Get(PlayerControllerOffset);
}
template <typename T>
static __forceinline T* Cast(UObject* Object, bool bCheckType = true)
{
if (bCheckType)
{
if (Object && Object->IsA(T::StaticClass()))
{
return (T*)Object;
}
}
else
{
return (T*)Object;
}
return nullptr;
}
static inline int AmountOfRestarts = 0;
struct PlaceholderBitfield
{
uint8_t First : 1;
uint8_t Second : 1;
uint8_t Third : 1;
uint8_t Fourth : 1;
uint8_t Fifth : 1;
uint8_t Sixth : 1;
uint8_t Seventh : 1;
uint8_t Eighth : 1;
};
inline bool ReadBitfield(void* Addr, uint8_t FieldMask)
{
auto Bitfield = (PlaceholderBitfield*)Addr;
// niceeeee
if (FieldMask == 0x1)
return Bitfield->First;
else if (FieldMask == 0x2)
return Bitfield->Second;
else if (FieldMask == 0x4)
return Bitfield->Third;
else if (FieldMask == 0x8)
return Bitfield->Fourth;
else if (FieldMask == 0x10)
return Bitfield->Fifth;
else if (FieldMask == 0x20)
return Bitfield->Sixth;
else if (FieldMask == 0x40)
return Bitfield->Seventh;
else if (FieldMask == 0x80)
return Bitfield->Eighth;
else if (FieldMask == 0xFF)
return *(bool*)Bitfield;
return false;
}
inline void SetBitfield(void* Addr, uint8_t FieldMask, bool NewVal)
{
auto Bitfield = (PlaceholderBitfield*)Addr;
// niceeeee
if (FieldMask == 0x1)
Bitfield->First = NewVal;
else if (FieldMask == 0x2)
Bitfield->Second = NewVal;
else if (FieldMask == 0x4)
Bitfield->Third = NewVal;
else if (FieldMask == 0x8)
Bitfield->Fourth = NewVal;
else if (FieldMask == 0x10)
Bitfield->Fifth = NewVal;
else if (FieldMask == 0x20)
Bitfield->Sixth = NewVal;
else if (FieldMask == 0x40)
Bitfield->Seventh = NewVal;
else if (FieldMask == 0x80)
Bitfield->Eighth = NewVal;
else if (FieldMask == 0xFF)
*(bool*)Bitfield = NewVal;
}
inline int FindOffsetStruct(const std::string& StructName, const std::string& MemberName)
{
UObject* Struct = FindObject(StructName);
if (!Struct)
{
LOG_WARN(LogFinder, "Unable to find struct {}", StructName);
return 0;
}
// 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();
if (PropName == MemberName)
{
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
}
while (Property)
{
// LOG_INFO(LogFinder, "PropName: {}", PropName);
if (PropName == MemberName)
{
return *(int*)(__int64(Property) + Offsets::Offset_Internal);
}
Property = Engine_Version >= 425 ? *(void**)(__int64(Property) + 0x20) : ((UField*)Property)->Next;
PropName = Property ? getFNameOfProp(Property)->ToString() : "";
}
}
}
LOG_WARN(LogFinder, "Unable to find1{}", MemberName);
return 0;
}
static void CopyStruct(void* Dest, void* Src, size_t Size)
{
memcpy_s(Dest, Size, Src, Size);
}
template <typename T = __int64>
static T* Alloc(size_t Size)
{
return (T*)VirtualAlloc(0, Size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# Project Reboot 3.0
SKIDBOOT

186
vendor/MinHook/MinHook.h vendored Normal file
View File

@@ -0,0 +1,186 @@
/*
* MinHook - The Minimalistic API Hooking Library for x64/x86
* Copyright (C) 2009-2017 Tsuda Kageyu.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#if !(defined _M_IX86) && !(defined _M_X64) && !(defined __i386__) && !(defined __x86_64__)
#error MinHook supports only x86 and x64 systems.
#endif
#include <windows.h>
// MinHook Error Codes.
typedef enum MH_STATUS
{
// Unknown error. Should not be returned.
MH_UNKNOWN = -1,
// Successful.
MH_OK = 0,
// MinHook is already initialized.
MH_ERROR_ALREADY_INITIALIZED,
// MinHook is not initialized yet, or already uninitialized.
MH_ERROR_NOT_INITIALIZED,
// The hook for the specified target function is already created.
MH_ERROR_ALREADY_CREATED,
// The hook for the specified target function is not created yet.
MH_ERROR_NOT_CREATED,
// The hook for the specified target function is already enabled.
MH_ERROR_ENABLED,
// The hook for the specified target function is not enabled yet, or already
// disabled.
MH_ERROR_DISABLED,
// The specified pointer is invalid. It points the address of non-allocated
// and/or non-executable region.
MH_ERROR_NOT_EXECUTABLE,
// The specified target function cannot be hooked.
MH_ERROR_UNSUPPORTED_FUNCTION,
// Failed to allocate memory.
MH_ERROR_MEMORY_ALLOC,
// Failed to change the memory protection.
MH_ERROR_MEMORY_PROTECT,
// The specified module is not loaded.
MH_ERROR_MODULE_NOT_FOUND,
// The specified function is not found.
MH_ERROR_FUNCTION_NOT_FOUND
}
MH_STATUS;
// Can be passed as a parameter to MH_EnableHook, MH_DisableHook,
// MH_QueueEnableHook or MH_QueueDisableHook.
#define MH_ALL_HOOKS NULL
#ifdef __cplusplus
extern "C" {
#endif
// Initialize the MinHook library. You must call this function EXACTLY ONCE
// at the beginning of your program.
MH_STATUS WINAPI MH_Initialize(VOID);
// Uninitialize the MinHook library. You must call this function EXACTLY
// ONCE at the end of your program.
MH_STATUS WINAPI MH_Uninitialize(VOID);
// Creates a Hook for the specified target function, in disabled state.
// Parameters:
// pTarget [in] A pointer to the target function, which will be
// overridden by the detour function.
// pDetour [in] A pointer to the detour function, which will override
// the target function.
// ppOriginal [out] A pointer to the trampoline function, which will be
// used to call the original target function.
// This parameter can be NULL.
MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID *ppOriginal);
// Creates a Hook for the specified API function, in disabled state.
// Parameters:
// pszModule [in] A pointer to the loaded module name which contains the
// target function.
// pszTarget [in] A pointer to the target function name, which will be
// overridden by the detour function.
// pDetour [in] A pointer to the detour function, which will override
// the target function.
// ppOriginal [out] A pointer to the trampoline function, which will be
// used to call the original target function.
// This parameter can be NULL.
MH_STATUS WINAPI MH_CreateHookApi(
LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal);
// Creates a Hook for the specified API function, in disabled state.
// Parameters:
// pszModule [in] A pointer to the loaded module name which contains the
// target function.
// pszTarget [in] A pointer to the target function name, which will be
// overridden by the detour function.
// pDetour [in] A pointer to the detour function, which will override
// the target function.
// ppOriginal [out] A pointer to the trampoline function, which will be
// used to call the original target function.
// This parameter can be NULL.
// ppTarget [out] A pointer to the target function, which will be used
// with other functions.
// This parameter can be NULL.
MH_STATUS WINAPI MH_CreateHookApiEx(
LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal, LPVOID *ppTarget);
// Removes an already created hook.
// Parameters:
// pTarget [in] A pointer to the target function.
MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget);
// Enables an already created hook.
// Parameters:
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// enabled in one go.
MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget);
// Disables an already created hook.
// Parameters:
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// disabled in one go.
MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget);
// Queues to enable an already created hook.
// Parameters:
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// queued to be enabled.
MH_STATUS WINAPI MH_QueueEnableHook(LPVOID pTarget);
// Queues to disable an already created hook.
// Parameters:
// pTarget [in] A pointer to the target function.
// If this parameter is MH_ALL_HOOKS, all created hooks are
// queued to be disabled.
MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget);
// Applies all queued changes in one go.
MH_STATUS WINAPI MH_ApplyQueued(VOID);
// Translates the MH_STATUS to its name as a string.
const char * WINAPI MH_StatusToString(MH_STATUS status);
#ifdef __cplusplus
}
#endif

BIN
vendor/MinHook/minhook.x64.lib vendored Normal file

Binary file not shown.

1301
vendor/memcury.h vendored Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More