第一次提交

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,44 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#include "AbilitySystem/GCS_GameplayEffectContext.h"
void FGCS_ContextPayload_Combat::SetTaggedValue(const FGameplayTag& Tag, float NewValue)
{
if (Tag.IsValid())
{
bool bFound = false;
for (FGCS_TaggedValue& TaggedValue : TaggedValues)
{
if (TaggedValue.Attribute == Tag)
{
TaggedValue.Value = NewValue;
bFound = true;
break;
}
}
if (!bFound)
{
FGCS_TaggedValue Temp;
Temp.Attribute = Tag;
Temp.Value = NewValue;
TaggedValues.Add(Temp);
}
}
}
float FGCS_ContextPayload_Combat::GetTaggedValue(const FGameplayTag& Tag) const
{
if (Tag.IsValid())
{
for (const FGCS_TaggedValue& TaggedValue : TaggedValues)
{
if (TaggedValue.Attribute == Tag)
{
return TaggedValue.Value;
}
}
}
return 0.0f;
}