--[[ Descripttion:背包 version: Author: Neo,Huang Date: 2023-11-15 22:34:08 LastEditors: Neo,Huang LastEditTime: 2023-11-19 20:43:33 --]] local proto_struct = [[ # 资源更新信息 .DataItemUpdate { id 0: integer # 物品id count 1: integer # 物品当前数量 deltaCount 2: integer # 物品变化量 bid 3: integer # 物品在背包的id } ]] local proto_c2s = [[ # 获取背包信息 bag_get_info 2100 { request { } response { code 0: integer items 1: *DataItemBag # 物品列表 } } # 分解 bag_exchange 2101 { request { items 0: *DataItem # 分解物品列表(支持一键分解) } response { code 0: integer goldCount 1: integer # 分解后获得金币数量 } } # 提取 bag_draw 2102 { request { items 0: *DataItem # 提取物品列表(支持一键提取) } response { code 0: integer } } ]] local proto_s2c = [[ # 玩家当前物品 on_user_items 2100 { request { items 0: *DataItemUpdate # 道具变化列表 reason 1: string # 资源变化的途径 } } ]] local proto = { c2s = proto_struct .. proto_c2s, s2c = proto_struct .. proto_s2c } return proto