This commit is contained in:
aozhiwei 2023-11-03 13:10:55 +08:00
parent 1eb992e9f8
commit 884692756a
2 changed files with 28 additions and 0 deletions

View File

@ -54,6 +54,11 @@ void CondAddBuff::Activate()
ProcShot(); ProcShot();
} }
break; break;
case CondAddBuff_e::kFlyDestory:
{
ProcFlyDestory();
}
break;
default: default:
{ {
} }
@ -375,3 +380,24 @@ void CondAddBuff::ProcShot()
) )
); );
} }
void CondAddBuff::ProcFlyDestory()
{
auto context = A8_MAKE_ANON_STRUCT_SHARED
(
);
event_handlers_.push_back
(
owner->GetTrigger()->AddListener
(
kFlyHookDestoryEvent,
[this, context]
(const a8::Args& args)
{
if (!owner->dead) {
owner->TryAddBuff(owner, meta->_int_buff_param1, skill_meta);
}
})
);
}

View File

@ -12,6 +12,7 @@ A8_DECLARE_CLASS_ENUM(CondAddBuff_e, int,
kLimitTimeKillTarget = 22, kLimitTimeKillTarget = 22,
kReload = 23, kReload = 23,
kShot = 24, kShot = 24,
kFlyDestory = 25,
kEnd kEnd
); );
@ -31,5 +32,6 @@ class CondAddBuff : public Buff
void ProcLimitTimeKillTarget(); void ProcLimitTimeKillTarget();
void ProcReload(); void ProcReload();
void ProcShot(); void ProcShot();
void ProcFlyDestory();
}; };