Commit df901aaea9349c34fc3818f2028b93eee27d57e4
1 parent
7e2b8590
fix: gm增加删除装备删除物品接口
Showing
4 changed files
with
31 additions
and
5 deletions
Show diff stats
doc/game.md
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | 45 | ||
46 | 46 | ||
47 | ## 通知(服务器主动推送) | 47 | ## 通知(服务器主动推送) |
48 | - | ||
49 | -### 角色信息修改 RoleUpdatePropertyRsp | ||
50 | - | ||
51 | -### 背包信息修改 RoleUpdateItemsRsp | ||
52 | \ No newline at end of file | 48 | \ No newline at end of file |
49 | +- 角色信息修改 RoleUpdatePropertyRsp | ||
50 | +- 物品信息修改 RoleUpdateItemsRsp | ||
51 | +- 添加装备 EquipmentAddRsp | ||
52 | +- 删除装备 EquipmentDelRsp |
doc/gm.md
@@ -66,3 +66,24 @@ $ curl -i 'http://192.168.0.206:8880/addequip?role_id=1000002&id=0' | @@ -66,3 +66,24 @@ $ curl -i 'http://192.168.0.206:8880/addequip?role_id=1000002&id=0' | ||
66 | ```shell | 66 | ```shell |
67 | {"code":0} | 67 | {"code":0} |
68 | ``` | 68 | ``` |
69 | + | ||
70 | +## 删除装备 [/delequip] | ||
71 | +| 参数 | 类型 | 是否必须 | 备注 | | ||
72 | +| --- | --- | --- | --- | | ||
73 | +| id | string | Y | 服务器上的装备id | | ||
74 | + | ||
75 | +请求示例: | ||
76 | +```shell | ||
77 | +$ curl -i 'http://192.168.0.206:8880/delequip?role_id=1000002&id=0' | ||
78 | +``` | ||
79 | + | ||
80 | +## 删除物品 [/delitem] | ||
81 | +| 参数 | 类型 | 是否必须 | 备注 | | ||
82 | +| --- | --- | --- | --- | | ||
83 | +| id | string | Y | 物品id | | ||
84 | +| count | int | Y | 需要删除的物品数量 | | ||
85 | + | ||
86 | +请求示例: | ||
87 | +```shell | ||
88 | +$ curl -i 'http://192.168.0.206:8880/delitem?role_id=1000002&id=1&count=1' | ||
89 | +``` | ||
69 | \ No newline at end of file | 90 | \ No newline at end of file |
game.proto
@@ -59,4 +59,8 @@ message RoleUpdateItemsRsp { | @@ -59,4 +59,8 @@ message RoleUpdateItemsRsp { | ||
59 | //ResponseCmd EquipmentAddRsp | 59 | //ResponseCmd EquipmentAddRsp |
60 | message EquipmentAddRsp { | 60 | message EquipmentAddRsp { |
61 | models.Equipment equip = 1; | 61 | models.Equipment equip = 1; |
62 | -} | ||
63 | \ No newline at end of file | 62 | \ No newline at end of file |
63 | +} | ||
64 | + | ||
65 | +message EquipmentDelRsp { | ||
66 | + string id = 1; | ||
67 | +} |
protocode.proto
@@ -17,5 +17,6 @@ enum ProtoCode | @@ -17,5 +17,6 @@ enum ProtoCode | ||
17 | RoleUpdatePropertyRsp = 9; | 17 | RoleUpdatePropertyRsp = 9; |
18 | RoleUpdateItemsRsp = 10; | 18 | RoleUpdateItemsRsp = 10; |
19 | EquipmentAddRsp = 11; | 19 | EquipmentAddRsp = 11; |
20 | + EquipmentDelRsp = 12; | ||
20 | 21 | ||
21 | } | 22 | } |
22 | \ No newline at end of file | 23 | \ No newline at end of file |