mirror of
https://github.com/Milxnor/Project-Reboot-3.0.git
synced 2026-01-13 02:42:22 +01:00
aa
This commit is contained in:
@@ -463,9 +463,13 @@ void AFortPlayerController::ServerCreateBuildingActorHook(UObject* Context, FFra
|
||||
|
||||
auto MatDefinition = UFortKismetLibrary::K2_GetResourceItemDefinition(BuildingActor->GetResourceType());
|
||||
auto WorldInventory = PlayerController->GetWorldInventory();
|
||||
|
||||
if (!WorldInventory)
|
||||
return ServerCreateBuildingActorOriginal(Context, Stack, Ret);
|
||||
|
||||
auto MatInstance = WorldInventory->FindItemInstance(MatDefinition);
|
||||
|
||||
bool bShouldDestroy = MatInstance ? PlayerController->DoesBuildFree() ? false : MatInstance->GetItemEntry()->GetCount() < 10 : true;
|
||||
bool bShouldDestroy = MatInstance ? (PlayerController->DoesBuildFree() ? false : MatInstance->GetItemEntry()->GetCount() < 10) : true;
|
||||
|
||||
if (bShouldDestroy)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user