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

@@ -2,6 +2,9 @@
#include "FortPlayerController.h"
#include "FortPickup.h"
#include "FortQuickBars.h"
#include "FortPlayerPawnAthena.h"
#include "FortGameStateAthena.h"
#include "FortGameModeAthena.h"
UFortItem* CreateItemInstance(AFortPlayerController* PlayerController, UFortItemDefinition* ItemDefinition, int Count)
{
@@ -29,6 +32,10 @@ std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddI
LoadedAmmo = 0;
}
// ShouldForceFocusWhenAdded
auto WorldItemDefinition = Cast<UFortWorldItemDefinition>(ItemDefinition);
auto& ItemInstances = GetItemList().GetItemInstances();
auto MaxStackSize = ItemDefinition->GetMaxStackSize();
@@ -159,6 +166,27 @@ std::pair<std::vector<UFortItem*>, std::vector<UFortItem*>> AFortInventory::AddI
}
}
/* if (FortPlayerController && WorldItemDefinition) // Hmm
{
auto Pawn = Cast<AFortPlayerPawnAthena>(FortPlayerController->GetMyFortPawn());
auto GameState = Cast<AFortGameStateAthena>(((AFortGameModeAthena*)GetWorld()->GetGameMode())->GetGameState());
if (Pawn)
{
static auto InventorySpecialActorUniqueIDOffset = WorldItemDefinition->GetOffset("InventorySpecialActorUniqueID");
auto& InventorySpecialActorUniqueID = WorldItemDefinition->Get<FName>(InventorySpecialActorUniqueIDOffset);
static auto ItemSpecialActorIDOffset = Pawn->GetOffset("ItemSpecialActorID");
Pawn->Get<FName>(ItemSpecialActorIDOffset) = InventorySpecialActorUniqueID;
static auto ItemSpecialActorCategoryIDOffset = Pawn->GetOffset("ItemSpecialActorCategoryID");
Pawn->Get<FName>(ItemSpecialActorCategoryIDOffset) = InventorySpecialActorUniqueID;
static auto BecameSpecialActorTimeOffset = Pawn->GetOffset("BecameSpecialActorTime");
Pawn->Get<float>(BecameSpecialActorTimeOffset) = GameState->GetServerWorldTimeSeconds();
}
} */
if (bShouldUpdate)
*bShouldUpdate = true;
}