11.特殊伪装,水外无法使用成功,并提示

This commit is contained in:
aozhiwei 2021-06-17 20:38:24 +08:00
parent b3129211cd
commit e00714b81a
2 changed files with 8 additions and 0 deletions

View File

@ -3714,6 +3714,13 @@ void Human::ProcUseItem(int item_id)
}
MetaData::Equip* item_meta = MetaMgr::Instance()->GetEquip(item_id);
if (item_meta && GetItemNum(item_id) > 0) {
if (item_meta->i->use_scene() == 1 && HasBuffEffect(kBET_InWater)) {
SendSysPiaoMsg(TEXT("only_inwater_use", "只能在水中使用"),
a8::MkRgb(255, 0, 0),
3
);
return;
}
if (GetCar() && item_meta->i->equip_type() == EQUIP_TYPE_CAMOUFLAGE) {
return;
}

View File

@ -131,6 +131,7 @@ message Equip
optional float max_oil = 57;
optional float average_oil = 58;
optional float atk_mech = 59;
optional int32 use_scene = 60;
optional string inventory_slot = 31; //
optional int32 _inventory_slot = 32; //