Commit a479c1ea55b48d97b9f2a9f5182e6ef7d52fcedb
1 parent
4e0136e6
feat: 派遣系统 数据结构和表结构以及相关协议
Showing
5 changed files
with
43 additions
and
15 deletions
Show diff stats
@@ -0,0 +1,29 @@ | @@ -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,18 +97,3 @@ message HeroUpGradeReq { | ||
97 | string hero_id = 1; | 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,4 +153,14 @@ message Task { | ||
153 | map<int32,int32> month_task = 5; | 153 | map<int32,int32> month_task = 5; |
154 | 154 | ||
155 | map<int32,string> specify_task = 6; | 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 | \ No newline at end of file | 167 | \ No newline at end of file |
protocode.proto
@@ -60,6 +60,9 @@ enum ProtoCode | @@ -60,6 +60,9 @@ enum ProtoCode | ||
60 | 60 | ||
61 | ActivitySignRpc = 701; | 61 | ActivitySignRpc = 701; |
62 | 62 | ||
63 | + DispatchRpc = 801; | ||
64 | + DispatchRewardRpc = 802; | ||
65 | + | ||
63 | 66 | ||
64 | DisConnectNty = 1001; | 67 | DisConnectNty = 1001; |
65 | RoleUpdatePropertyNty = 1002; | 68 | RoleUpdatePropertyNty = 1002; |
role.proto
@@ -33,6 +33,7 @@ message LoginRsp { | @@ -33,6 +33,7 @@ message LoginRsp { | ||
33 | int64 time_now = 9; | 33 | int64 time_now = 9; |
34 | models.Task task = 10; | 34 | models.Task task = 10; |
35 | map<int32,bool> task_open = 11; | 35 | map<int32,bool> task_open = 11; |
36 | + repeated models.Dispatch dispatch = 12; | ||
36 | } | 37 | } |
37 | 38 | ||
38 | message CreateRar { | 39 | message CreateRar { |