This commit is contained in:
aozhiwei 2021-05-10 17:36:05 +08:00
parent ebf1e123e9
commit fc6d7cb6a0

View File

@ -1187,13 +1187,21 @@ void Creature::Shot(a8::Vec2& target_dir, bool& shot_ok, float fly_distance)
false);
} else if (power_idx < GetCurrWeapon()->meta->power_charge.size()) {
MetaData::Equip* weapon_meta = MetaMgr::Instance()->GetEquip
(std::get<1>(GetCurrWeapon()->meta->power_charge[1]));
(std::get<1>(GetCurrWeapon()->meta->power_charge[power_idx]));
if (weapon_meta) {
MetaData::EquipUpgrade* weapon_upgrade_meta = MetaMgr::Instance()->GetEquipUpgrade
(weapon_meta->i->id());
MetaData::Equip* bullet_meta = MetaMgr::Instance()->GetEquip(weapon_meta->i->use_bullet());;
if (bullet_meta) {
#ifdef DEBUG
SendDebugMsg(a8::Format("蓄力射击 %d 枪:%d 子弹:%d",
{
power_idx,
weapon_meta->i->id(),
bullet_meta->i->id()
}));
#endif
InternalShot(this,
weapon_meta,
weapon_upgrade_meta,