text: // Copyright 2020 Dan Kestranek.
  
  #pragma once
  
  
  // ----------------------------------------------------------------------------------------------------------------
  // This header is for Ability-specific structures and enums that are shared across a project
  // Every game will probably need a file like this to handle their extensions to the system
  // This file is a good place for subclasses of FGameplayEffectContext and FGameplayAbilityTargetData
  // ----------------------------------------------------------------------------------------------------------------
  
  #include "GameplayEffectTypes.h"
  #include "Abilities/GameplayAbilityTargetTypes.h"
  #include "Abilities/Tasks/AbilityTask_WaitGameplayEffectStackChange.h"
  #include "Abilities/Tasks/AbilityTask_WaitGameplayEffectRemoved.h"
  #include "GSAbilityTypes.generated.h"
  
  class UGSAbilitySystemComponent;
  class UGameplayEffect;
  class UGSTargetType;
  
  /**
   * Struct defining a list of gameplay effects, a tag, and targeting info
   * These containers are defined statically in blueprints or assets and then turn into Specs at runtime
   */
  USTRUCT(BlueprintType)
  struct FGSGameplayEffectContainer
  {
  	GENERATED_BODY()
  
  public:
  	FGSGameplayEffectContainer() {}
  
  	/** Sets the way that targeting happens */
  	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = GameplayEffectContainer)
  	TSubclassOf<UGSTargetType> TargetType;
  
  	/** List of gameplay effects to apply to the targets */
  	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = GameplayEffectContainer)
  	TArray<TSubclassOf<UGameplayEffect>> TargetGameplayEffectClasses;
  };
  
  /** A "processed" version of GSGameplayEffectContainer that can be passed around and eventually applied */
  USTRUCT(BlueprintType)
  struct FGSGameplayEffectContainerSpec
  {
  	GENERATED_BODY()
  
  public:
  	FGSGameplayEffectContainerSpec() {}
  
  	/** Computed target data */
  	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = GameplayEffectContainer)
  	FGameplayAbilityTargetDataHandle TargetData;
  
  	/** List of gameplay effects to apply to the targets */
  	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = GameplayEffectContainer)
  	TArray<FGameplayEffectSpecHandle> TargetGameplayEffectSpecs;
  
  	/** Returns true if this has any valid effect specs */
  	bool HasValidEffects() const;
  
  	/** Returns true if this has any valid targets */
  	bool HasValidTargets() const;
  
  	/** Adds new targets to target data */
  	void AddTargets(const TArray<FGameplayAbilityTargetDataHandle>& TargetData, const TArray<FHitResult>& HitResults, const TArray<AActor*>& TargetActors);
  
  	/** Clears target data */
  	void ClearTargets();
  };
  
  