瀏覽代碼

新增道具分解协议

neo 1 年之前
父節點
當前提交
b615a3e220
共有 1 個文件被更改,包括 21 次插入1 次删除
  1. 21 1
      proto-lib/proto_bag.lua

+ 21 - 1
proto-lib/proto_bag.lua

@@ -5,7 +5,6 @@ local proto_struct = [[
5 5
 
6 6
 local proto_c2s =
7 7
     [[
8
-
9 8
     # 获取背包信息
10 9
     bag_get_info 2100 {
11 10
         request {
@@ -15,6 +14,27 @@ local proto_c2s =
15 14
             items 1: *DataItemBag       # 物品列表
16 15
         }
17 16
     }
17
+    
18
+    # 分解
19
+    bag_exchange 2101 {
20
+        request {
21
+            items 0: *DataItem          # 分解物品列表(支持一键分解)
22
+        }
23
+        response {
24
+            code 0: integer
25
+            goldCount 1: integer        # 分解后获得金币数量
26
+        }
27
+    }
28
+    
29
+    # 提取
30
+    bag_draw 2102 {
31
+        request {
32
+            items 0: *DataItem          # 提取物品列表(支持一键提取)
33
+        }
34
+        response {
35
+            code 0: integer
36
+        }
37
+    }
18 38
 ]]
19 39
 
20 40
 local proto_s2c =