初始化提交

This commit is contained in:
2025-07-09 01:08:35 +08:00
parent d3296791cf
commit 62e0f56c60
618 changed files with 173543 additions and 0 deletions

View File

@ -0,0 +1,26 @@
local Ability = {}
local GetGameplayTag = require("GamePlay.Utils").GetGameplayTag
local BlueprintGameplayTagLibrary = import("BlueprintGameplayTagLibrary")
local AbilitySystemBlueprintLibrary = import("AbilitySystemBlueprintLibrary")
function Ability:K2_ActivateAbilityFromEvent(EventData)
local tag = EventData.tag
local value = EventData.EventMagnitude
local asc = AbilitySystemBlueprintLibrary.GetAbilitySystemComponent(self.target)
if tag == "Recover.Role.Health" then
local spec_handle = asc:MakeOutgoingSpec(
self.AbilityEffectConfigs:Get("Role"), 1, asc:MakeEffectContext()
)
AbilitySystemBlueprintLibrary.AssignTagSetByCallerMagnitude(
spec_handle, GetGameplayTag("Change.Role.Health"), value
)
asc:BP_ApplyGameplayEffectSpecToSelf(spec_handle)
end
end
return Class(nil, nil, Ability)