cheat spawnpickup, teams on >s4, bga spawning, gameplayeffects apply from abilityset
This commit is contained in:
Milxnor
2023-04-08 00:35:54 -04:00
parent 636a084bcb
commit 5f5d7fb649
27 changed files with 712 additions and 125 deletions

View File

@@ -7,11 +7,14 @@
#include "FortKismetLibrary.h"
#include "AthenaMarkerComponent.h"
static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID, bool bUseServerChoosePart = false)
{
if (!CID)
return;
if (!Pawn && bUseServerChoosePart)
return;
static auto HeroDefinitionOffset = CID->GetOffset("HeroDefinition");
auto HeroDefinition = CID->Get(HeroDefinitionOffset);
@@ -34,6 +37,18 @@ static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
static auto Specialization_CharacterPartsOffset = Specialization->GetOffset("CharacterParts");
auto& CharacterParts = Specialization->Get<TArray<TSoftObjectPtr<UObject>>>(Specialization_CharacterPartsOffset);
static auto CustomCharacterPartClass = FindObject<UClass>("/Script/FortniteGame.CustomCharacterPart");
/* if (bUseServerChoosePart)
{
for (int z = 0; z < CharacterParts.Num(); z++)
{
Pawn->ServerChoosePart((EFortCustomPartType)z, CharacterParts.at(z).Get(CustomCharacterPartClass, true));
}
continue; // hm?
} */
bool aa;
TArray<UObject*> CharacterPartsaa;
@@ -41,7 +56,6 @@ static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
for (int z = 0; z < CharacterParts.Num(); z++)
{
auto& CharacterPartSoft = CharacterParts.at(z);
static auto CustomCharacterPartClass = FindObject<UClass>("/Script/FortniteGame.CustomCharacterPart");
auto CharacterPart = CharacterPartSoft.Get(CustomCharacterPartClass, true);
CharacterPartsaa.Add(CharacterPart);
@@ -53,6 +67,9 @@ static void ApplyCID(AFortPlayerPawn* Pawn, UObject* CID)
CharacterPartsaa.Free();
}
}
static auto HeroTypeOffset = PlayerState->GetOffset("HeroType");
// PlayerState->Get(HeroTypeOffset) = HeroDefinition;
}
class AFortPlayerControllerAthena : public AFortPlayerController