fix reestarting looting

This commit is contained in:
Milxnor
2023-04-16 11:15:10 -04:00
parent 228a06bd62
commit d308c9ad91
7 changed files with 44 additions and 14 deletions

View File

@@ -175,6 +175,11 @@ void AFortPlayerController::ApplyCosmeticLoadout()
UFortKismetLibrary::StaticClass()->ProcessEvent(UpdatePlayerCustomCharacterPartsVisualizationFn, &PlayerStateAsFort);
}
void AFortPlayerController::ServerSetInventoryStateValueHook(AFortPlayerController* PlayerController, FGuid a2, __int64 StateValue)
{
LOG_INFO(LogDev, "ServerSetInventoryStateValueHook! Please tell Milxnor if this gets logged.");
}
void AFortPlayerController::ServerLoadingScreenDroppedHook(UObject* Context, FFrame* Stack, void* Ret)
{
auto PlayerController = (AFortPlayerController*)Context;
@@ -704,7 +709,7 @@ void AFortPlayerController::ServerCreateBuildingActorHook(UObject* Context, FFra
auto MatInstance = WorldInventory->FindItemInstance(MatDefinition);
bool bShouldDestroy = MatInstance ? (PlayerController->DoesBuildFree() ? false : MatInstance->GetItemEntry()->GetCount() < 10) : true;
bool bShouldDestroy = MatInstance && MatInstance->GetItemEntry() ? (PlayerController->DoesBuildFree() ? false : MatInstance->GetItemEntry()->GetCount() < 10) : true;
if (bShouldDestroy)
{