This commit is contained in:
aozhiwei 2022-10-25 22:00:47 +08:00
parent 9bca125ee4
commit 4d6eb13254

View File

@ -1267,7 +1267,25 @@ void Buff::ProcCallFunc()
switch (meta->int_param1) { switch (meta->int_param1) {
case 1: case 1:
{ {
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip(meta->int_param2);
if (weapon_meta) {
for (int i = 0; i < 6; ++i) {
a8::Vec2 bullet_dir = a8::Vec2::UP;
bullet_dir.Rotate(60 * i);
a8::Vec2 bullet_born_pos = owner->GetPos() + bullet_dir * 20;
int bullet_uniid = owner->room->AllocUniid();
owner->room->frame_event.AddBullet
(bullet_uniid,
owner->GetWeakPtrRef(),
weapon_meta,
1,
bullet_born_pos,
bullet_dir,
0,
0,
0);
}
}
} }
break; break;
default: default: