Files
Farmer/211/server/proto/itempb.proto
2026-02-18 13:52:06 +08:00

54 lines
1.1 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
syntax = "proto3";
package gamepb.itempb;
import "corepb.proto";
// ============ 背包/仓库 ============
// 获取背包
message BagRequest {}
message BagReply {
corepb.ItemBag item_bag = 1; // 与 game 一致,背包数据在 item_bag 里
}
// ============ 出售物品 ============
message SellRequest {
repeated corepb.Item items = 1; // 要出售的物品列表 (id + count)
}
message SellReply {
repeated corepb.Item sell_items = 1; // 出售的物品
repeated corepb.Item get_items = 2; // 获得的物品id=1001为金币, id=1002为点券
}
// ============ 使用物品 ============
message UseRequest {
int64 item_id = 1;
int64 count = 2;
repeated int64 land_ids = 3;
}
message UseReply {
repeated corepb.Item items = 1;
}
// ============ 批量使用物品 ============
message UseItem {
int64 item_id = 1;
int64 count = 2;
int64 land_count = 6; // 根据抓包字段6为18推测为土地数
}
message BatchUseRequest {
repeated UseItem items = 1;
}
message BatchUseReply {
repeated corepb.Item items = 1;
}