diff --git a/server/gameserver/buff/callfunc.cc b/server/gameserver/buff/callfunc.cc index d7cf3a8c..7f5c4312 100644 --- a/server/gameserver/buff/callfunc.cc +++ b/server/gameserver/buff/callfunc.cc @@ -1444,8 +1444,12 @@ void CallFuncBuff::Shot() float x = meta->GetBuffParam3(this); float y = meta->GetBuffParam4(this); float z = meta->GetBuffParam5(this); - const mt::Equip* bullet_meta = mt::Equip::GetById(id); - if (bullet_meta) { + const mt::Equip* gun_meta = mt::Equip::GetById(id); + if (gun_meta) { + const mt::Equip* bullet_meta = mt::Equip::GetById(gun_meta->use_bullet()); + if (!bullet_meta) { + return; + } bool force_client_report = meta->_buff_param6_int_set.find(1) != meta->_buff_param6_int_set.end(); bool spec_target_pos = meta->_buff_param6_int_set.find(2) != meta->_buff_param6_int_set.end(); bool ignore_original_dmg = meta->_buff_param6_int_set.find(3) != meta->_buff_param6_int_set.end(); @@ -1508,7 +1512,7 @@ void CallFuncBuff::Shot() fly_distance = std::max(200.0f, fly_distance); fly_distance = std::min(400.0f, fly_distance); InternalShot(owner, - owner->GetCurrWeapon()->meta, + gun_meta, bullet_meta, skill_meta, fly_distance,