This commit is contained in:
aozhiwei 2023-03-06 16:46:03 +08:00
parent 09aca00111
commit c214855db9
3 changed files with 19 additions and 1 deletions

View File

@ -56,6 +56,11 @@ void CallFuncBuff::Activate()
owner->GetAbility()->AddSpeedAddition(hold_param2_);
}
break;
case BuffCallFunc_e::kRemoveBuff:
{
ProcRemoveBuff();
}
break;
default:
{
}
@ -130,7 +135,7 @@ void CallFuncBuff::ProcAddMinorMode()
skill->AddMinorMode
(
meta->_int_buff_param2,
dur_time,
dur_time * 1000,
[this] (int action)
{
if (action == 0) {
@ -158,3 +163,13 @@ void CallFuncBuff::ProcMarkTag()
break;
}
}
void CallFuncBuff::ProcRemoveBuff()
{
for (int buff_effect : meta->_buff_param2_int_list) {
owner->RemoveBuffByEffectId(buff_effect);
}
for (int buff_id : meta->_buff_param3_int_list) {
owner->RemoveBuffById(buff_id);
}
}

View File

@ -9,6 +9,7 @@ A8_DECLARE_CLASS_ENUM(BuffCallFunc_e, int,
kDecHp = 4,
kMarkTag = 5,
kSpeedAddition = 6,
kRemoveBuff = 7,
);
@ -23,6 +24,7 @@ class CallFuncBuff : public Buff
void ProcIntervalRangeAddBuffFunc();
void ProcAddMinorMode();
void ProcMarkTag();
void ProcRemoveBuff();
float hold_param2_ = 0.0;
};

View File

@ -856,6 +856,7 @@ void Creature::DoSkill(int skill_id,
{
Skill* skill = GetSkill(skill_id);
if (skill && CanUseSkill(skill_id)) {
a8::XPrintf("DoSkill minor_type:%d\n", {skill->GetMinorType()});
if (skill->GetMinorType()) {
skill->DoMinorMode();
return;