This commit is contained in:
aozhiwei 2024-05-20 15:00:35 +08:00
parent badbec55dc
commit 0f71ea1a94
2 changed files with 26 additions and 1 deletions

View File

@ -260,6 +260,11 @@ void CallFuncBuff::Activate()
BuffEffectCondAdd();
}
break;
case BuffCallFunc_e::kRandAdd:
{
RandAdd();
}
break;
default:
{
}
@ -1790,3 +1795,21 @@ void CallFuncBuff::OnBreakSkillPostExec()
}
}
}
void CallFuncBuff::RandAdd()
{
hold_param2_ = meta->GetBuffParam2(this);
for (auto buff_id : meta->_buff_param3_int_list) {
if (buff_id > 0) {
owner->TryAddBuff(
GetCaster().Get(),
buff_id,
skill_meta,
init_args,
buff_vars
);
} else {
owner->RemoveBuffById(-buff_id);
}
}
}

View File

@ -42,7 +42,8 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
kBatchRandomPosSummonObstacle = 42,
kOnBreakSkill = 43,
kBreakSkill = 44,
kBuffEffectCondAdd = 45
kBuffEffectCondAdd = 45,
kRandAdd = 46
);
@ -86,6 +87,7 @@ class CallFuncBuff : public Buff
void OnBreakSkill();
void BreakSkill();
void BuffEffectCondAdd();
void RandAdd();
void InternalRangeHoldBuff(std::function<bool(glm::vec3&)> get_center_func);