Skip to content

Commit

Permalink
[#60] Switch to Explicit Trigger Tag for Ability Boost GAs
Browse files Browse the repository at this point in the history
  • Loading branch information
GuyPaddock committed Jul 16, 2024
1 parent 4e5d7f7 commit 43293c1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
#include "CharacterStats/AbilityBoosts/PF2AbilityBoostRuleOptionValidator.h"
#include "CharacterStats/AbilityBoosts/PF2GameplayAbilityTargetData_BoostAbility.h"

#include "GameplayTags/Encounters/AbilityTriggers.h"
#include "GameplayTags/GameplayAbilities/AbilityTypes.h"

UPF2AbilityBoostBase::UPF2AbilityBoostBase()
{
FAbilityTriggerData TriggerData;

TriggerData.TriggerSource = EGameplayAbilityTriggerSource::GameplayEvent;
TriggerData.TriggerTag = Pf2TagGameplayAbilityTypeAbilityBoost;
TriggerData.TriggerTag = Pf2TagTriggerTagCategoryAnytimeAbilityBoost;

this->AbilityTriggers.Add(TriggerData);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
// The UE editor requires these tags to be under a root tag of `TriggerTagCategory` in order for them to be selectable
// in the UI.

// =====================================================================================================================
// Tags that trigger Gameplay Abilities that can be used at any time.
// =====================================================================================================================
UE_DEFINE_GAMEPLAY_TAG_COMMENT(
Pf2TagTriggerTagCategoryAnytime,
"TriggerTagCategory.PF2.Anytime",
"Tags that trigger Gameplay Abilities that can be used at any time."
)

UE_DEFINE_GAMEPLAY_TAG_COMMENT(
Pf2TagTriggerTagCategoryAnytimeAbilityBoost,
"TriggerTagCategory.PF2.Anytime.AbilityBoost",
"Tag to trigger ."
)

// =====================================================================================================================
// Tags that trigger Encounter-related Gameplay Abilities.
// =====================================================================================================================
Expand Down
3 changes: 2 additions & 1 deletion Source/OpenPF2GameFramework/Private/PF2CharacterBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "Commands/PF2CommandQueueComponent.h"

#include "GameplayTags/Encounters/AbilityTriggers.h"
#include "GameplayTags/GameplayAbilities/AbilityTypes.h"

#include "Utilities/PF2InterfaceUtilities.h"
Expand Down Expand Up @@ -468,7 +469,7 @@ void APF2CharacterBase::ActivateAbilityBoost(
Asc->TriggerAbilityFromGameplayEvent(
BoostSpec->Handle,
Asc->AbilityActorInfo.Get(),
Pf2TagGameplayAbilityTypeAbilityBoost,
Pf2TagTriggerTagCategoryAnytimeAbilityBoost,
&BoostEventInfo,
*Asc
);
Expand Down

0 comments on commit 43293c1

Please sign in to comment.