1
This commit is contained in:
parent
346581bd48
commit
67465bc565
@ -284,12 +284,18 @@ void Weapon::ToPB(Creature* c, cs::MFWeapon* pb_obj)
|
||||
{
|
||||
pb_obj->set_weapon_uniid(a8::XValue(weapon_uniid).GetString());
|
||||
pb_obj->set_weapon_id(weapon_id);
|
||||
pb_obj->set_weapon_lv(1);
|
||||
if (weapon_uniid && weapon_lv == 0) {
|
||||
long long p_weapon_uniid = 0;
|
||||
int p_weapon_lv = 1;
|
||||
int p_quality = 1;
|
||||
c->GetBattleContext()->GetWeaponLvQuality(p_weapon_uniid, p_weapon_lv, p_quality);
|
||||
weapon_lv = p_weapon_lv;
|
||||
}
|
||||
pb_obj->set_weapon_lv(std::max(1, weapon_lv));
|
||||
pb_obj->set_ammo(ammo);
|
||||
pb_obj->set_volume(GetClipVolume(c));
|
||||
}
|
||||
|
||||
|
||||
void Buff::FillMFBuff(cs::MFBuff* buff_pb)
|
||||
{
|
||||
buff_pb->set_buff_id(meta->buff_id());
|
||||
|
@ -13,6 +13,7 @@ class Weapon
|
||||
long long weapon_uniid = 0;
|
||||
int weapon_idx = 0;
|
||||
int weapon_id = 0;
|
||||
int weapon_lv = 0;
|
||||
int ammo = 0;
|
||||
const mt::Equip* meta = nullptr;
|
||||
const mt::Equip* bullet_meta = nullptr;
|
||||
|
Loading…
x
Reference in New Issue
Block a user