// Copyright 2025 https://yuewu.dev/en All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "GCS_CombatStructLibrary.h" #include "UObject/Object.h" #include "GCS_GameplayEffectContext.generated.h" /** * The Combat related data which was carried and pass around within gameplay effect context, as one of the gameplay effect context payload. * 战斗相关数据,在游戏效果上下文中被携带和传递,作为游戏效果上下文数据之一。 */ USTRUCT(BlueprintType) struct GENERICCOMBATSYSTEM_API FGCS_ContextPayload_Combat { GENERATED_BODY() void SetTaggedValue(const FGameplayTag& Tag, float NewValue); float GetTaggedValue(const FGameplayTag& Tag) const; /** * Indicate the effect spec owning this context was Predictively executed. * 表示拥有此上下文的效果实例是以客户端预测方式执行的。 */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS") bool bIsPredictingContext{false}; UPROPERTY() FPredictionKey PredictionKey; /** * Attack definition data table. * 攻击定义数据表。 */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS", meta=(RequiredAssetDataTags = "RowStructure=/Script/GenericCombatSystem.GCS_AttackDefinition")) TObjectPtr AtkDataTable{nullptr}; /** * Row name in the attack definition table. * 攻击定义表中的行名。 */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS") FName AtkRowName{NAME_None}; /** * Bullet definition data table. * 子弹定义数据表。 */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS", meta=(RequiredAssetDataTags = "RowStructure=/Script/GenericCombatSystem.GCS_BulletDefinition")) TObjectPtr BulletDataTable{nullptr}; /** * Row name in the bullet definition table. * 子弹定义表中的行名。 */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS") FName BulletRowName{NAME_None}; /** * The tags added during gameplay effect apply(coming from MMC,or Execution). */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS") FGameplayTagContainer DynamicTags; /** * Array of tagged values associated with the combat process. * 与战斗过程关联的标记值数组。 */ UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GCS") TArray TaggedValues; };