Commit a479c1ea55b48d97b9f2a9f5182e6ef7d52fcedb
1 parent
4e0136e6
feat: 派遣系统 数据结构和表结构以及相关协议
Showing
5 changed files
with
43 additions
and
15 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,29 @@ |
| 1 | +syntax = "proto3"; | |
| 2 | +option go_package = "../pb;pb"; | |
| 3 | + | |
| 4 | +package game; | |
| 5 | +//import "google/protobuf/empty.proto"; | |
| 6 | +import "models.proto"; | |
| 7 | + | |
| 8 | +// rpc = req + rsp 请求/返回 | |
| 9 | +// rpc = rar + rar 自回包 | |
| 10 | + | |
| 11 | +message DispatchReq { | |
| 12 | + int32 dispatch_group = 1; | |
| 13 | + int32 dispatch_id = 2; | |
| 14 | + repeated string heros = 3; | |
| 15 | +} | |
| 16 | + | |
| 17 | +message DispatchRsp { | |
| 18 | + models.Dispatch dispatch = 1; | |
| 19 | +} | |
| 20 | + | |
| 21 | +message DispatchRewardReq { | |
| 22 | + string id = 1; | |
| 23 | + int32 dispatch_id = 2; | |
| 24 | +} | |
| 25 | + | |
| 26 | +message DispatchRewardRsp { | |
| 27 | + string success_reward = 1; | |
| 28 | + string dispatch_reward = 2; | |
| 29 | +} | ... | ... |
hero.proto
| ... | ... | @@ -97,18 +97,3 @@ message HeroUpGradeReq { |
| 97 | 97 | string hero_id = 1; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | -message HeroUpGradeRsp { | |
| 101 | - string hero_id = 1; | |
| 102 | - int32 grade = 2; | |
| 103 | -} | |
| 104 | - | |
| 105 | -message HeroUpMemorySlotReq { | |
| 106 | - string hero_id = 1; | |
| 107 | - int32 slot_idx = 2; | |
| 108 | - string costs = 3; | |
| 109 | -} | |
| 110 | - | |
| 111 | -message HeroUpMemorySlotRsp { | |
| 112 | - string hero_id = 1; | |
| 113 | - map<int32,string> slot_memory = 2; | |
| 114 | -} | ... | ... |
models.proto
| ... | ... | @@ -153,4 +153,14 @@ message Task { |
| 153 | 153 | map<int32,int32> month_task = 5; |
| 154 | 154 | |
| 155 | 155 | map<int32,string> specify_task = 6; |
| 156 | +} | |
| 157 | + | |
| 158 | +message Dispatch { | |
| 159 | + string id = 1; // @inject_tag: index:"unique" pri:"1" | |
| 160 | + string role_id = 2; | |
| 161 | + int32 group_id = 3; | |
| 162 | + map<int32,int32> process = 4; // id=0, id=1 不存在是未解锁 0是正在派遣 1是已完成 | |
| 163 | + repeated string heros = 5; | |
| 164 | + int64 end_time = 6; | |
| 165 | + bool status = 7; // true=正在派遣 | |
| 156 | 166 | } |
| 157 | 167 | \ No newline at end of file | ... | ... |
protocode.proto