I have an infinite GameplayEffect(GE) that is assigns the following tags to the character’s Abilitycomponent
InheritableOwnedTagsContainer.AddTag(FGameplayTag::RequestGameplayTag(FName("Resist.Stun")));
InheritableOwnedTagsContainer.AddTag(FGameplayTag::RequestGameplayTag(FName("Resist.Root")));
I can successfully block the UAWEffectStun with the ApplicationTagRequirments but I would like to use the Granted Immunity.:
ApplicationTagRequirements.IgnoreTags.AddTag(FGameplayTag::RequestGameplayTag(FName("Resist.Stun")));
Code to apply the GE:
TSubclassOf<UAWEffectStun> GEStunClass = UAWEffectStun::StaticClass();
FGameplayEffectContextHandle TestInvalid;
FGameplayEffectSpecHandle GEStunHandle = AbilitySystemTarget->MakeOutgoingSpec(GEStunClass, UseEffectLevel, TestInvalid);
FActiveGameplayEffectHandle ActiveGEHandle = AbilitySystem->ApplyGameplayEffectSpecToTarget(*GEStunHandle.Data.Get(), AbilitySystemTarget.Get());
The following is in the FActiveGameplayEffectsContainer::HasApplicationImmunityToSpec method of GameplayEffect.cpp. “this” turns into the AbilityComponent, but it never gets executed.
I am looking to figure out what I am missing.
for (const FActiveGameplayEffect& Effect : this)
{
if (Effect.Spec.Def->GrantedApplicationImmunityTags.IsEmpty() == false && Effect.Spec.Def->GrantedApplicationImmunityTags.RequirementsMet( *AggregatedSourceTags ))
{
OutGEThatProvidedImmunity = &Effect;
return true;
}
}