36 lines
968 B
C++
36 lines
968 B
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
#include "SkillEffect_SER.h"
|
|
|
|
#include "Chaos/Deformable/MuscleActivationConstraints.h"
|
|
#include "Kismet/KismetStringLibrary.h"
|
|
#include "ProjectFish/PawnWithSkill.h"
|
|
#include "ProjectFish/Skill/Skill.h"
|
|
|
|
void USkillEffect_SER::Execute(const FSkillContext& context)
|
|
{
|
|
Super::Execute(context);
|
|
TArray<UObject*> targets = GetApplyTargets(context);
|
|
for (auto target: targets)
|
|
{
|
|
if (!target->GetClass()->IsChildOf(USkill::StaticClass()))
|
|
{
|
|
UE_LOG(LogTemp, Error, TEXT("skill %s apply target is not a skill"), *(OwnerSkill->GetSkillName()));
|
|
}
|
|
else
|
|
{
|
|
//修改技能的冷却时间
|
|
USkill* skill = Cast<USkill>(target);
|
|
skill->ApplyRemainingEnduranceOffset(effectData.EffectValue);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
FString USkillEffect_SER::GetSkillEffectDes()
|
|
{
|
|
return FString::Printf(TEXT("使指定位置的技能耐久度回复 %d点耐久度 "), (int32)(effectData.EffectValue));
|
|
}
|