mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
level
level showing up on items now, fix s19, improve performance, fix big issue on s5
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#include "FortAthenaSupplyDrop.h"
|
||||
#include "FortGameStateAthena.h"
|
||||
|
||||
FVector AFortAthenaSupplyDrop::FindGroundLocationAt(FVector InLocation)
|
||||
{
|
||||
static auto FindGroundLocationAtFn = FindObject<UFunction>("/Script/FortniteGame.FortAthenaSupplyDrop.FindGroundLocationAt");
|
||||
static auto FindGroundLocationAtFn = FindObject<UFunction>(L"/Script/FortniteGame.FortAthenaSupplyDrop.FindGroundLocationAt");
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -44,12 +45,15 @@ AFortPickup* AFortAthenaSupplyDrop::SpawnGameModePickupHook(UObject* Context, FF
|
||||
|
||||
LOG_INFO(LogDev, "Spawning GameModePickup with ItemDefinition: {}", ItemDefinition->GetFullName());
|
||||
|
||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||
|
||||
PickupCreateData CreateData;
|
||||
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, NumberToSpawn, -1);
|
||||
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, NumberToSpawn, -1, MAX_DURABILITY, ItemDefinition->GetFinalLevel(GameState->GetWorldLevel()));
|
||||
CreateData.SpawnLocation = Position;
|
||||
CreateData.PawnOwner = TriggeringPawn;
|
||||
CreateData.Source = EFortPickupSpawnSource::GetSupplyDropValue();
|
||||
CreateData.OverrideClass = PickupClass;
|
||||
CreateData.bShouldFreeItemEntryWhenDeconstructed = true;
|
||||
|
||||
*Ret = AFortPickup::SpawnPickup(CreateData);
|
||||
return *Ret;
|
||||
@@ -74,8 +78,10 @@ AFortPickup* AFortAthenaSupplyDrop::SpawnPickupHook(UObject* Context, FFrame& St
|
||||
if (!ItemDefinition)
|
||||
return nullptr;
|
||||
|
||||
auto GameState = Cast<AFortGameStateAthena>(GetWorld()->GetGameState());
|
||||
|
||||
PickupCreateData CreateData;
|
||||
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, NumberToSpawn, -1);
|
||||
CreateData.ItemEntry = FFortItemEntry::MakeItemEntry(ItemDefinition, NumberToSpawn, -1, MAX_DURABILITY, ItemDefinition->GetFinalLevel(GameState->GetWorldLevel()));
|
||||
CreateData.SpawnLocation = Position;
|
||||
CreateData.PawnOwner = TriggeringPawn;
|
||||
CreateData.Source = EFortPickupSpawnSource::GetSupplyDropValue();
|
||||
|
||||
Reference in New Issue
Block a user