a good update

Added a very useful debugging tool, made looting even more proper
This commit is contained in:
Milxnor
2023-05-09 22:37:04 -04:00
parent b64f569551
commit 3fb5c4671d
34 changed files with 612 additions and 169 deletions

View File

@@ -25,7 +25,7 @@ void FFortItemEntry::SetStateValue(EFortItemEntryState StateType, int IntValue)
// ItemEntry->bIsDirty = true;
}
FFortItemEntry* FFortItemEntry::MakeItemEntry(UFortItemDefinition* ItemDefinition, int Count, int LoadedAmmo, float Durability)
FFortItemEntry* FFortItemEntry::MakeItemEntry(UFortItemDefinition* ItemDefinition, int Count, int LoadedAmmo, float Durability, int Level)
{
auto Entry = Alloc<FFortItemEntry>(GetStructSize(), bUseFMemoryRealloc);
@@ -40,7 +40,7 @@ FFortItemEntry* FFortItemEntry::MakeItemEntry(UFortItemDefinition* ItemDefinitio
LoadedAmmo = 0;
}
Entry->MostRecentArrayReplicationKey = -1; // idk if we need to set this
Entry->MostRecentArrayReplicationKey = -1; // idk if we need to set this one
Entry->ReplicationID = -1;
Entry->ReplicationKey = -1;
@@ -50,6 +50,7 @@ FFortItemEntry* FFortItemEntry::MakeItemEntry(UFortItemDefinition* ItemDefinitio
Entry->GetDurability() = Durability;
Entry->GetGameplayAbilitySpecHandle() = FGameplayAbilitySpecHandle(-1);
Entry->GetParentInventory().ObjectIndex = -1;
Entry->GetLevel() = Level;
// We want to add StateValues.Add(DurabilityInitialized); orwnatefc erwgearf yk
// CoCreateGuid((GUID*)&Entry->GetItemGuid());
// Entry->DoesUpdateStatsOnCollection() = true; // I think fortnite does this?