fix some bug with remvoing items, add experimental stat saving for gadgets, fix shadow stones scuffy
This commit is contained in:
Milxnor
2023-05-07 22:30:56 -04:00
parent 3405177d20
commit bfe2610a11
18 changed files with 281 additions and 104 deletions

View File

@@ -160,17 +160,12 @@ struct FFortItemEntry : FFastArraySerializerItem
static auto GenericAttributeValuesOffset = FindOffsetStruct("/Script/FortniteGame.FortItemEntry", "GenericAttributeValues", false);
if (GenericAttributeValuesOffset != -1)
{
// proper copying
{
this->GetGenericAttributeValues().CopyFromArray(OtherItemEntry->GetGenericAttributeValues());
/* for (int i = 0; i < OtherItemEntry->GetGenericAttributeValues().Num(); i++)
{
this->GetGenericAttributeValues().Add(OtherItemEntry->GetGenericAttributeValues().at(i));
} */
}
this->GetStateValues().CopyFromArray(OtherItemEntry->GetStateValues(), FFortItemEntryStateValue::GetStructSize());
// should we do this?
this->MostRecentArrayReplicationKey = -1;
@@ -178,6 +173,8 @@ struct FFortItemEntry : FFastArraySerializerItem
this->ReplicationKey = -1;
}
void SetStateValue(EFortItemEntryState StateType, int IntValue);
static UStruct* GetStruct()
{
static auto Struct = FindObject<UStruct>("/Script/FortniteGame.FortItemEntry");
@@ -207,13 +204,13 @@ struct FFortItemEntry : FFastArraySerializerItem
if (GenericAttributeValuesOffset != -1)
{
Entry->GetGenericAttributeValues().Free();
Entry->GetGenericAttributeValues().FreeGood();
}
Entry->GetStateValues().Free();
Entry->GetStateValues().FreeGood();
}
RtlZeroMemory(Entry, FFortItemEntry::GetStructSize());
// RtlZeroMemory(Entry, FFortItemEntry::GetStructSize());
}
static void FreeArrayOfEntries(TArray<FFortItemEntry>& tarray)