diff --git a/server/gameserver/human.cc b/server/gameserver/human.cc index b418824..23dfdb5 100644 --- a/server/gameserver/human.cc +++ b/server/gameserver/human.cc @@ -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; } diff --git a/server/tools/protobuild/metatable.proto b/server/tools/protobuild/metatable.proto index 72e7bf6..ecb2b42 100755 --- a/server/tools/protobuild/metatable.proto +++ b/server/tools/protobuild/metatable.proto @@ -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; //库存槽位