This commit is contained in:
aozhiwei 2022-09-07 13:55:02 +08:00
parent 6cb39117bc
commit da28c5bc0a

View File

@ -98,6 +98,25 @@ void Trigger::Shot(MetaData::Equip* weapon_meta)
}
});
}
{
Buff* buff = owner_->GetBuffByEffectId(kBET_MachineGun);
if (buff && buff->meta->int_param2 == 1) {
owner_->room->xtimer.AddDeadLineTimerAndAttach
(buff->meta->int_param3 / FRAME_RATE_MS,
a8::XParams()
.SetSender(owner_)
.SetParam1(buff->buff_uniid),
[] (const a8::XParams& param)
{
Creature* c = (Creature*)param.sender.GetUserData();
c->RemoveBuffByUniId(param.param1);
},
&owner_->xtimer_attacher.timer_list_,
[] (const a8::XParams& param)
{
});
}
}
}
void Trigger::Kill(Creature* target)