<feat: New project structure>

<feat: New release>
This commit is contained in:
Alessandro Autiero
2023-09-02 15:34:15 +02:00
parent 64b33102f4
commit b41e22adeb
953 changed files with 1373072 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
#pragma once
#include "reboot.h"
#include "FortAthenaAIBotCharacterCustomization.h"
class UFortAthenaAIBotCustomizationData : public UObject // UPrimaryDataAsset
{
public:
UFortAthenaAIBotCharacterCustomization*& GetCharacterCustomization()
{
static auto CharacterCustomizationOffset = GetOffset("CharacterCustomization");
return Get<UFortAthenaAIBotCharacterCustomization*>(CharacterCustomizationOffset);
}
static void ApplyOverrideCharacterCustomizationHook(UFortAthenaAIBotCustomizationData* InBotData, AFortPlayerPawn* NewBot, __int64 idk)
{
LOG_INFO(LogDev, "ApplyOverrideCharacterCustomizationHook!");
auto CharacterCustomization = InBotData->GetCharacterCustomization();
auto Controller = NewBot->GetController();
LOG_INFO(LogDev, "Controller: {}", Controller->IsValidLowLevel() ? Controller->GetPathName() : "BadRead");
static auto CosmeticLoadoutBCOffset = Controller->GetOffset("CosmeticLoadoutBC");
Controller->GetPtr<FFortAthenaLoadout>(CosmeticLoadoutBCOffset)->GetCharacter() = CharacterCustomization->GetCustomizationLoadout()->GetCharacter();
auto PlayerStateAsFort = Cast<AFortPlayerState>(Controller->GetPlayerState());
static auto UpdatePlayerCustomCharacterPartsVisualizationFn = FindObject<UFunction>(L"/Script/FortniteGame.FortKismetLibrary.UpdatePlayerCustomCharacterPartsVisualization");
PlayerStateAsFort->ProcessEvent(UpdatePlayerCustomCharacterPartsVisualizationFn, &PlayerStateAsFort);
PlayerStateAsFort->ForceNetUpdate();
NewBot->ForceNetUpdate();
Controller->ForceNetUpdate();
// NewBot->GetCosmeticLoadout()->GetCharacter() = CharacterCustomization->GetCustomizationLoadout()->GetCharacter();
}
static UClass* StaticClass()
{
static auto Class = FindObject<UClass>(L"/Script/FortniteGame.FortAthenaAIBotCustomizationData");
return Class;
}
};