Commit ddc88bace31594cb55448db244e8b032b3dfabba
1 parent
e87aa909
fix: 记录战斗
Showing
16 changed files
with
658 additions
and
163 deletions
Show diff stats
.gitignore
.gitmodules
@@ -4,3 +4,6 @@ | @@ -4,3 +4,6 @@ | ||
4 | [submodule "DesignerConfigs"] | 4 | [submodule "DesignerConfigs"] |
5 | path = DesignerConfigs | 5 | path = DesignerConfigs |
6 | url = git@120.26.43.151:loujiachen/DesignerConfigs.git | 6 | url = git@120.26.43.151:loujiachen/DesignerConfigs.git |
7 | +[submodule "luban_examples"] | ||
8 | + path = luban_examples | ||
9 | + url = git@github.com:focus-creative-games/luban_examples.git |
Makefile
@@ -4,10 +4,11 @@ pname = plugin-$(IMGTIME) | @@ -4,10 +4,11 @@ pname = plugin-$(IMGTIME) | ||
4 | race = -race | 4 | race = -race |
5 | #DEBUG = -gcflags "-l -N" | 5 | #DEBUG = -gcflags "-l -N" |
6 | DEBUG= | 6 | DEBUG= |
7 | -gen: | ||
8 | - protoc -I./protos --go_out=./protos --go-grpc_out=./protos ./protos/*proto | ||
9 | - protoc-go-inject-tag -input=./pb/*.pb.go | ||
10 | - python3 tools/generator.py | 7 | + |
8 | +# excel generator config | ||
9 | +WORKSPACE=. | ||
10 | +GEN_CLIENT=${WORKSPACE}/luban_examples/Tools/Luban.Client/Luban.Client.dll | ||
11 | +CONF_ROOT=${WORKSPACE}/DesignerConfigs | ||
11 | 12 | ||
12 | test: | 13 | test: |
13 | go run cmd/test/client.go | 14 | go run cmd/test/client.go |
@@ -31,4 +32,23 @@ doc: | @@ -31,4 +32,23 @@ doc: | ||
31 | godoc -http=:8980 -goroot="." -play | 32 | godoc -http=:8980 -goroot="." -play |
32 | open localhost:8980/pkg/pro2d/cmd/gameserver/action/#pkg-index | 33 | open localhost:8980/pkg/pro2d/cmd/gameserver/action/#pkg-index |
33 | 34 | ||
34 | -.PHONY: all build protos test cert plugin doc | ||
35 | \ No newline at end of file | 35 | \ No newline at end of file |
36 | +proto: | ||
37 | + protoc -I./protos --go_out=./protos --go-grpc_out=./protos ./protos/*proto | ||
38 | + protoc-go-inject-tag -input=./pb/*.pb.go | ||
39 | + python3 tools/generator.py | ||
40 | + | ||
41 | +excel: | ||
42 | + cd ${WORKSPACE}/DesignerConfigs && git pull && cd - | ||
43 | + dotnet ${GEN_CLIENT} -h 127.0.0.1 -j cfg --\ | ||
44 | + -d ${CONF_ROOT}/Defines/__root__.xml \ | ||
45 | + --input_data_dir ${CONF_ROOT}/Datas \ | ||
46 | + --output_code_dir ${WORKSPACE}/csvdata/gen/cfg \ | ||
47 | + --output_data_dir ${WORKSPACE}/csvdata/data \ | ||
48 | + --gen_types code_go_bin,data_bin \ | ||
49 | + --go:bright_module_name "pro2d/csvdata/bin_bright" \ | ||
50 | + -s all | ||
51 | + | ||
52 | +gen:proto excel | ||
53 | + | ||
54 | + | ||
55 | +.PHONY: all build protos test cert plugin doc proto | ||
36 | \ No newline at end of file | 56 | \ No newline at end of file |
cmd/gameserver/action/RoleAction.go
1 | -// Package action 游戏服角色相关操作 | 1 | +// 游戏服角色相关操作 |
2 | package action | 2 | package action |
3 | 3 | ||
4 | import ( | 4 | import ( |
@@ -9,6 +9,7 @@ import ( | @@ -9,6 +9,7 @@ import ( | ||
9 | "pro2d/common/db/mongoproxy" | 9 | "pro2d/common/db/mongoproxy" |
10 | "pro2d/common/db/redisproxy" | 10 | "pro2d/common/db/redisproxy" |
11 | "pro2d/common/logger" | 11 | "pro2d/common/logger" |
12 | + "pro2d/csvdata" | ||
12 | "pro2d/models" | 13 | "pro2d/models" |
13 | "pro2d/pb" | 14 | "pro2d/pb" |
14 | ) | 15 | ) |
@@ -168,3 +169,82 @@ func EquipmentDelRpc(role *models.RoleModel, msg components.IMessage) (int32, in | @@ -168,3 +169,82 @@ func EquipmentDelRpc(role *models.RoleModel, msg components.IMessage) (int32, in | ||
168 | 169 | ||
169 | return 0, nil | 170 | return 0, nil |
170 | } | 171 | } |
172 | + | ||
173 | +/* | ||
174 | +RoleStartBattleRpc 开始战斗 | ||
175 | +*/ | ||
176 | +func RoleStartBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { | ||
177 | + req := pb.RoleStartBattleReq{} | ||
178 | + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { | ||
179 | + logger.Error("loginRpc err: %v", err) | ||
180 | + return 1, nil | ||
181 | + } | ||
182 | + | ||
183 | + //TODO 消耗体力 | ||
184 | + | ||
185 | + return 0, nil | ||
186 | +} | ||
187 | + | ||
188 | +/* | ||
189 | +RoleEndBattleRpc 结束战斗 | ||
190 | + 2 关卡不存在 | ||
191 | + | ||
192 | + RoleEndBattleRsp 返回值 | ||
193 | +*/ | ||
194 | +func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, interface{}) { | ||
195 | + req := pb.RoleEndBattleReq{} | ||
196 | + if err := proto.Unmarshal(msg.GetData(), &req); err != nil { | ||
197 | + logger.Error("loginRpc err: %v", err) | ||
198 | + return 1, nil | ||
199 | + } | ||
200 | + | ||
201 | + //find chapter from table config | ||
202 | + chapterInfo := csvdata.Get().TbRogueChapter.Get(req.ChapterId) | ||
203 | + | ||
204 | + //find chapter from role pass | ||
205 | + chapterCount, first := role.Role.PassChapters[req.ChapterId] | ||
206 | + | ||
207 | + //find carbon | ||
208 | + carbonInfo, ok := chapterInfo.Carbons[req.CarbonId] | ||
209 | + if !ok { | ||
210 | + logger.Error("carbonInfo not exists") | ||
211 | + return 2, nil | ||
212 | + } | ||
213 | + | ||
214 | + reward := make(common.IMapStringNum) | ||
215 | + if !first { | ||
216 | + role.Role.PassChapters[req.ChapterId] = 1 | ||
217 | + for k, v := range common.StringToMapNum(carbonInfo.FirstAward) { | ||
218 | + reward[k] = v | ||
219 | + } | ||
220 | + } else { | ||
221 | + role.Role.PassChapters[req.ChapterId] = chapterCount + 1 | ||
222 | + } | ||
223 | + | ||
224 | + for k, v := range common.StringToMapNum(carbonInfo.NormalAward) { | ||
225 | + rv, ok := reward[k] | ||
226 | + if !ok { | ||
227 | + reward[k] = v | ||
228 | + } else { | ||
229 | + reward[k] = rv + v | ||
230 | + } | ||
231 | + } | ||
232 | + //award | ||
233 | + reward = role.Award(reward) | ||
234 | + | ||
235 | + //exp | ||
236 | + var exp int32 | ||
237 | + if req.Pass { | ||
238 | + exp = carbonInfo.CarbonExp | ||
239 | + } else { | ||
240 | + exp = carbonInfo.CarbonFailExp | ||
241 | + } | ||
242 | + level, exp := role.UpLevel(exp) | ||
243 | + | ||
244 | + rsp := pb.RoleEndBattleRsp{ | ||
245 | + RoleLevel: level, | ||
246 | + RoleExp: exp, | ||
247 | + Reward: common.MapNumToString(reward), | ||
248 | + } | ||
249 | + return 0, rsp | ||
250 | +} |
cmd/gameserver/action/protocode.go
@@ -13,6 +13,8 @@ func GetActionMap() map[interface{}]interface{} { | @@ -13,6 +13,8 @@ func GetActionMap() map[interface{}]interface{} { | ||
13 | am[uint32(pb.ProtoCode_ChangeTeamReq)] = ChangeTeamRpc | 13 | am[uint32(pb.ProtoCode_ChangeTeamReq)] = ChangeTeamRpc |
14 | am[uint32(pb.ProtoCode_HeroEquipReferReq)] = HeroEquipReferRpc | 14 | am[uint32(pb.ProtoCode_HeroEquipReferReq)] = HeroEquipReferRpc |
15 | am[uint32(pb.ProtoCode_RoleClearItemsReq)] = RoleClearItemsRpc | 15 | am[uint32(pb.ProtoCode_RoleClearItemsReq)] = RoleClearItemsRpc |
16 | + am[uint32(pb.ProtoCode_RoleStartBattleReq)] = RoleStartBattleRpc | ||
17 | + am[uint32(pb.ProtoCode_RoleEndBattleReq)] = RoleEndBattleRpc | ||
16 | am[uint32(pb.ProtoCode_EquipmentDelReq)] = EquipmentDelRpc | 18 | am[uint32(pb.ProtoCode_EquipmentDelReq)] = EquipmentDelRpc |
17 | 19 | ||
18 | return am | 20 | return am |
cmd/gameserver/gmaction/GmAction.go
@@ -53,24 +53,39 @@ func (gm *GmAction) AddItem(role *models.RoleModel, params GMParams) { | @@ -53,24 +53,39 @@ func (gm *GmAction) AddItem(role *models.RoleModel, params GMParams) { | ||
53 | UpdatePackLimit 更新背包限制 | 53 | UpdatePackLimit 更新背包限制 |
54 | clotheslimit: 服饰限制数 | 54 | clotheslimit: 服饰限制数 |
55 | weaponslimit: 武器限制数 | 55 | weaponslimit: 武器限制数 |
56 | + jewelrylimit: 首饰限制数 | ||
57 | + materiallimit: 材料限制数 | ||
56 | otherlimit: 其他限制数 | 58 | otherlimit: 其他限制数 |
57 | */ | 59 | */ |
58 | func (gm *GmAction) UpdatePackLimit(role *models.RoleModel, params GMParams) { | 60 | func (gm *GmAction) UpdatePackLimit(role *models.RoleModel, params GMParams) { |
59 | - update := make(map[string]interface{}, 3) | 61 | + update := make(map[string]interface{}, 5) |
60 | c, ok := params["clotheslimit"] | 62 | c, ok := params["clotheslimit"] |
61 | if ok { | 63 | if ok { |
62 | l, _ := strconv.Atoi(c) | 64 | l, _ := strconv.Atoi(c) |
63 | update["clotheslimit"] = uint32(l) | 65 | update["clotheslimit"] = uint32(l) |
64 | } | 66 | } |
65 | - w := params["weaponslimit"] | 67 | + w, ok := params["weaponslimit"] |
66 | if ok { | 68 | if ok { |
67 | l, _ := strconv.Atoi(w) | 69 | l, _ := strconv.Atoi(w) |
68 | update["weaponslimit"] = uint32(l) | 70 | update["weaponslimit"] = uint32(l) |
69 | } | 71 | } |
70 | - o := params["otherlimit"] | 72 | + o, ok := params["otherlimit"] |
71 | if ok { | 73 | if ok { |
72 | l, _ := strconv.Atoi(o) | 74 | l, _ := strconv.Atoi(o) |
73 | update["otherlimit"] = uint32(l) | 75 | update["otherlimit"] = uint32(l) |
74 | } | 76 | } |
77 | + | ||
78 | + o, ok = params["jewelrylimit"] | ||
79 | + if ok { | ||
80 | + l, _ := strconv.Atoi(o) | ||
81 | + update["jewelrylimit"] = uint32(l) | ||
82 | + } | ||
83 | + | ||
84 | + o, ok = params["materiallimit"] | ||
85 | + if ok { | ||
86 | + l, _ := strconv.Atoi(o) | ||
87 | + update["materiallimit"] = uint32(l) | ||
88 | + } | ||
89 | + | ||
75 | role.UpdateProperties(update, true) | 90 | role.UpdateProperties(update, true) |
76 | } | 91 | } |
cmd/gameserver/service/gm.go
@@ -37,7 +37,6 @@ func (s *GmServer) HandlerFuncObj(tvl, obj reflect.Value) gin.HandlerFunc { | @@ -37,7 +37,6 @@ func (s *GmServer) HandlerFuncObj(tvl, obj reflect.Value) gin.HandlerFunc { | ||
37 | 37 | ||
38 | } else if c.Request.Method == "GET" { | 38 | } else if c.Request.Method == "GET" { |
39 | roleId, ok = c.GetQuery("role_id") | 39 | roleId, ok = c.GetQuery("role_id") |
40 | - logger.Debug(c.Request.URL.Query()) | ||
41 | for k, v := range c.Request.URL.Query() { | 40 | for k, v := range c.Request.URL.Query() { |
42 | properties[k] = v[0] | 41 | properties[k] = v[0] |
43 | } | 42 | } |
common/commonFunc.go
@@ -54,6 +54,7 @@ func GetNextUId() (string, error) { | @@ -54,6 +54,7 @@ func GetNextUId() (string, error) { | ||
54 | } | 54 | } |
55 | 55 | ||
56 | type IMapString map[string]interface{} | 56 | type IMapString map[string]interface{} |
57 | +type IMapStringNum map[string]int32 | ||
57 | 58 | ||
58 | func MapToString(params IMapString) string { | 59 | func MapToString(params IMapString) string { |
59 | var items bytes.Buffer | 60 | var items bytes.Buffer |
@@ -67,7 +68,7 @@ func MapToString(params IMapString) string { | @@ -67,7 +68,7 @@ func MapToString(params IMapString) string { | ||
67 | } | 68 | } |
68 | 69 | ||
69 | func StringToMap(items string, num bool) IMapString { | 70 | func StringToMap(items string, num bool) IMapString { |
70 | - backPack := make(map[string]interface{}, 10) | 71 | + backPack := make(map[string]interface{}) |
71 | for _, v := range strings.Split(items, " ") { | 72 | for _, v := range strings.Split(items, " ") { |
72 | ii := strings.Split(v, "=") | 73 | ii := strings.Split(v, "=") |
73 | if len(ii) < 2 { | 74 | if len(ii) < 2 { |
@@ -85,3 +86,30 @@ func StringToMap(items string, num bool) IMapString { | @@ -85,3 +86,30 @@ func StringToMap(items string, num bool) IMapString { | ||
85 | } | 86 | } |
86 | return backPack | 87 | return backPack |
87 | } | 88 | } |
89 | + | ||
90 | +func MapNumToString(params IMapStringNum) string { | ||
91 | + var items bytes.Buffer | ||
92 | + for k, v := range params { | ||
93 | + items.WriteString(k) | ||
94 | + items.WriteString("=") | ||
95 | + items.WriteString(fmt.Sprintf("%v", v)) | ||
96 | + items.WriteString(" ") | ||
97 | + } | ||
98 | + return items.String() | ||
99 | +} | ||
100 | + | ||
101 | +func StringToMapNum(items string) IMapStringNum { | ||
102 | + backPack := make(IMapStringNum) | ||
103 | + for _, v := range strings.Split(items, " ") { | ||
104 | + ii := strings.Split(v, "=") | ||
105 | + if len(ii) < 2 { | ||
106 | + continue | ||
107 | + } | ||
108 | + c, err := strconv.Atoi(ii[1]) | ||
109 | + if err != nil { | ||
110 | + continue | ||
111 | + } | ||
112 | + backPack[ii[0]] = int32(c) | ||
113 | + } | ||
114 | + return backPack | ||
115 | +} |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +Subproject commit 64026a935d29e4baef757b9ef7548ff2082516d6 |
models/role.go
@@ -18,7 +18,7 @@ type RoleModel struct { | @@ -18,7 +18,7 @@ type RoleModel struct { | ||
18 | Teams SchemaMap | 18 | Teams SchemaMap |
19 | Equipments SchemaMap | 19 | Equipments SchemaMap |
20 | Prop *PropModel | 20 | Prop *PropModel |
21 | - Items common.IMapString //背包 | 21 | + Items common.IMapStringNum //背包 |
22 | 22 | ||
23 | lastSaveTs int64 | 23 | lastSaveTs int64 |
24 | } | 24 | } |
@@ -38,7 +38,7 @@ func RoleExistByUid(uid string) *RoleModel { | @@ -38,7 +38,7 @@ func RoleExistByUid(uid string) *RoleModel { | ||
38 | Teams: make(SchemaMap), | 38 | Teams: make(SchemaMap), |
39 | Equipments: make(SchemaMap), | 39 | Equipments: make(SchemaMap), |
40 | Prop: new(PropModel), | 40 | Prop: new(PropModel), |
41 | - Items: make(common.IMapString), | 41 | + Items: make(common.IMapStringNum), |
42 | } | 42 | } |
43 | r.Load() | 43 | r.Load() |
44 | r.LoadAll() | 44 | r.LoadAll() |
@@ -54,7 +54,7 @@ func NewRole(id string) *RoleModel { | @@ -54,7 +54,7 @@ func NewRole(id string) *RoleModel { | ||
54 | Teams: make(SchemaMap), | 54 | Teams: make(SchemaMap), |
55 | Equipments: make(SchemaMap), | 55 | Equipments: make(SchemaMap), |
56 | Prop: new(PropModel), | 56 | Prop: new(PropModel), |
57 | - Items: make(common.IMapString), | 57 | + Items: make(common.IMapStringNum), |
58 | } | 58 | } |
59 | return m | 59 | return m |
60 | } | 60 | } |
@@ -164,7 +164,7 @@ func (m *RoleModel) LoadTeams() { | @@ -164,7 +164,7 @@ func (m *RoleModel) LoadTeams() { | ||
164 | 164 | ||
165 | //加载背包数据到内存 | 165 | //加载背包数据到内存 |
166 | func (m *RoleModel) LoadItems() { | 166 | func (m *RoleModel) LoadItems() { |
167 | - m.Items = common.StringToMap(m.Role.Items, true) | 167 | + m.Items = common.StringToMapNum(m.Role.Items) |
168 | } | 168 | } |
169 | 169 | ||
170 | func (m *RoleModel) LoadEquipments() { | 170 | func (m *RoleModel) LoadEquipments() { |
models/rolePlugin.go
@@ -5,32 +5,33 @@ import ( | @@ -5,32 +5,33 @@ import ( | ||
5 | "github.com/golang/protobuf/proto" | 5 | "github.com/golang/protobuf/proto" |
6 | "pro2d/common" | 6 | "pro2d/common" |
7 | "pro2d/common/logger" | 7 | "pro2d/common/logger" |
8 | + "pro2d/csvdata" | ||
8 | "pro2d/pb" | 9 | "pro2d/pb" |
9 | ) | 10 | ) |
10 | 11 | ||
11 | //背包系统 | 12 | //背包系统 |
12 | -func (m *RoleModel) GetItemCount(key string) uint32 { | 13 | +func (m *RoleModel) GetItemCount(key string) int32 { |
13 | c, ok := m.Items[key] | 14 | c, ok := m.Items[key] |
14 | if !ok { | 15 | if !ok { |
15 | - c = uint32(0) | 16 | + c = int32(0) |
16 | } | 17 | } |
17 | - return c.(uint32) | 18 | + return c |
18 | } | 19 | } |
19 | 20 | ||
20 | func (m *RoleModel) CostItem(key string, count int32) bool { | 21 | func (m *RoleModel) CostItem(key string, count int32) bool { |
21 | - if uint32(count) > m.GetItemCount(key) { | 22 | + if count > m.GetItemCount(key) { |
22 | return false | 23 | return false |
23 | } | 24 | } |
24 | return m.AddItem(key, -count) | 25 | return m.AddItem(key, -count) |
25 | } | 26 | } |
26 | 27 | ||
27 | -func (m *RoleModel) CostItems(params common.IMapString) bool { | 28 | +func (m *RoleModel) CostItems(params common.IMapStringNum) bool { |
28 | for k, v := range params { | 29 | for k, v := range params { |
29 | - if v.(uint32) > m.GetItemCount(k) { | 30 | + if v > m.GetItemCount(k) { |
30 | return false | 31 | return false |
31 | } | 32 | } |
32 | 33 | ||
33 | - m.AddItem(k, -v.(int32)) | 34 | + m.AddItem(k, -v) |
34 | } | 35 | } |
35 | return true | 36 | return true |
36 | } | 37 | } |
@@ -38,13 +39,13 @@ func (m *RoleModel) CostItems(params common.IMapString) bool { | @@ -38,13 +39,13 @@ func (m *RoleModel) CostItems(params common.IMapString) bool { | ||
38 | func (m *RoleModel) AddItem(key string, count int32) bool { | 39 | func (m *RoleModel) AddItem(key string, count int32) bool { |
39 | c := m.GetItemCount(key) | 40 | c := m.GetItemCount(key) |
40 | 41 | ||
41 | - num := int32(c) + count | 42 | + num := c + count |
42 | if num > 0 { | 43 | if num > 0 { |
43 | - m.Items[key] = uint32(num) | 44 | + m.Items[key] = num |
44 | } else { | 45 | } else { |
45 | delete(m.Items, key) | 46 | delete(m.Items, key) |
46 | } | 47 | } |
47 | - m.SetProperty("items", common.MapToString(m.Items)) | 48 | + m.SetProperty("items", common.MapNumToString(m.Items)) |
48 | 49 | ||
49 | rsp, err := proto.Marshal(&pb.RoleUpdateItemsRsp{Items: fmt.Sprintf("%s=%d", key, num)}) | 50 | rsp, err := proto.Marshal(&pb.RoleUpdateItemsRsp{Items: fmt.Sprintf("%s=%d", key, num)}) |
50 | if err != nil { | 51 | if err != nil { |
@@ -58,12 +59,12 @@ func (m *RoleModel) AddItem(key string, count int32) bool { | @@ -58,12 +59,12 @@ func (m *RoleModel) AddItem(key string, count int32) bool { | ||
58 | return true | 59 | return true |
59 | } | 60 | } |
60 | 61 | ||
61 | -func (m *RoleModel) AddItems(params common.IMapString) bool { | 62 | +func (m *RoleModel) AddItems(params common.IMapStringNum) bool { |
62 | tmp := make(common.IMapString) | 63 | tmp := make(common.IMapString) |
63 | for k, v := range params { | 64 | for k, v := range params { |
64 | c := m.GetItemCount(k) | 65 | c := m.GetItemCount(k) |
65 | 66 | ||
66 | - num := c + v.(uint32) | 67 | + num := c + v |
67 | if num > 0 { | 68 | if num > 0 { |
68 | m.Items[k] = num | 69 | m.Items[k] = num |
69 | tmp[k] = num | 70 | tmp[k] = num |
@@ -72,7 +73,7 @@ func (m *RoleModel) AddItems(params common.IMapString) bool { | @@ -72,7 +73,7 @@ func (m *RoleModel) AddItems(params common.IMapString) bool { | ||
72 | } | 73 | } |
73 | } | 74 | } |
74 | 75 | ||
75 | - m.SetProperty("items", common.MapToString(m.Items)) | 76 | + m.SetProperty("items", common.MapNumToString(m.Items)) |
76 | 77 | ||
77 | rsp, err := proto.Marshal(&pb.RoleUpdateItemsRsp{Items: common.MapToString(tmp)}) | 78 | rsp, err := proto.Marshal(&pb.RoleUpdateItemsRsp{Items: common.MapToString(tmp)}) |
78 | if err != nil { | 79 | if err != nil { |
@@ -128,3 +129,33 @@ func (m *RoleModel) EquipmentAddNotify(equip *pb.Equipment) { | @@ -128,3 +129,33 @@ func (m *RoleModel) EquipmentAddNotify(equip *pb.Equipment) { | ||
128 | } | 129 | } |
129 | } | 130 | } |
130 | } | 131 | } |
132 | + | ||
133 | +func (m *RoleModel) UpLevel(exp int32) (int32, int32) { | ||
134 | + level := m.Role.Level | ||
135 | + oldLevelExp := csvdata.Get().TbAccountLevelExp.Get(level) | ||
136 | + if exp >= oldLevelExp.NeedExp-m.Role.Exp { | ||
137 | + exp = exp - oldLevelExp.NeedExp | ||
138 | + level++ | ||
139 | + | ||
140 | + for exp > 0 { | ||
141 | + oldLevelExp = csvdata.Get().TbAccountLevelExp.Get(level) | ||
142 | + if exp >= oldLevelExp.NeedExp { | ||
143 | + exp = exp - oldLevelExp.NeedExp | ||
144 | + level++ | ||
145 | + } else { | ||
146 | + exp = exp + m.Role.Exp | ||
147 | + break | ||
148 | + } | ||
149 | + } | ||
150 | + | ||
151 | + } else { | ||
152 | + exp = exp + m.Role.Exp | ||
153 | + } | ||
154 | + return level, exp | ||
155 | + | ||
156 | +} | ||
157 | + | ||
158 | +func (m *RoleModel) Award(award common.IMapStringNum) common.IMapStringNum { | ||
159 | + m.AddItems(award) | ||
160 | + return award | ||
161 | +} |
models/schema.go
@@ -46,10 +46,10 @@ func NewSchema(key string, schema interface{}) *Schema { | @@ -46,10 +46,10 @@ func NewSchema(key string, schema interface{}) *Schema { | ||
46 | protoIndex: make(map[string]int), | 46 | protoIndex: make(map[string]int), |
47 | } | 47 | } |
48 | 48 | ||
49 | - proto.MessageReflect(schema.(proto.Message)).Range(func(des protoreflect.FieldDescriptor, value protoreflect.Value) bool { | ||
50 | - sch.protoIndex[strings.ToLower(des.JSONName())] = des.Index() | ||
51 | - return true | ||
52 | - }) | 49 | + p := proto.MessageReflect(schema.(proto.Message)).Descriptor() |
50 | + for i := 0; i < p.Fields().Len(); i++ { | ||
51 | + sch.protoIndex[strings.ToLower(p.Fields().Get(i).JSONName())] = i | ||
52 | + } | ||
53 | 53 | ||
54 | for i := 0; i < s.Type().NumField(); i++ { | 54 | for i := 0; i < s.Type().NumField(); i++ { |
55 | name := s.Type().Field(i).Name | 55 | name := s.Type().Field(i).Name |
@@ -216,8 +216,6 @@ func (s *Schema) ParseFields(message protoreflect.Message, properties map[string | @@ -216,8 +216,6 @@ func (s *Schema) ParseFields(message protoreflect.Message, properties map[string | ||
216 | 216 | ||
217 | ids = append(ids, int32(field.Index())) | 217 | ids = append(ids, int32(field.Index())) |
218 | 218 | ||
219 | - field.Kind() | ||
220 | - | ||
221 | message.Set(field, protoreflect.ValueOf(v)) | 219 | message.Set(field, protoreflect.ValueOf(v)) |
222 | 220 | ||
223 | s.SetProperty(k, v) | 221 | s.SetProperty(k, v) |
pb/game.pb.go
@@ -570,6 +570,195 @@ func (x *RoleClearItemsReq) GetCount() int32 { | @@ -570,6 +570,195 @@ func (x *RoleClearItemsReq) GetCount() int32 { | ||
570 | return 0 | 570 | return 0 |
571 | } | 571 | } |
572 | 572 | ||
573 | +type RoleStartBattleReq struct { | ||
574 | + state protoimpl.MessageState | ||
575 | + sizeCache protoimpl.SizeCache | ||
576 | + unknownFields protoimpl.UnknownFields | ||
577 | + | ||
578 | + ChapterId int32 `protobuf:"varint,1,opt,name=chapter_id,json=chapterId,proto3" json:"chapter_id,omitempty"` | ||
579 | + CarbonId int32 `protobuf:"varint,2,opt,name=carbon_id,json=carbonId,proto3" json:"carbon_id,omitempty"` | ||
580 | +} | ||
581 | + | ||
582 | +func (x *RoleStartBattleReq) Reset() { | ||
583 | + *x = RoleStartBattleReq{} | ||
584 | + if protoimpl.UnsafeEnabled { | ||
585 | + mi := &file_game_proto_msgTypes[10] | ||
586 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
587 | + ms.StoreMessageInfo(mi) | ||
588 | + } | ||
589 | +} | ||
590 | + | ||
591 | +func (x *RoleStartBattleReq) String() string { | ||
592 | + return protoimpl.X.MessageStringOf(x) | ||
593 | +} | ||
594 | + | ||
595 | +func (*RoleStartBattleReq) ProtoMessage() {} | ||
596 | + | ||
597 | +func (x *RoleStartBattleReq) ProtoReflect() protoreflect.Message { | ||
598 | + mi := &file_game_proto_msgTypes[10] | ||
599 | + if protoimpl.UnsafeEnabled && x != nil { | ||
600 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
601 | + if ms.LoadMessageInfo() == nil { | ||
602 | + ms.StoreMessageInfo(mi) | ||
603 | + } | ||
604 | + return ms | ||
605 | + } | ||
606 | + return mi.MessageOf(x) | ||
607 | +} | ||
608 | + | ||
609 | +// Deprecated: Use RoleStartBattleReq.ProtoReflect.Descriptor instead. | ||
610 | +func (*RoleStartBattleReq) Descriptor() ([]byte, []int) { | ||
611 | + return file_game_proto_rawDescGZIP(), []int{10} | ||
612 | +} | ||
613 | + | ||
614 | +func (x *RoleStartBattleReq) GetChapterId() int32 { | ||
615 | + if x != nil { | ||
616 | + return x.ChapterId | ||
617 | + } | ||
618 | + return 0 | ||
619 | +} | ||
620 | + | ||
621 | +func (x *RoleStartBattleReq) GetCarbonId() int32 { | ||
622 | + if x != nil { | ||
623 | + return x.CarbonId | ||
624 | + } | ||
625 | + return 0 | ||
626 | +} | ||
627 | + | ||
628 | +type RoleEndBattleReq struct { | ||
629 | + state protoimpl.MessageState | ||
630 | + sizeCache protoimpl.SizeCache | ||
631 | + unknownFields protoimpl.UnknownFields | ||
632 | + | ||
633 | + ChapterId int32 `protobuf:"varint,1,opt,name=chapter_id,json=chapterId,proto3" json:"chapter_id,omitempty"` | ||
634 | + CarbonId int32 `protobuf:"varint,2,opt,name=carbon_id,json=carbonId,proto3" json:"carbon_id,omitempty"` | ||
635 | + Pass bool `protobuf:"varint,3,opt,name=pass,proto3" json:"pass,omitempty"` | ||
636 | +} | ||
637 | + | ||
638 | +func (x *RoleEndBattleReq) Reset() { | ||
639 | + *x = RoleEndBattleReq{} | ||
640 | + if protoimpl.UnsafeEnabled { | ||
641 | + mi := &file_game_proto_msgTypes[11] | ||
642 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
643 | + ms.StoreMessageInfo(mi) | ||
644 | + } | ||
645 | +} | ||
646 | + | ||
647 | +func (x *RoleEndBattleReq) String() string { | ||
648 | + return protoimpl.X.MessageStringOf(x) | ||
649 | +} | ||
650 | + | ||
651 | +func (*RoleEndBattleReq) ProtoMessage() {} | ||
652 | + | ||
653 | +func (x *RoleEndBattleReq) ProtoReflect() protoreflect.Message { | ||
654 | + mi := &file_game_proto_msgTypes[11] | ||
655 | + if protoimpl.UnsafeEnabled && x != nil { | ||
656 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
657 | + if ms.LoadMessageInfo() == nil { | ||
658 | + ms.StoreMessageInfo(mi) | ||
659 | + } | ||
660 | + return ms | ||
661 | + } | ||
662 | + return mi.MessageOf(x) | ||
663 | +} | ||
664 | + | ||
665 | +// Deprecated: Use RoleEndBattleReq.ProtoReflect.Descriptor instead. | ||
666 | +func (*RoleEndBattleReq) Descriptor() ([]byte, []int) { | ||
667 | + return file_game_proto_rawDescGZIP(), []int{11} | ||
668 | +} | ||
669 | + | ||
670 | +func (x *RoleEndBattleReq) GetChapterId() int32 { | ||
671 | + if x != nil { | ||
672 | + return x.ChapterId | ||
673 | + } | ||
674 | + return 0 | ||
675 | +} | ||
676 | + | ||
677 | +func (x *RoleEndBattleReq) GetCarbonId() int32 { | ||
678 | + if x != nil { | ||
679 | + return x.CarbonId | ||
680 | + } | ||
681 | + return 0 | ||
682 | +} | ||
683 | + | ||
684 | +func (x *RoleEndBattleReq) GetPass() bool { | ||
685 | + if x != nil { | ||
686 | + return x.Pass | ||
687 | + } | ||
688 | + return false | ||
689 | +} | ||
690 | + | ||
691 | +type RoleEndBattleRsp struct { | ||
692 | + state protoimpl.MessageState | ||
693 | + sizeCache protoimpl.SizeCache | ||
694 | + unknownFields protoimpl.UnknownFields | ||
695 | + | ||
696 | + RoleLevel int32 `protobuf:"varint,1,opt,name=role_level,json=roleLevel,proto3" json:"role_level,omitempty"` | ||
697 | + RoleExp int32 `protobuf:"varint,2,opt,name=role_exp,json=roleExp,proto3" json:"role_exp,omitempty"` | ||
698 | + Hero *Hero `protobuf:"bytes,3,opt,name=hero,proto3" json:"hero,omitempty"` | ||
699 | + Reward string `protobuf:"bytes,4,opt,name=reward,proto3" json:"reward,omitempty"` | ||
700 | +} | ||
701 | + | ||
702 | +func (x *RoleEndBattleRsp) Reset() { | ||
703 | + *x = RoleEndBattleRsp{} | ||
704 | + if protoimpl.UnsafeEnabled { | ||
705 | + mi := &file_game_proto_msgTypes[12] | ||
706 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
707 | + ms.StoreMessageInfo(mi) | ||
708 | + } | ||
709 | +} | ||
710 | + | ||
711 | +func (x *RoleEndBattleRsp) String() string { | ||
712 | + return protoimpl.X.MessageStringOf(x) | ||
713 | +} | ||
714 | + | ||
715 | +func (*RoleEndBattleRsp) ProtoMessage() {} | ||
716 | + | ||
717 | +func (x *RoleEndBattleRsp) ProtoReflect() protoreflect.Message { | ||
718 | + mi := &file_game_proto_msgTypes[12] | ||
719 | + if protoimpl.UnsafeEnabled && x != nil { | ||
720 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | ||
721 | + if ms.LoadMessageInfo() == nil { | ||
722 | + ms.StoreMessageInfo(mi) | ||
723 | + } | ||
724 | + return ms | ||
725 | + } | ||
726 | + return mi.MessageOf(x) | ||
727 | +} | ||
728 | + | ||
729 | +// Deprecated: Use RoleEndBattleRsp.ProtoReflect.Descriptor instead. | ||
730 | +func (*RoleEndBattleRsp) Descriptor() ([]byte, []int) { | ||
731 | + return file_game_proto_rawDescGZIP(), []int{12} | ||
732 | +} | ||
733 | + | ||
734 | +func (x *RoleEndBattleRsp) GetRoleLevel() int32 { | ||
735 | + if x != nil { | ||
736 | + return x.RoleLevel | ||
737 | + } | ||
738 | + return 0 | ||
739 | +} | ||
740 | + | ||
741 | +func (x *RoleEndBattleRsp) GetRoleExp() int32 { | ||
742 | + if x != nil { | ||
743 | + return x.RoleExp | ||
744 | + } | ||
745 | + return 0 | ||
746 | +} | ||
747 | + | ||
748 | +func (x *RoleEndBattleRsp) GetHero() *Hero { | ||
749 | + if x != nil { | ||
750 | + return x.Hero | ||
751 | + } | ||
752 | + return nil | ||
753 | +} | ||
754 | + | ||
755 | +func (x *RoleEndBattleRsp) GetReward() string { | ||
756 | + if x != nil { | ||
757 | + return x.Reward | ||
758 | + } | ||
759 | + return "" | ||
760 | +} | ||
761 | + | ||
573 | //ResponseCmd EquipmentDelReq | 762 | //ResponseCmd EquipmentDelReq |
574 | type EquipmentDelReq struct { | 763 | type EquipmentDelReq struct { |
575 | state protoimpl.MessageState | 764 | state protoimpl.MessageState |
@@ -582,7 +771,7 @@ type EquipmentDelReq struct { | @@ -582,7 +771,7 @@ type EquipmentDelReq struct { | ||
582 | func (x *EquipmentDelReq) Reset() { | 771 | func (x *EquipmentDelReq) Reset() { |
583 | *x = EquipmentDelReq{} | 772 | *x = EquipmentDelReq{} |
584 | if protoimpl.UnsafeEnabled { | 773 | if protoimpl.UnsafeEnabled { |
585 | - mi := &file_game_proto_msgTypes[10] | 774 | + mi := &file_game_proto_msgTypes[13] |
586 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 775 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
587 | ms.StoreMessageInfo(mi) | 776 | ms.StoreMessageInfo(mi) |
588 | } | 777 | } |
@@ -595,7 +784,7 @@ func (x *EquipmentDelReq) String() string { | @@ -595,7 +784,7 @@ func (x *EquipmentDelReq) String() string { | ||
595 | func (*EquipmentDelReq) ProtoMessage() {} | 784 | func (*EquipmentDelReq) ProtoMessage() {} |
596 | 785 | ||
597 | func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { | 786 | func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { |
598 | - mi := &file_game_proto_msgTypes[10] | 787 | + mi := &file_game_proto_msgTypes[13] |
599 | if protoimpl.UnsafeEnabled && x != nil { | 788 | if protoimpl.UnsafeEnabled && x != nil { |
600 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 789 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
601 | if ms.LoadMessageInfo() == nil { | 790 | if ms.LoadMessageInfo() == nil { |
@@ -608,7 +797,7 @@ func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { | @@ -608,7 +797,7 @@ func (x *EquipmentDelReq) ProtoReflect() protoreflect.Message { | ||
608 | 797 | ||
609 | // Deprecated: Use EquipmentDelReq.ProtoReflect.Descriptor instead. | 798 | // Deprecated: Use EquipmentDelReq.ProtoReflect.Descriptor instead. |
610 | func (*EquipmentDelReq) Descriptor() ([]byte, []int) { | 799 | func (*EquipmentDelReq) Descriptor() ([]byte, []int) { |
611 | - return file_game_proto_rawDescGZIP(), []int{10} | 800 | + return file_game_proto_rawDescGZIP(), []int{13} |
612 | } | 801 | } |
613 | 802 | ||
614 | func (x *EquipmentDelReq) GetId() string { | 803 | func (x *EquipmentDelReq) GetId() string { |
@@ -630,7 +819,7 @@ type EquipmentAddRsp struct { | @@ -630,7 +819,7 @@ type EquipmentAddRsp struct { | ||
630 | func (x *EquipmentAddRsp) Reset() { | 819 | func (x *EquipmentAddRsp) Reset() { |
631 | *x = EquipmentAddRsp{} | 820 | *x = EquipmentAddRsp{} |
632 | if protoimpl.UnsafeEnabled { | 821 | if protoimpl.UnsafeEnabled { |
633 | - mi := &file_game_proto_msgTypes[11] | 822 | + mi := &file_game_proto_msgTypes[14] |
634 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 823 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
635 | ms.StoreMessageInfo(mi) | 824 | ms.StoreMessageInfo(mi) |
636 | } | 825 | } |
@@ -643,7 +832,7 @@ func (x *EquipmentAddRsp) String() string { | @@ -643,7 +832,7 @@ func (x *EquipmentAddRsp) String() string { | ||
643 | func (*EquipmentAddRsp) ProtoMessage() {} | 832 | func (*EquipmentAddRsp) ProtoMessage() {} |
644 | 833 | ||
645 | func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { | 834 | func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { |
646 | - mi := &file_game_proto_msgTypes[11] | 835 | + mi := &file_game_proto_msgTypes[14] |
647 | if protoimpl.UnsafeEnabled && x != nil { | 836 | if protoimpl.UnsafeEnabled && x != nil { |
648 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | 837 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
649 | if ms.LoadMessageInfo() == nil { | 838 | if ms.LoadMessageInfo() == nil { |
@@ -656,7 +845,7 @@ func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { | @@ -656,7 +845,7 @@ func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { | ||
656 | 845 | ||
657 | // Deprecated: Use EquipmentAddRsp.ProtoReflect.Descriptor instead. | 846 | // Deprecated: Use EquipmentAddRsp.ProtoReflect.Descriptor instead. |
658 | func (*EquipmentAddRsp) Descriptor() ([]byte, []int) { | 847 | func (*EquipmentAddRsp) Descriptor() ([]byte, []int) { |
659 | - return file_game_proto_rawDescGZIP(), []int{11} | 848 | + return file_game_proto_rawDescGZIP(), []int{14} |
660 | } | 849 | } |
661 | 850 | ||
662 | func (x *EquipmentAddRsp) GetEquip() *Equipment { | 851 | func (x *EquipmentAddRsp) GetEquip() *Equipment { |
@@ -712,14 +901,34 @@ var file_game_proto_rawDesc = []byte{ | @@ -712,14 +901,34 @@ var file_game_proto_rawDesc = []byte{ | ||
712 | 0x6d, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, | 901 | 0x6d, 0x73, 0x22, 0x39, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, |
713 | 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, | 902 | 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, |
714 | 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, | 903 | 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, |
715 | - 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x21, 0x0a, | ||
716 | - 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, | ||
717 | - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, | ||
718 | - 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, | ||
719 | - 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, | ||
720 | - 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, | ||
721 | - 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x42, 0x0a, 0x5a, 0x08, | ||
722 | - 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | 904 | + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x50, 0x0a, |
905 | + 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, | ||
906 | + 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, | ||
907 | + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, | ||
908 | + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, | ||
909 | + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x22, | ||
910 | + 0x62, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, | ||
911 | + 0x52, 0x65, 0x71, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x5f, 0x69, | ||
912 | + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, | ||
913 | + 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, | ||
914 | + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x63, 0x61, 0x72, 0x62, 0x6f, 0x6e, 0x49, 0x64, 0x12, | ||
915 | + 0x12, 0x0a, 0x04, 0x70, 0x61, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x70, | ||
916 | + 0x61, 0x73, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, | ||
917 | + 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x6f, 0x6c, 0x65, | ||
918 | + 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x6f, | ||
919 | + 0x6c, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x72, 0x6f, 0x6c, 0x65, 0x5f, | ||
920 | + 0x65, 0x78, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x45, | ||
921 | + 0x78, 0x70, 0x12, 0x20, 0x0a, 0x04, 0x68, 0x65, 0x72, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, | ||
922 | + 0x32, 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x48, 0x65, 0x72, 0x6f, 0x52, 0x04, | ||
923 | + 0x68, 0x65, 0x72, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x18, 0x04, | ||
924 | + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x22, 0x21, 0x0a, 0x0f, | ||
925 | + 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, | ||
926 | + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, | ||
927 | + 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, | ||
928 | + 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, | ||
929 | + 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, | ||
930 | + 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x42, 0x0a, 0x5a, 0x08, 0x2e, | ||
931 | + 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||
723 | } | 932 | } |
724 | 933 | ||
725 | var ( | 934 | var ( |
@@ -734,7 +943,7 @@ func file_game_proto_rawDescGZIP() []byte { | @@ -734,7 +943,7 @@ func file_game_proto_rawDescGZIP() []byte { | ||
734 | return file_game_proto_rawDescData | 943 | return file_game_proto_rawDescData |
735 | } | 944 | } |
736 | 945 | ||
737 | -var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 12) | 946 | +var file_game_proto_msgTypes = make([]protoimpl.MessageInfo, 15) |
738 | var file_game_proto_goTypes = []interface{}{ | 947 | var file_game_proto_goTypes = []interface{}{ |
739 | (*HeartReq)(nil), // 0: game.HeartReq | 948 | (*HeartReq)(nil), // 0: game.HeartReq |
740 | (*HeartRsp)(nil), // 1: game.HeartRsp | 949 | (*HeartRsp)(nil), // 1: game.HeartRsp |
@@ -746,26 +955,30 @@ var file_game_proto_goTypes = []interface{}{ | @@ -746,26 +955,30 @@ var file_game_proto_goTypes = []interface{}{ | ||
746 | (*RoleUpdatePropertyRsp)(nil), // 7: game.RoleUpdatePropertyRsp | 955 | (*RoleUpdatePropertyRsp)(nil), // 7: game.RoleUpdatePropertyRsp |
747 | (*RoleUpdateItemsRsp)(nil), // 8: game.RoleUpdateItemsRsp | 956 | (*RoleUpdateItemsRsp)(nil), // 8: game.RoleUpdateItemsRsp |
748 | (*RoleClearItemsReq)(nil), // 9: game.RoleClearItemsReq | 957 | (*RoleClearItemsReq)(nil), // 9: game.RoleClearItemsReq |
749 | - (*EquipmentDelReq)(nil), // 10: game.EquipmentDelReq | ||
750 | - (*EquipmentAddRsp)(nil), // 11: game.EquipmentAddRsp | ||
751 | - (*Team)(nil), // 12: models.Team | ||
752 | - (*Role)(nil), // 13: models.Role | ||
753 | - (*Hero)(nil), // 14: models.Hero | ||
754 | - (*Equipment)(nil), // 15: models.Equipment | 958 | + (*RoleStartBattleReq)(nil), // 10: game.RoleStartBattleReq |
959 | + (*RoleEndBattleReq)(nil), // 11: game.RoleEndBattleReq | ||
960 | + (*RoleEndBattleRsp)(nil), // 12: game.RoleEndBattleRsp | ||
961 | + (*EquipmentDelReq)(nil), // 13: game.EquipmentDelReq | ||
962 | + (*EquipmentAddRsp)(nil), // 14: game.EquipmentAddRsp | ||
963 | + (*Team)(nil), // 15: models.Team | ||
964 | + (*Role)(nil), // 16: models.Role | ||
965 | + (*Hero)(nil), // 17: models.Hero | ||
966 | + (*Equipment)(nil), // 18: models.Equipment | ||
755 | } | 967 | } |
756 | var file_game_proto_depIdxs = []int32{ | 968 | var file_game_proto_depIdxs = []int32{ |
757 | - 12, // 0: game.ChangeTeamReq.team:type_name -> models.Team | ||
758 | - 13, // 1: game.RoleRsp.role:type_name -> models.Role | ||
759 | - 14, // 2: game.RoleRsp.hero:type_name -> models.Hero | ||
760 | - 12, // 3: game.RoleRsp.team:type_name -> models.Team | ||
761 | - 15, // 4: game.RoleRsp.equipments:type_name -> models.Equipment | ||
762 | - 13, // 5: game.RoleUpdatePropertyRsp.role:type_name -> models.Role | ||
763 | - 15, // 6: game.EquipmentAddRsp.equip:type_name -> models.Equipment | ||
764 | - 7, // [7:7] is the sub-list for method output_type | ||
765 | - 7, // [7:7] is the sub-list for method input_type | ||
766 | - 7, // [7:7] is the sub-list for extension type_name | ||
767 | - 7, // [7:7] is the sub-list for extension extendee | ||
768 | - 0, // [0:7] is the sub-list for field type_name | 969 | + 15, // 0: game.ChangeTeamReq.team:type_name -> models.Team |
970 | + 16, // 1: game.RoleRsp.role:type_name -> models.Role | ||
971 | + 17, // 2: game.RoleRsp.hero:type_name -> models.Hero | ||
972 | + 15, // 3: game.RoleRsp.team:type_name -> models.Team | ||
973 | + 18, // 4: game.RoleRsp.equipments:type_name -> models.Equipment | ||
974 | + 16, // 5: game.RoleUpdatePropertyRsp.role:type_name -> models.Role | ||
975 | + 17, // 6: game.RoleEndBattleRsp.hero:type_name -> models.Hero | ||
976 | + 18, // 7: game.EquipmentAddRsp.equip:type_name -> models.Equipment | ||
977 | + 8, // [8:8] is the sub-list for method output_type | ||
978 | + 8, // [8:8] is the sub-list for method input_type | ||
979 | + 8, // [8:8] is the sub-list for extension type_name | ||
980 | + 8, // [8:8] is the sub-list for extension extendee | ||
981 | + 0, // [0:8] is the sub-list for field type_name | ||
769 | } | 982 | } |
770 | 983 | ||
771 | func init() { file_game_proto_init() } | 984 | func init() { file_game_proto_init() } |
@@ -896,7 +1109,7 @@ func file_game_proto_init() { | @@ -896,7 +1109,7 @@ func file_game_proto_init() { | ||
896 | } | 1109 | } |
897 | } | 1110 | } |
898 | file_game_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { | 1111 | file_game_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { |
899 | - switch v := v.(*EquipmentDelReq); i { | 1112 | + switch v := v.(*RoleStartBattleReq); i { |
900 | case 0: | 1113 | case 0: |
901 | return &v.state | 1114 | return &v.state |
902 | case 1: | 1115 | case 1: |
@@ -908,6 +1121,42 @@ func file_game_proto_init() { | @@ -908,6 +1121,42 @@ func file_game_proto_init() { | ||
908 | } | 1121 | } |
909 | } | 1122 | } |
910 | file_game_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { | 1123 | file_game_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { |
1124 | + switch v := v.(*RoleEndBattleReq); i { | ||
1125 | + case 0: | ||
1126 | + return &v.state | ||
1127 | + case 1: | ||
1128 | + return &v.sizeCache | ||
1129 | + case 2: | ||
1130 | + return &v.unknownFields | ||
1131 | + default: | ||
1132 | + return nil | ||
1133 | + } | ||
1134 | + } | ||
1135 | + file_game_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { | ||
1136 | + switch v := v.(*RoleEndBattleRsp); i { | ||
1137 | + case 0: | ||
1138 | + return &v.state | ||
1139 | + case 1: | ||
1140 | + return &v.sizeCache | ||
1141 | + case 2: | ||
1142 | + return &v.unknownFields | ||
1143 | + default: | ||
1144 | + return nil | ||
1145 | + } | ||
1146 | + } | ||
1147 | + file_game_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { | ||
1148 | + switch v := v.(*EquipmentDelReq); i { | ||
1149 | + case 0: | ||
1150 | + return &v.state | ||
1151 | + case 1: | ||
1152 | + return &v.sizeCache | ||
1153 | + case 2: | ||
1154 | + return &v.unknownFields | ||
1155 | + default: | ||
1156 | + return nil | ||
1157 | + } | ||
1158 | + } | ||
1159 | + file_game_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { | ||
911 | switch v := v.(*EquipmentAddRsp); i { | 1160 | switch v := v.(*EquipmentAddRsp); i { |
912 | case 0: | 1161 | case 0: |
913 | return &v.state | 1162 | return &v.state |
@@ -926,7 +1175,7 @@ func file_game_proto_init() { | @@ -926,7 +1175,7 @@ func file_game_proto_init() { | ||
926 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 1175 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
927 | RawDescriptor: file_game_proto_rawDesc, | 1176 | RawDescriptor: file_game_proto_rawDesc, |
928 | NumEnums: 0, | 1177 | NumEnums: 0, |
929 | - NumMessages: 12, | 1178 | + NumMessages: 15, |
930 | NumExtensions: 0, | 1179 | NumExtensions: 0, |
931 | NumServices: 0, | 1180 | NumServices: 0, |
932 | }, | 1181 | }, |
pb/models.pb.go
@@ -95,6 +95,7 @@ type Hero struct { | @@ -95,6 +95,7 @@ type Hero struct { | ||
95 | ReinCount int32 `protobuf:"varint,5,opt,name=rein_count,json=reinCount,proto3" json:"rein_count,omitempty"` | 95 | ReinCount int32 `protobuf:"varint,5,opt,name=rein_count,json=reinCount,proto3" json:"rein_count,omitempty"` |
96 | ReinPoint int32 `protobuf:"varint,6,opt,name=rein_point,json=reinPoint,proto3" json:"rein_point,omitempty"` | 96 | ReinPoint int32 `protobuf:"varint,6,opt,name=rein_point,json=reinPoint,proto3" json:"rein_point,omitempty"` |
97 | Equipments string `protobuf:"bytes,7,opt,name=equipments,proto3" json:"equipments,omitempty"` //"id=type id1=type1" | 97 | Equipments string `protobuf:"bytes,7,opt,name=equipments,proto3" json:"equipments,omitempty"` //"id=type id1=type1" |
98 | + Exp int64 `protobuf:"varint,8,opt,name=exp,proto3" json:"exp,omitempty"` | ||
98 | } | 99 | } |
99 | 100 | ||
100 | func (x *Hero) Reset() { | 101 | func (x *Hero) Reset() { |
@@ -178,6 +179,13 @@ func (x *Hero) GetEquipments() string { | @@ -178,6 +179,13 @@ func (x *Hero) GetEquipments() string { | ||
178 | return "" | 179 | return "" |
179 | } | 180 | } |
180 | 181 | ||
182 | +func (x *Hero) GetExp() int64 { | ||
183 | + if x != nil { | ||
184 | + return x.Exp | ||
185 | + } | ||
186 | + return 0 | ||
187 | +} | ||
188 | + | ||
181 | type Equipment struct { | 189 | type Equipment struct { |
182 | state protoimpl.MessageState | 190 | state protoimpl.MessageState |
183 | sizeCache protoimpl.SizeCache | 191 | sizeCache protoimpl.SizeCache |
@@ -459,22 +467,25 @@ type Role struct { | @@ -459,22 +467,25 @@ type Role struct { | ||
459 | sizeCache protoimpl.SizeCache | 467 | sizeCache protoimpl.SizeCache |
460 | unknownFields protoimpl.UnknownFields | 468 | unknownFields protoimpl.UnknownFields |
461 | 469 | ||
462 | - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" | ||
463 | - Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty" index:"unique"` // @inject_tag: index:"unique" | ||
464 | - Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` | ||
465 | - Nick string `protobuf:"bytes,4,opt,name=nick,proto3" json:"nick,omitempty"` | ||
466 | - Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"` | ||
467 | - Exp int64 `protobuf:"varint,6,opt,name=exp,proto3" json:"exp,omitempty"` | ||
468 | - Hp int64 `protobuf:"varint,7,opt,name=hp,proto3" json:"hp,omitempty"` | ||
469 | - HpMax int64 `protobuf:"varint,8,opt,name=hp_max,json=hpMax,proto3" json:"hp_max,omitempty"` | ||
470 | - BuyR string `protobuf:"bytes,11,opt,name=buy_r,json=buyR,proto3" json:"buy_r,omitempty"` | ||
471 | - PayR string `protobuf:"bytes,12,opt,name=pay_r,json=payR,proto3" json:"pay_r,omitempty"` | ||
472 | - Del bool `protobuf:"varint,13,opt,name=del,proto3" json:"del,omitempty"` | ||
473 | - Incres map[string]uint32 `protobuf:"bytes,14,rep,name=incres,proto3" json:"incres,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | ||
474 | - Items string `protobuf:"bytes,15,opt,name=items,proto3" json:"items,omitempty"` //物品 "id=count id2=count2" | ||
475 | - Clotheslimit uint32 `protobuf:"varint,16,opt,name=clotheslimit,proto3" json:"clotheslimit,omitempty"` | ||
476 | - Weaponslimit uint32 `protobuf:"varint,17,opt,name=weaponslimit,proto3" json:"weaponslimit,omitempty"` | ||
477 | - Otherlimit uint32 `protobuf:"varint,18,opt,name=otherlimit,proto3" json:"otherlimit,omitempty"` | 470 | + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" |
471 | + Uid string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid,omitempty" index:"unique"` // @inject_tag: index:"unique" | ||
472 | + Device string `protobuf:"bytes,3,opt,name=device,proto3" json:"device,omitempty"` | ||
473 | + Nick string `protobuf:"bytes,4,opt,name=nick,proto3" json:"nick,omitempty"` | ||
474 | + Level int32 `protobuf:"varint,5,opt,name=level,proto3" json:"level,omitempty"` | ||
475 | + Exp int32 `protobuf:"varint,6,opt,name=exp,proto3" json:"exp,omitempty"` | ||
476 | + Hp int64 `protobuf:"varint,7,opt,name=hp,proto3" json:"hp,omitempty"` | ||
477 | + HpMax int64 `protobuf:"varint,8,opt,name=hp_max,json=hpMax,proto3" json:"hp_max,omitempty"` | ||
478 | + BuyR string `protobuf:"bytes,11,opt,name=buy_r,json=buyR,proto3" json:"buy_r,omitempty"` | ||
479 | + PayR string `protobuf:"bytes,12,opt,name=pay_r,json=payR,proto3" json:"pay_r,omitempty"` | ||
480 | + Del bool `protobuf:"varint,13,opt,name=del,proto3" json:"del,omitempty"` | ||
481 | + Incres map[string]uint32 `protobuf:"bytes,14,rep,name=incres,proto3" json:"incres,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` | ||
482 | + Items string `protobuf:"bytes,15,opt,name=items,proto3" json:"items,omitempty"` //物品 "id=count id2=count2" | ||
483 | + Clotheslimit uint32 `protobuf:"varint,16,opt,name=clotheslimit,proto3" json:"clotheslimit,omitempty"` | ||
484 | + Weaponslimit uint32 `protobuf:"varint,17,opt,name=weaponslimit,proto3" json:"weaponslimit,omitempty"` | ||
485 | + Otherlimit uint32 `protobuf:"varint,18,opt,name=otherlimit,proto3" json:"otherlimit,omitempty"` | ||
486 | + Jewelrylimit uint32 `protobuf:"varint,19,opt,name=jewelrylimit,proto3" json:"jewelrylimit,omitempty"` | ||
487 | + Materiallimit uint32 `protobuf:"varint,20,opt,name=materiallimit,proto3" json:"materiallimit,omitempty"` | ||
488 | + PassChapters map[int32]int32 `protobuf:"bytes,21,rep,name=pass_chapters,json=passChapters,proto3" json:"pass_chapters,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` // 通关记录 | ||
478 | } | 489 | } |
479 | 490 | ||
480 | func (x *Role) Reset() { | 491 | func (x *Role) Reset() { |
@@ -544,7 +555,7 @@ func (x *Role) GetLevel() int32 { | @@ -544,7 +555,7 @@ func (x *Role) GetLevel() int32 { | ||
544 | return 0 | 555 | return 0 |
545 | } | 556 | } |
546 | 557 | ||
547 | -func (x *Role) GetExp() int64 { | 558 | +func (x *Role) GetExp() int32 { |
548 | if x != nil { | 559 | if x != nil { |
549 | return x.Exp | 560 | return x.Exp |
550 | } | 561 | } |
@@ -621,6 +632,27 @@ func (x *Role) GetOtherlimit() uint32 { | @@ -621,6 +632,27 @@ func (x *Role) GetOtherlimit() uint32 { | ||
621 | return 0 | 632 | return 0 |
622 | } | 633 | } |
623 | 634 | ||
635 | +func (x *Role) GetJewelrylimit() uint32 { | ||
636 | + if x != nil { | ||
637 | + return x.Jewelrylimit | ||
638 | + } | ||
639 | + return 0 | ||
640 | +} | ||
641 | + | ||
642 | +func (x *Role) GetMateriallimit() uint32 { | ||
643 | + if x != nil { | ||
644 | + return x.Materiallimit | ||
645 | + } | ||
646 | + return 0 | ||
647 | +} | ||
648 | + | ||
649 | +func (x *Role) GetPassChapters() map[int32]int32 { | ||
650 | + if x != nil { | ||
651 | + return x.PassChapters | ||
652 | + } | ||
653 | + return nil | ||
654 | +} | ||
655 | + | ||
624 | var File_models_proto protoreflect.FileDescriptor | 656 | var File_models_proto protoreflect.FileDescriptor |
625 | 657 | ||
626 | var file_models_proto_rawDesc = []byte{ | 658 | var file_models_proto_rawDesc = []byte{ |
@@ -630,7 +662,7 @@ var file_models_proto_rawDesc = []byte{ | @@ -630,7 +662,7 @@ var file_models_proto_rawDesc = []byte{ | ||
630 | 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, | 662 | 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, |
631 | 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, | 663 | 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, |
632 | 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, | 664 | 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, |
633 | - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xb7, 0x01, 0x0a, 0x04, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, | 665 | + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xc9, 0x01, 0x0a, 0x04, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, |
634 | 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, | 666 | 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, |
635 | 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, | 667 | 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, |
636 | 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, | 668 | 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, |
@@ -641,62 +673,76 @@ var file_models_proto_rawDesc = []byte{ | @@ -641,62 +673,76 @@ var file_models_proto_rawDesc = []byte{ | ||
641 | 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, | 673 | 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, |
642 | 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, | 674 | 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, |
643 | 0x1e, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, | 675 | 0x1e, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, |
644 | - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, | ||
645 | - 0xa0, 0x01, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, | ||
646 | - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, | ||
647 | - 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, | ||
648 | - 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, | ||
649 | - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, | ||
650 | - 0x68, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, | ||
651 | - 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, | ||
652 | - 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, | ||
653 | - 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, | ||
654 | - 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, | ||
655 | - 0x74, 0x79, 0x22, 0x2c, 0x0a, 0x04, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, | ||
656 | - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, | ||
657 | - 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, | ||
658 | - 0x22, 0x80, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, | ||
659 | - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, | ||
660 | - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, | ||
661 | - 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x31, 0x18, 0x03, | ||
662 | - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x31, 0x12, 0x19, 0x0a, | ||
663 | - 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, | ||
664 | - 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, | ||
665 | - 0x5f, 0x69, 0x64, 0x33, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, | ||
666 | - 0x49, 0x64, 0x33, 0x22, 0x2f, 0x0a, 0x09, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, | ||
667 | - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, | ||
668 | - 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, | ||
669 | - 0x03, 0x76, 0x61, 0x6c, 0x22, 0xca, 0x03, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, | ||
670 | - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, | ||
671 | - 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, | ||
672 | - 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, | ||
673 | - 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x18, | ||
674 | - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6c, | ||
675 | - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, | ||
676 | - 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, | ||
677 | - 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, | ||
678 | - 0x02, 0x68, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x70, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x08, 0x20, | ||
679 | - 0x01, 0x28, 0x03, 0x52, 0x05, 0x68, 0x70, 0x4d, 0x61, 0x78, 0x12, 0x13, 0x0a, 0x05, 0x62, 0x75, | ||
680 | - 0x79, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x75, 0x79, 0x52, 0x12, | ||
681 | - 0x13, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x5f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, | ||
682 | - 0x70, 0x61, 0x79, 0x52, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, | ||
683 | - 0x08, 0x52, 0x03, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, | ||
684 | - 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, | ||
685 | - 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, | ||
686 | - 0x52, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, | ||
687 | - 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, | ||
688 | - 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x10, | ||
689 | - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, | ||
690 | - 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, | ||
691 | - 0x69, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, | ||
692 | - 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, | ||
693 | - 0x69, 0x6d, 0x69, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x74, 0x68, 0x65, | ||
694 | - 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, | ||
695 | - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, | ||
696 | - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, | ||
697 | - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, | ||
698 | - 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, | ||
699 | - 0x72, 0x6f, 0x74, 0x6f, 0x33, | 676 | + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, |
677 | + 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x65, 0x78, | ||
678 | + 0x70, 0x22, 0xa0, 0x01, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, | ||
679 | + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, | ||
680 | + 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, | ||
681 | + 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, | ||
682 | + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, | ||
683 | + 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, | ||
684 | + 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, 0x65, | ||
685 | + 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, | ||
686 | + 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x71, 0x75, | ||
687 | + 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, 0x61, | ||
688 | + 0x6c, 0x69, 0x74, 0x79, 0x22, 0x2c, 0x0a, 0x04, 0x50, 0x72, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02, | ||
689 | + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, | ||
690 | + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, | ||
691 | + 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, | ||
692 | + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, | ||
693 | + 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, | ||
694 | + 0x6c, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x31, | ||
695 | + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x31, 0x12, | ||
696 | + 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, | ||
697 | + 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x32, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, | ||
698 | + 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x33, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, | ||
699 | + 0x72, 0x6f, 0x49, 0x64, 0x33, 0x22, 0x2f, 0x0a, 0x09, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, | ||
700 | + 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, | ||
701 | + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, | ||
702 | + 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x9a, 0x05, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, | ||
703 | + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, | ||
704 | + 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, | ||
705 | + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, | ||
706 | + 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x69, 0x63, | ||
707 | + 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x12, 0x14, 0x0a, | ||
708 | + 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, | ||
709 | + 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, | ||
710 | + 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, | ||
711 | + 0x03, 0x52, 0x02, 0x68, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x70, 0x5f, 0x6d, 0x61, 0x78, 0x18, | ||
712 | + 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x68, 0x70, 0x4d, 0x61, 0x78, 0x12, 0x13, 0x0a, 0x05, | ||
713 | + 0x62, 0x75, 0x79, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x75, 0x79, | ||
714 | + 0x52, 0x12, 0x13, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x5f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, | ||
715 | + 0x52, 0x04, 0x70, 0x61, 0x79, 0x52, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x6c, 0x18, 0x0d, 0x20, | ||
716 | + 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x69, 0x6e, 0x63, 0x72, | ||
717 | + 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, | ||
718 | + 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, | ||
719 | + 0x72, 0x79, 0x52, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, | ||
720 | + 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, | ||
721 | + 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, | ||
722 | + 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, | ||
723 | + 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, | ||
724 | + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, 0x65, 0x61, 0x70, | ||
725 | + 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, | ||
726 | + 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x74, | ||
727 | + 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6a, 0x65, 0x77, 0x65, | ||
728 | + 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, | ||
729 | + 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x0d, | ||
730 | + 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x14, 0x20, | ||
731 | + 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x69, 0x6d, | ||
732 | + 0x69, 0x74, 0x12, 0x43, 0x0a, 0x0d, 0x70, 0x61, 0x73, 0x73, 0x5f, 0x63, 0x68, 0x61, 0x70, 0x74, | ||
733 | + 0x65, 0x72, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, 0x64, 0x65, | ||
734 | + 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x43, 0x68, 0x61, 0x70, | ||
735 | + 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x43, | ||
736 | + 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x63, 0x72, 0x65, | ||
737 | + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, | ||
738 | + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, | ||
739 | + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, | ||
740 | + 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, 0x43, 0x68, 0x61, 0x70, 0x74, 0x65, | ||
741 | + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, | ||
742 | + 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, | ||
743 | + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, | ||
744 | + 0x02, 0x38, 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, | ||
745 | + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | ||
700 | } | 746 | } |
701 | 747 | ||
702 | var ( | 748 | var ( |
@@ -711,7 +757,7 @@ func file_models_proto_rawDescGZIP() []byte { | @@ -711,7 +757,7 @@ func file_models_proto_rawDescGZIP() []byte { | ||
711 | return file_models_proto_rawDescData | 757 | return file_models_proto_rawDescData |
712 | } | 758 | } |
713 | 759 | ||
714 | -var file_models_proto_msgTypes = make([]protoimpl.MessageInfo, 8) | 760 | +var file_models_proto_msgTypes = make([]protoimpl.MessageInfo, 9) |
715 | var file_models_proto_goTypes = []interface{}{ | 761 | var file_models_proto_goTypes = []interface{}{ |
716 | (*Account)(nil), // 0: models.Account | 762 | (*Account)(nil), // 0: models.Account |
717 | (*Hero)(nil), // 1: models.Hero | 763 | (*Hero)(nil), // 1: models.Hero |
@@ -721,14 +767,16 @@ var file_models_proto_goTypes = []interface{}{ | @@ -721,14 +767,16 @@ var file_models_proto_goTypes = []interface{}{ | ||
721 | (*Increment)(nil), // 5: models.Increment | 767 | (*Increment)(nil), // 5: models.Increment |
722 | (*Role)(nil), // 6: models.Role | 768 | (*Role)(nil), // 6: models.Role |
723 | nil, // 7: models.Role.IncresEntry | 769 | nil, // 7: models.Role.IncresEntry |
770 | + nil, // 8: models.Role.PassChaptersEntry | ||
724 | } | 771 | } |
725 | var file_models_proto_depIdxs = []int32{ | 772 | var file_models_proto_depIdxs = []int32{ |
726 | 7, // 0: models.Role.incres:type_name -> models.Role.IncresEntry | 773 | 7, // 0: models.Role.incres:type_name -> models.Role.IncresEntry |
727 | - 1, // [1:1] is the sub-list for method output_type | ||
728 | - 1, // [1:1] is the sub-list for method input_type | ||
729 | - 1, // [1:1] is the sub-list for extension type_name | ||
730 | - 1, // [1:1] is the sub-list for extension extendee | ||
731 | - 0, // [0:1] is the sub-list for field type_name | 774 | + 8, // 1: models.Role.pass_chapters:type_name -> models.Role.PassChaptersEntry |
775 | + 2, // [2:2] is the sub-list for method output_type | ||
776 | + 2, // [2:2] is the sub-list for method input_type | ||
777 | + 2, // [2:2] is the sub-list for extension type_name | ||
778 | + 2, // [2:2] is the sub-list for extension extendee | ||
779 | + 0, // [0:2] is the sub-list for field type_name | ||
732 | } | 780 | } |
733 | 781 | ||
734 | func init() { file_models_proto_init() } | 782 | func init() { file_models_proto_init() } |
@@ -828,7 +876,7 @@ func file_models_proto_init() { | @@ -828,7 +876,7 @@ func file_models_proto_init() { | ||
828 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), | 876 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
829 | RawDescriptor: file_models_proto_rawDesc, | 877 | RawDescriptor: file_models_proto_rawDesc, |
830 | NumEnums: 0, | 878 | NumEnums: 0, |
831 | - NumMessages: 8, | 879 | + NumMessages: 9, |
832 | NumExtensions: 0, | 880 | NumExtensions: 0, |
833 | NumServices: 0, | 881 | NumServices: 0, |
834 | }, | 882 | }, |
pb/protocode.pb.go
@@ -35,8 +35,12 @@ const ( | @@ -35,8 +35,12 @@ const ( | ||
35 | ProtoCode_RoleUpdatePropertyRsp ProtoCode = 9 | 35 | ProtoCode_RoleUpdatePropertyRsp ProtoCode = 9 |
36 | ProtoCode_RoleUpdateItemsRsp ProtoCode = 10 | 36 | ProtoCode_RoleUpdateItemsRsp ProtoCode = 10 |
37 | ProtoCode_RoleClearItemsReq ProtoCode = 11 | 37 | ProtoCode_RoleClearItemsReq ProtoCode = 11 |
38 | - ProtoCode_EquipmentDelReq ProtoCode = 12 | ||
39 | - ProtoCode_EquipmentAddRsp ProtoCode = 13 | 38 | + ProtoCode_RoleStartBattleReq ProtoCode = 12 |
39 | + ProtoCode_RoleEndBattleReq ProtoCode = 13 | ||
40 | + ProtoCode_RoleEndBattleRsp ProtoCode = 14 | ||
41 | + ProtoCode_RoleRewardRsp ProtoCode = 15 | ||
42 | + ProtoCode_EquipmentDelReq ProtoCode = 16 | ||
43 | + ProtoCode_EquipmentAddRsp ProtoCode = 17 | ||
40 | ) | 44 | ) |
41 | 45 | ||
42 | // Enum value maps for ProtoCode. | 46 | // Enum value maps for ProtoCode. |
@@ -54,8 +58,12 @@ var ( | @@ -54,8 +58,12 @@ var ( | ||
54 | 9: "RoleUpdatePropertyRsp", | 58 | 9: "RoleUpdatePropertyRsp", |
55 | 10: "RoleUpdateItemsRsp", | 59 | 10: "RoleUpdateItemsRsp", |
56 | 11: "RoleClearItemsReq", | 60 | 11: "RoleClearItemsReq", |
57 | - 12: "EquipmentDelReq", | ||
58 | - 13: "EquipmentAddRsp", | 61 | + 12: "RoleStartBattleReq", |
62 | + 13: "RoleEndBattleReq", | ||
63 | + 14: "RoleEndBattleRsp", | ||
64 | + 15: "RoleRewardRsp", | ||
65 | + 16: "EquipmentDelReq", | ||
66 | + 17: "EquipmentAddRsp", | ||
59 | } | 67 | } |
60 | ProtoCode_value = map[string]int32{ | 68 | ProtoCode_value = map[string]int32{ |
61 | "UNKNOWN": 0, | 69 | "UNKNOWN": 0, |
@@ -70,8 +78,12 @@ var ( | @@ -70,8 +78,12 @@ var ( | ||
70 | "RoleUpdatePropertyRsp": 9, | 78 | "RoleUpdatePropertyRsp": 9, |
71 | "RoleUpdateItemsRsp": 10, | 79 | "RoleUpdateItemsRsp": 10, |
72 | "RoleClearItemsReq": 11, | 80 | "RoleClearItemsReq": 11, |
73 | - "EquipmentDelReq": 12, | ||
74 | - "EquipmentAddRsp": 13, | 81 | + "RoleStartBattleReq": 12, |
82 | + "RoleEndBattleReq": 13, | ||
83 | + "RoleEndBattleRsp": 14, | ||
84 | + "RoleRewardRsp": 15, | ||
85 | + "EquipmentDelReq": 16, | ||
86 | + "EquipmentAddRsp": 17, | ||
75 | } | 87 | } |
76 | ) | 88 | ) |
77 | 89 | ||
@@ -106,7 +118,7 @@ var File_protocode_proto protoreflect.FileDescriptor | @@ -106,7 +118,7 @@ var File_protocode_proto protoreflect.FileDescriptor | ||
106 | 118 | ||
107 | var file_protocode_proto_rawDesc = []byte{ | 119 | var file_protocode_proto_rawDesc = []byte{ |
108 | 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, | 120 | 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
109 | - 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0x8a, 0x02, 0x0a, | 121 | + 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xe1, 0x02, 0x0a, |
110 | 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, | 122 | 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, |
111 | 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, | 123 | 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, |
112 | 0x52, 0x73, 0x70, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x65, | 124 | 0x52, 0x73, 0x70, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x65, |
@@ -121,10 +133,16 @@ var file_protocode_proto_rawDesc = []byte{ | @@ -121,10 +133,16 @@ var file_protocode_proto_rawDesc = []byte{ | ||
121 | 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, | 133 | 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, |
122 | 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, | 134 | 0x65, 0x6d, 0x73, 0x52, 0x73, 0x70, 0x10, 0x0a, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x6f, 0x6c, 0x65, |
123 | 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x10, 0x0b, 0x12, | 135 | 0x43, 0x6c, 0x65, 0x61, 0x72, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x10, 0x0b, 0x12, |
124 | - 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, | ||
125 | - 0x65, 0x71, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, | ||
126 | - 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x10, 0x0d, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, | ||
127 | - 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | 136 | + 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x53, 0x74, 0x61, 0x72, 0x74, 0x42, 0x61, 0x74, 0x74, |
137 | + 0x6c, 0x65, 0x52, 0x65, 0x71, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, | ||
138 | + 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x10, 0x0d, 0x12, 0x14, 0x0a, | ||
139 | + 0x10, 0x52, 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, | ||
140 | + 0x70, 0x10, 0x0e, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x77, 0x61, 0x72, | ||
141 | + 0x64, 0x52, 0x73, 0x70, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, | ||
142 | + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x10, 0x10, 0x12, 0x13, 0x0a, 0x0f, 0x45, | ||
143 | + 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x52, 0x73, 0x70, 0x10, 0x11, | ||
144 | + 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, | ||
145 | + 0x6f, 0x74, 0x6f, 0x33, | ||
128 | } | 146 | } |
129 | 147 | ||
130 | var ( | 148 | var ( |