1
This commit is contained in:
parent
51521ff10f
commit
8a6fd57c7c
@ -47,14 +47,27 @@ void CondAddBuff::Deactivate()
|
||||
|
||||
void CondAddBuff::ProcBulletHit()
|
||||
{
|
||||
const bool is_same_target = meta->_int_buff_param5 ? true : false;
|
||||
const float interval_time = meta->_buff_param6;
|
||||
const int hit_times = meta->_int_buff_param2;
|
||||
|
||||
auto context = A8_MAKE_ANON_STRUCT_SHARED
|
||||
(
|
||||
int last_hit_target_id = 0;
|
||||
int hited_times = 0;
|
||||
long long last_hit_frameno = 0;
|
||||
);
|
||||
|
||||
handlers_.push_back
|
||||
(
|
||||
owner->GetTrigger()->AddListener
|
||||
(
|
||||
kBulletHitEvent,
|
||||
[] (const a8::Args& args)
|
||||
[this, context, is_same_target, interval_time, hit_times]
|
||||
(const a8::Args& args)
|
||||
{
|
||||
|
||||
IBullet* bullet = args.Get<IBullet*>(0);
|
||||
Creature* c = args.Get<Creature*>(0);
|
||||
})
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user