第一次提交

This commit is contained in:
不明不惑
2026-03-03 01:23:02 +08:00
commit 3e434877e8
1053 changed files with 102411 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#include "GIS_CurrencyContainer.h"
#include "GIS_CurrencySystemComponent.h"
#include UE_INLINE_GENERATED_CPP_BY_NAME(GIS_CurrencyContainer)
void FGIS_CurrencyContainer::PreReplicatedRemove(const TArrayView<int32> RemovedIndices, int32 FinalSize)
{
for (int32 Index : RemovedIndices)
{
FGIS_CurrencyEntry& Entry = Entries[Index];
if (OwningComponent)
{
OwningComponent->OnCurrencyEntryRemoved(Entry, Index);
}
Entry.PrevAmount = 0;
}
}
void FGIS_CurrencyContainer::PostReplicatedAdd(const TArrayView<int32> AddedIndices, int32 FinalSize)
{
for (int32 Index : AddedIndices)
{
FGIS_CurrencyEntry& Entry = Entries[Index];
if (OwningComponent)
{
OwningComponent->OnCurrencyEntryAdded(Entry, Index);
}
Entry.PrevAmount = Entry.Amount;
}
}
void FGIS_CurrencyContainer::PostReplicatedChange(const TArrayView<int32> ChangedIndices, int32 FinalSize)
{
for (int32 Index : ChangedIndices)
{
FGIS_CurrencyEntry& Entry = Entries[Index];
if (OwningComponent)
{
OwningComponent->OnCurrencyEntryUpdated(Entry, Index, Entry.PrevAmount, Entry.Amount);
}
Entry.PrevAmount = Entry.Amount;
}
}