mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
84 lines
2.7 KiB
C++
84 lines
2.7 KiB
C++
#pragma once
|
|
|
|
#include "FortPlayerController.h"
|
|
#include "FortPlayerStateAthena.h"
|
|
#include "FortPlayerPawn.h"
|
|
#include "SoftObjectPtr.h"
|
|
#include "FortKismetLibrary.h"
|
|
#include "AthenaMarkerComponent.h"
|
|
|
|
static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
|
|
{
|
|
if (!CID)
|
|
return;
|
|
|
|
static auto HeroDefinitionOffset = CID->GetOffset("HeroDefinition");
|
|
auto HeroDefinition = CID->Get(HeroDefinitionOffset);
|
|
|
|
using UFortHeroSpecialization = UObject;
|
|
|
|
static auto SpecializationsOffset = HeroDefinition->GetOffset("Specializations");
|
|
auto& Specializations = HeroDefinition->Get<TArray<TSoftObjectPtr<UFortHeroSpecialization>>>(SpecializationsOffset);
|
|
|
|
auto PlayerState = Pawn->GetPlayerState();
|
|
|
|
for (int i = 0; i < Specializations.Num(); i++)
|
|
{
|
|
auto& SpecializationSoft = Specializations.at(i);
|
|
|
|
auto Specialization = SpecializationSoft.Get();
|
|
|
|
if (Specialization)
|
|
{
|
|
static auto Specialization_CharacterPartsOffset = Specialization->GetOffset("CharacterParts");
|
|
auto& CharacterParts = Specialization->Get<TArray<TSoftObjectPtr<UObject>>>(Specialization_CharacterPartsOffset);
|
|
|
|
bool aa;
|
|
|
|
TArray<UObject*> CharacterPartsaa;
|
|
|
|
for (int z = 0; z < CharacterParts.Num(); z++)
|
|
{
|
|
auto& CharacterPartSoft = CharacterParts.at(z);
|
|
auto CharacterPart = CharacterPartSoft.Get();
|
|
|
|
CharacterPartsaa.Add(CharacterPart);
|
|
|
|
continue;
|
|
}
|
|
|
|
UFortKismetLibrary::ApplyCharacterCosmetics(GetWorld(), CharacterPartsaa, PlayerState, &aa);
|
|
CharacterPartsaa.Free();
|
|
}
|
|
}
|
|
}
|
|
|
|
class AFortPlayerControllerAthena : public AFortPlayerController
|
|
{
|
|
public:
|
|
static inline void (*GetPlayerViewPointOriginal)(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation);
|
|
|
|
AFortPlayerStateAthena* GetPlayerStateAthena()
|
|
{
|
|
return (AFortPlayerStateAthena*)GetPlayerState();
|
|
}
|
|
|
|
UAthenaMarkerComponent* GetMarkerComponent()
|
|
{
|
|
static auto MarkerComponentOffset = GetOffset("MarkerComponent");
|
|
return Get<UAthenaMarkerComponent*>(MarkerComponentOffset);
|
|
}
|
|
|
|
static void ServerRestartPlayerHook(AFortPlayerControllerAthena* Controller);
|
|
static void ServerGiveCreativeItemHook(AFortPlayerControllerAthena* Controller, FFortItemEntry CreativeItem);
|
|
static void ServerTeleportToPlaygroundLobbyIslandHook(AFortPlayerControllerAthena* Controller);
|
|
static void ServerAcknowledgePossessionHook(APlayerController* Controller, APawn* Pawn);
|
|
static void ServerPlaySquadQuickChatMessage(AFortPlayerControllerAthena* PlayerController, __int64 ChatEntry, __int64 SenderID);
|
|
static void GetPlayerViewPointHook(AFortPlayerControllerAthena* PlayerController, FVector& Location, FRotator& Rotation);
|
|
|
|
static UClass* StaticClass()
|
|
{
|
|
static auto Class = FindObject<UClass>("/Script/FortniteGame.FortPlayerControllerAthena");
|
|
return Class;
|
|
}
|
|
}; |