Commit 23822e2f9bcf234655c128e8913d3ab7e9f6f318
1 parent
a0fb8df9
fix: update protocode. add account 版本信息协议
Showing
26 changed files
with
541 additions
and
302 deletions
Show diff stats
cmd/gameserver/action/HeroAction.go
cmd/gameserver/action/RoleAction.go
... | ... | @@ -61,9 +61,9 @@ func CreateRpc(role1 *models.RoleModel, msg components.IMessage) (int32, interfa |
61 | 61 | } |
62 | 62 | |
63 | 63 | role = models.NewRole(roleId) |
64 | - role.Role.Uid = req.Token | |
65 | - role.Role.Level = 1 | |
66 | - role.Role.Nick = getRandomName() | |
64 | + role.Data.Uid = req.Token | |
65 | + role.Data.Level = 1 | |
66 | + role.Data.Nick = getRandomName() | |
67 | 67 | if err := role.Create(); err != nil { |
68 | 68 | logger.Error("CreateRpc role create err: %v", err) |
69 | 69 | return 4, nil |
... | ... | @@ -161,7 +161,7 @@ func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, i |
161 | 161 | return 1, nil |
162 | 162 | } |
163 | 163 | chapterInfo := csvdata.Get().TbRogueChapter.Get(req.ChapterId) |
164 | - chapterCount, first := role.Role.Passchapters[req.ChapterId] | |
164 | + chapterCount, first := role.Data.Passchapters[req.ChapterId] | |
165 | 165 | carbonInfo, ok := chapterInfo.Carbons[req.CarbonId] |
166 | 166 | if !ok { |
167 | 167 | logger.Error("carbonInfo not exists") |
... | ... | @@ -177,14 +177,14 @@ func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, i |
177 | 177 | |
178 | 178 | reward := make(common.IMapStringNum) |
179 | 179 | if !first { |
180 | - role.Role.Passchapters[req.ChapterId] = 1 | |
180 | + role.Data.Passchapters[req.ChapterId] = 1 | |
181 | 181 | for k, v := range common.StringToMapNum(carbonInfo.FirstAward) { |
182 | 182 | reward[k] = v |
183 | 183 | } |
184 | 184 | } else { |
185 | - role.Role.Passchapters[req.ChapterId] = chapterCount + 1 | |
185 | + role.Data.Passchapters[req.ChapterId] = chapterCount + 1 | |
186 | 186 | } |
187 | - role.SetProperty("passchapters", role.Role.Passchapters) | |
187 | + role.SetProperty("passchapters", role.Data.Passchapters) | |
188 | 188 | |
189 | 189 | for k, v := range common.StringToMapNum(carbonInfo.NormalAward) { |
190 | 190 | rv, ok := reward[k] |
... | ... | @@ -214,13 +214,13 @@ func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, i |
214 | 214 | |
215 | 215 | //team exp |
216 | 216 | heros := make([]*pb.Hero, 3) |
217 | - t := team.(*models.TeamModel).Team | |
217 | + t := team.(*models.TeamModel).Data | |
218 | 218 | h1, ok := role.Heros[t.HeroId1] |
219 | 219 | if ok { |
220 | 220 | level, exp = h1.(*models.HeroModel).UpLevel(amount) |
221 | 221 | h1.SetProperty("level", level) |
222 | 222 | h1.SetProperty("exp", exp) |
223 | - heros[0] = h1.(*models.HeroModel).Hero | |
223 | + heros[0] = h1.(*models.HeroModel).Data | |
224 | 224 | } |
225 | 225 | |
226 | 226 | h2, ok := role.Heros[t.HeroId2] |
... | ... | @@ -228,7 +228,7 @@ func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, i |
228 | 228 | level, exp = h2.(*models.HeroModel).UpLevel(amount) |
229 | 229 | h2.SetProperty("level", level) |
230 | 230 | h2.SetProperty("exp", exp) |
231 | - heros[1] = h2.(*models.HeroModel).Hero | |
231 | + heros[1] = h2.(*models.HeroModel).Data | |
232 | 232 | } |
233 | 233 | |
234 | 234 | h3, ok := role.Heros[t.HeroId3] |
... | ... | @@ -236,7 +236,7 @@ func RoleEndBattleRpc(role *models.RoleModel, msg components.IMessage) (int32, i |
236 | 236 | level, exp = h3.(*models.HeroModel).UpLevel(amount) |
237 | 237 | h3.SetProperty("level", level) |
238 | 238 | h3.SetProperty("exp", exp) |
239 | - heros[2] = h3.(*models.HeroModel).Hero | |
239 | + heros[2] = h3.(*models.HeroModel).Data | |
240 | 240 | } |
241 | 241 | |
242 | 242 | rsp.RoleExpamount = amount | ... | ... |
cmd/gameserver/gmaction/GmAction.go
cmd/gameserver/plugin/plugin.go
cmd/gameserver/service/agent.go
... | ... | @@ -40,8 +40,8 @@ func (c *Agent) SetSchema(schema components.ISchema) { |
40 | 40 | c.Role = schema.(*models.RoleModel) |
41 | 41 | c.Role.SetConn(c) |
42 | 42 | |
43 | - c.Server.GetConnManage().AddRID(c.Role.Role.Id, c.IConnection.GetID()) | |
44 | - c.Server.GetConnManage().AddUID(c.Role.Role.Uid, c.IConnection.GetID()) | |
43 | + c.Server.GetConnManage().AddRID(c.Role.Data.Id, c.IConnection.GetID()) | |
44 | + c.Server.GetConnManage().AddUID(c.Role.Data.Uid, c.IConnection.GetID()) | |
45 | 45 | } |
46 | 46 | |
47 | 47 | func (c *Agent) GetSchema() components.ISchema { |
... | ... | @@ -77,7 +77,7 @@ func (c *Agent) OnLoginQuery(msg components.IMessage) (int32, proto.Message) { |
77 | 77 | conn := c.Server.GetConnManage().GetConnByUID(uid) |
78 | 78 | if conn != nil { |
79 | 79 | logger.Debug("挤掉。。。。。。。。") |
80 | - conn.SendSuccess(uint32(pb.ProtoCode_DisConnectRsp), nil) | |
80 | + conn.SendSuccess(uint32(pb.ProtoCode_DisConnectNty), nil) | |
81 | 81 | conn.Stop() |
82 | 82 | } |
83 | 83 | |
... | ... | @@ -87,7 +87,7 @@ func (c *Agent) OnLoginQuery(msg components.IMessage) (int32, proto.Message) { |
87 | 87 | } |
88 | 88 | role.SetProperty("Device", req.Device) |
89 | 89 | protoMsg := &pb.RoleRsp{ |
90 | - Role: role.Role, | |
90 | + Role: role.Data, | |
91 | 91 | Hero: role.GetAllHero(), |
92 | 92 | Team: role.GetAllTeam(), |
93 | 93 | Equipments: role.GetEquipments(), |
... | ... | @@ -164,9 +164,9 @@ func (c *Agent) OnClose() { |
164 | 164 | return |
165 | 165 | } |
166 | 166 | |
167 | - logger.Debug("ID: %d close, roleid", c.IConnection.GetID(), c.Role.Role.Id) | |
168 | - c.Server.GetConnManage().DelRID(c.Role.Role.Id) | |
169 | - c.Server.GetConnManage().DelUID(c.Role.Role.Uid) | |
167 | + logger.Debug("ID: %d close, roleid", c.IConnection.GetID(), c.Role.Data.Id) | |
168 | + c.Server.GetConnManage().DelRID(c.Role.Data.Id) | |
169 | + c.Server.GetConnManage().DelUID(c.Role.Data.Uid) | |
170 | 170 | c.Role.OnOfflineEvent() |
171 | 171 | } |
172 | 172 | ... | ... |
cmd/httpserver/action/AccountAction.go
... | ... | @@ -12,6 +12,8 @@ import ( |
12 | 12 | "pro2d/common/sms" |
13 | 13 | "pro2d/models" |
14 | 14 | "pro2d/pb" |
15 | + "strconv" | |
16 | + "strings" | |
15 | 17 | ) |
16 | 18 | |
17 | 19 | type AccountAction struct { |
... | ... | @@ -117,3 +119,80 @@ func (h *AccountAction) Sms(c *gin.Context) (int, interface{}) { |
117 | 119 | |
118 | 120 | return 0, nil |
119 | 121 | } |
122 | + | |
123 | +/* | |
124 | +Version 获取版本信息 | |
125 | + 1 版本数据获取错误 | |
126 | + 2 分割版本数据错误 | |
127 | +*/ | |
128 | +func (h *AccountAction) Version(c *gin.Context) (int, interface{}) { | |
129 | + i := 0 | |
130 | + x := 0 | |
131 | + y := 0 | |
132 | + cfg := models.NewConfig() | |
133 | + if err := cfg.Load(); err != nil { | |
134 | + return 1, nil | |
135 | + } | |
136 | + | |
137 | + res := strings.Split(cfg.Data.Version, ".") | |
138 | + if len(res) != 3 { | |
139 | + return 2, nil | |
140 | + } | |
141 | + | |
142 | + i, _ = strconv.Atoi(res[0]) | |
143 | + x, _ = strconv.Atoi(res[1]) | |
144 | + y, _ = strconv.Atoi(res[2]) | |
145 | + return 0, &pb.UpdateVersion{ | |
146 | + I: int32(i), | |
147 | + X: int32(x), | |
148 | + Y: int32(y), | |
149 | + } | |
150 | +} | |
151 | + | |
152 | +/* | |
153 | +UPVersion 更新版本 | |
154 | + 参数 update=x or update=y | |
155 | + 1 版本数据获取错误 | |
156 | + 2 分割版本数据错误 | |
157 | +*/ | |
158 | +func (h *AccountAction) UPVersion(c *gin.Context) (int, interface{}) { | |
159 | + update, b := c.GetQuery("update") | |
160 | + if !b { | |
161 | + update = "y" | |
162 | + } | |
163 | + | |
164 | + i := 1 | |
165 | + x := 0 | |
166 | + y := 0 | |
167 | + cfg := models.NewConfig() | |
168 | + if err := cfg.Load(); err != nil { | |
169 | + err = cfg.Create() | |
170 | + if err != nil { | |
171 | + return 1, nil | |
172 | + } | |
173 | + } | |
174 | + | |
175 | + res := strings.Split(cfg.Data.Version, ".") | |
176 | + if len(res) != 3 { | |
177 | + return 2, nil | |
178 | + } | |
179 | + | |
180 | + i, _ = strconv.Atoi(res[0]) | |
181 | + x, _ = strconv.Atoi(res[1]) | |
182 | + y, _ = strconv.Atoi(res[2]) | |
183 | + | |
184 | + if update == "x" { | |
185 | + x++ | |
186 | + } else { | |
187 | + y++ | |
188 | + } | |
189 | + version := []string{res[0], strconv.Itoa(x), strconv.Itoa(y)} | |
190 | + cfg.SetProperty("version", strings.Join(version, ".")) | |
191 | + cfg.Update() | |
192 | + | |
193 | + return 0, &pb.UpdateVersion{ | |
194 | + I: int32(i), | |
195 | + X: int32(x), | |
196 | + Y: int32(y), | |
197 | + } | |
198 | +} | ... | ... |
cmd/test/action/TestAction.go
... | ... | @@ -17,9 +17,6 @@ func LoginRsp(role *models.RoleTestModel, msg components.IMessage) { |
17 | 17 | func CreateRsp(role *models.RoleTestModel, msg components.IMessage) { |
18 | 18 | } |
19 | 19 | |
20 | -func DisConnectRsp(role *models.RoleTestModel, msg components.IMessage) { | |
21 | -} | |
22 | - | |
23 | 20 | func ChangeTeamRsp(role *models.RoleTestModel, msg components.IMessage) { |
24 | 21 | } |
25 | 22 | func HeroEquipReferRsp(role *models.RoleTestModel, msg components.IMessage) { |
... | ... | @@ -31,9 +28,6 @@ func RoleRsp(role *models.RoleTestModel, msg components.IMessage) { |
31 | 28 | func RoleUpdatePropertyRsp(role *models.RoleTestModel, msg components.IMessage) { |
32 | 29 | } |
33 | 30 | |
34 | -func RoleUpdateItemsNty(role *models.RoleTestModel, msg components.IMessage) { | |
35 | -} | |
36 | - | |
37 | 31 | func RoleUpdateChangeRsp(role *models.RoleTestModel, msg components.IMessage) { |
38 | 32 | } |
39 | 33 | |
... | ... | @@ -51,11 +45,17 @@ func RoleEndBattleRsp(role *models.RoleTestModel, msg components.IMessage) { |
51 | 45 | } |
52 | 46 | logger.Debug(rsp.Reward) |
53 | 47 | } |
54 | - | |
55 | 48 | func EquipmentDelRsp(role *models.RoleTestModel, msg components.IMessage) { |
56 | 49 | } |
57 | 50 | |
58 | 51 | func EquipmentAddRsp(role *models.RoleTestModel, msg components.IMessage) { |
59 | 52 | } |
53 | + | |
60 | 54 | func HeroUpLevelRsp(role *models.RoleTestModel, msg components.IMessage) { |
61 | 55 | } |
56 | + | |
57 | +func DisConnectNty(role *models.RoleTestModel, msg components.IMessage) { | |
58 | +} | |
59 | + | |
60 | +func RoleUpdateItemsNty(role *models.RoleTestModel, msg components.IMessage) { | |
61 | +} | ... | ... |
cmd/test/action/protocode.go
... | ... | @@ -16,13 +16,9 @@ func GetTestActionMap() map[interface{}]interface{} { |
16 | 16 | am[uint32(pb.ProtoCode_EquipmentDelRpc)] = EquipmentDelRsp |
17 | 17 | am[uint32(pb.ProtoCode_HeroUpLevelRpc)] = HeroUpLevelRsp |
18 | 18 | am[uint32(pb.ProtoCode_DisConnectNty)] = DisConnectNty |
19 | + am[uint32(pb.ProtoCode_RoleUpdatePropertyNty)] = RoleUpdatePropertyNty | |
19 | 20 | am[uint32(pb.ProtoCode_RoleUpdateItemsNty)] = RoleUpdateItemsNty |
20 | - am[uint32(pb.ProtoCode_HeartRsp)] = HeartRsp | |
21 | - am[uint32(pb.ProtoCode_RoleRsp)] = RoleRsp | |
22 | - am[uint32(pb.ProtoCode_RoleUpdatePropertyRsp)] = RoleUpdatePropertyRsp | |
23 | - am[uint32(pb.ProtoCode_RoleEndBattleRsp)] = RoleEndBattleRsp | |
24 | - am[uint32(pb.ProtoCode_EquipmentAddRsp)] = EquipmentAddRsp | |
25 | - am[uint32(pb.ProtoCode_HeroUpLevelRsp)] = HeroUpLevelRsp | |
21 | + am[uint32(pb.ProtoCode_EquipmentAddNty)] = EquipmentAddNty | |
26 | 22 | |
27 | 23 | return am |
28 | 24 | } | ... | ... |
... | ... | @@ -49,15 +49,18 @@ require ( |
49 | 49 | github.com/xdg-go/scram v1.0.2 // indirect |
50 | 50 | github.com/xdg-go/stringprep v1.0.2 // indirect |
51 | 51 | github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect |
52 | + github.com/yuin/goldmark v1.4.1 // indirect | |
52 | 53 | go.etcd.io/etcd/client/pkg/v3 v3.5.2 // indirect |
53 | 54 | go.uber.org/atomic v1.7.0 // indirect |
54 | 55 | go.uber.org/multierr v1.6.0 // indirect |
55 | 56 | go.uber.org/zap v1.17.0 // indirect |
56 | 57 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect |
58 | + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect | |
57 | 59 | golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect |
58 | 60 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect |
59 | 61 | golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect |
60 | 62 | golang.org/x/text v0.3.7 // indirect |
63 | + golang.org/x/tools v0.1.10 // indirect | |
61 | 64 | golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect |
62 | 65 | google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect |
63 | 66 | google.golang.org/grpc v1.38.0 // indirect | ... | ... |
... | ... | @@ -223,6 +223,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de |
223 | 223 | github.com/yuin/goldmark v1.1.30/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
224 | 224 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= |
225 | 225 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= |
226 | +github.com/yuin/goldmark v1.4.1 h1:/vn0k+RBvwlxEmP5E7SZMqNxPhfMVFEJiykr15/0XKM= | |
227 | +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= | |
226 | 228 | go.etcd.io/etcd/api/v3 v3.5.2 h1:tXok5yLlKyuQ/SXSjtqHc4uzNaMqZi2XsoSPr/LlJXI= |
227 | 229 | go.etcd.io/etcd/api/v3 v3.5.2/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= |
228 | 230 | go.etcd.io/etcd/client/pkg/v3 v3.5.2 h1:4hzqQ6hIb3blLyQ8usCU4h3NghkqcsohEQ3o3VetYxE= |
... | ... | @@ -256,6 +258,8 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB |
256 | 258 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
257 | 259 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
258 | 260 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= |
261 | +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= | |
262 | +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= | |
259 | 263 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
260 | 264 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
261 | 265 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= |
... | ... | @@ -334,6 +338,8 @@ golang.org/x/tools v0.0.0-20200509030707-2212a7e161a5/go.mod h1:EkVYQZoAsY45+roY |
334 | 338 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= |
335 | 339 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= |
336 | 340 | golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= |
341 | +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= | |
342 | +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= | |
337 | 343 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
338 | 344 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= |
339 | 345 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= | ... | ... |
... | ... | @@ -0,0 +1,19 @@ |
1 | +package models | |
2 | + | |
3 | +import ( | |
4 | + "pro2d/common/components" | |
5 | + "pro2d/pb" | |
6 | +) | |
7 | + | |
8 | +type ConfigModel struct { | |
9 | + components.ISchema | |
10 | + Data *pb.Config | |
11 | +} | |
12 | + | |
13 | +func NewConfig() *ConfigModel { | |
14 | + data := &pb.Config{Id: "1"} | |
15 | + return &ConfigModel{ | |
16 | + ISchema: NewSchema(data.String(), data), | |
17 | + Data: data, | |
18 | + } | |
19 | +} | ... | ... |
models/dbseed.go
... | ... | @@ -35,6 +35,7 @@ func DBSeedS() *DBSeed { |
35 | 35 | func AccountModels() STOIncrement { |
36 | 36 | return STOIncrement{ |
37 | 37 | &pb.Account{}: 0, |
38 | + &pb.Config{}: 0, | |
38 | 39 | "uid": common.MaxUidNum, |
39 | 40 | } |
40 | 41 | } |
... | ... | @@ -68,12 +69,12 @@ func (d *DBSeed) InitAutoIncreUidTable(schema STOIncrement) { |
68 | 69 | if err := autoIncrement.Load(); err != nil { |
69 | 70 | //字段不存在 初始化 id |
70 | 71 | increId = d.serverID * b |
71 | - autoIncrement.Incre.Key = name | |
72 | - autoIncrement.Incre.Val = increId | |
72 | + autoIncrement.Data.Key = name | |
73 | + autoIncrement.Data.Val = increId | |
73 | 74 | autoIncrement.Create() |
74 | 75 | |
75 | 76 | } else { |
76 | - increId = autoIncrement.Incre.Val | |
77 | + increId = autoIncrement.Data.Val | |
77 | 78 | } |
78 | 79 | |
79 | 80 | //设置到redis中,提供初始自增id |
... | ... | @@ -118,7 +119,7 @@ func (d *DBSeed) SaveAutoincrementTimer(schema STOIncrement) { |
118 | 119 | continue |
119 | 120 | |
120 | 121 | } else { |
121 | - dbID = autoIncrement.Incre.Val | |
122 | + dbID = autoIncrement.Data.Val | |
122 | 123 | } |
123 | 124 | //获取redis中的id 内存中的数据。获取自增id |
124 | 125 | relayID, err := redis.Int64(redisproxy.HGET(fmt.Sprintf(common.AutoIncrement, d.serverID), name)) | ... | ... |
models/equip.go
... | ... | @@ -7,13 +7,13 @@ import ( |
7 | 7 | |
8 | 8 | type EquipModel struct { |
9 | 9 | components.ISchema |
10 | - Equip *pb.Equipment | |
10 | + Data *pb.Equipment | |
11 | 11 | } |
12 | 12 | |
13 | 13 | func NewEquip(data *pb.Equipment) *EquipModel { |
14 | 14 | m := &EquipModel{ |
15 | 15 | ISchema: NewSchema(data.Id, data), |
16 | - Equip: data, | |
16 | + Data: data, | |
17 | 17 | } |
18 | 18 | |
19 | 19 | return m | ... | ... |
models/hero.go
... | ... | @@ -9,14 +9,14 @@ import ( |
9 | 9 | |
10 | 10 | type HeroModel struct { |
11 | 11 | components.ISchema |
12 | - Hero *pb.Hero | |
12 | + Data *pb.Hero | |
13 | 13 | Equipments common.IMapStringNum |
14 | 14 | } |
15 | 15 | |
16 | 16 | func NewHero(hero *pb.Hero) *HeroModel { |
17 | 17 | m := &HeroModel{ |
18 | 18 | ISchema: NewSchema(hero.Id, hero), |
19 | - Hero: hero, | |
19 | + Data: hero, | |
20 | 20 | Equipments: common.StringToMapNum(hero.Equipments), |
21 | 21 | } |
22 | 22 | return m |
... | ... | @@ -32,8 +32,8 @@ func (m *HeroModel) AddEquipment(key string, pos int32) { |
32 | 32 | m.SetProperty("equipments", common.MapNumToString(m.Equipments)) |
33 | 33 | } |
34 | 34 | func (m *HeroModel) UpLevel(exp int32) (int32, int32) { |
35 | - exp = exp + m.Hero.Exp | |
36 | - level := m.Hero.Level | |
35 | + exp = exp + m.Data.Exp | |
36 | + level := m.Data.Level | |
37 | 37 | oldLevelExp := csvdata.Get().TbHeroLevelExp.Get(level) |
38 | 38 | if oldLevelExp == nil { |
39 | 39 | return level, exp | ... | ... |
models/increment.go
... | ... | @@ -7,7 +7,7 @@ import ( |
7 | 7 | |
8 | 8 | type IncrementModels struct { |
9 | 9 | components.ISchema |
10 | - Incre *pb.Increment | |
10 | + Data *pb.Increment | |
11 | 11 | } |
12 | 12 | |
13 | 13 | func NewIncrement(key string) *IncrementModels { |
... | ... | @@ -17,7 +17,7 @@ func NewIncrement(key string) *IncrementModels { |
17 | 17 | |
18 | 18 | r := &IncrementModels{ |
19 | 19 | ISchema: NewSchema(data.Key, data), |
20 | - Incre: data, | |
20 | + Data: data, | |
21 | 21 | } |
22 | 22 | return r |
23 | 23 | } | ... | ... |
models/prop.go
... | ... | @@ -7,7 +7,7 @@ import ( |
7 | 7 | |
8 | 8 | type PropModel struct { |
9 | 9 | components.ISchema |
10 | - Prop *pb.Prop | |
10 | + Data *pb.Prop | |
11 | 11 | } |
12 | 12 | |
13 | 13 | func NewProp(id string) *PropModel { |
... | ... | @@ -16,8 +16,8 @@ func NewProp(id string) *PropModel { |
16 | 16 | } |
17 | 17 | m := &PropModel{ |
18 | 18 | ISchema: NewSchema(id, data), |
19 | - Prop: data, | |
19 | + Data: data, | |
20 | 20 | } |
21 | 21 | |
22 | 22 | return m |
23 | -} | |
24 | 23 | \ No newline at end of file |
24 | +} | ... | ... |
models/role.go
... | ... | @@ -13,7 +13,7 @@ import ( |
13 | 13 | |
14 | 14 | type RoleModel struct { |
15 | 15 | components.ISchema |
16 | - Role *pb.Role | |
16 | + Data *pb.Role | |
17 | 17 | Heros SchemaMap |
18 | 18 | Teams SchemaMap |
19 | 19 | Equipments SchemaMap |
... | ... | @@ -27,13 +27,13 @@ func RoleExistByUid(uid string) *RoleModel { |
27 | 27 | data := &pb.Role{Uid: uid, Incres: make(map[string]uint32), Passchapters: make(map[int32]int32)} |
28 | 28 | |
29 | 29 | if err := mongoproxy.FindOne(mongoproxy.GetCollName(data), mongoproxy.GetBsonM("uid", uid), data); err != nil { |
30 | - logger.Error("Role not exist err: %v", err) | |
30 | + logger.Error("Data not exist err: %v", err) | |
31 | 31 | return nil |
32 | 32 | } |
33 | 33 | |
34 | 34 | r := &RoleModel{ |
35 | 35 | ISchema: NewSchema(data.Id, data), |
36 | - Role: data, | |
36 | + Data: data, | |
37 | 37 | Heros: make(SchemaMap), |
38 | 38 | Teams: make(SchemaMap), |
39 | 39 | Equipments: make(SchemaMap), |
... | ... | @@ -49,7 +49,7 @@ func NewRole(id string) *RoleModel { |
49 | 49 | data := &pb.Role{Id: id, Incres: make(map[string]uint32), Passchapters: make(map[int32]int32)} |
50 | 50 | m := &RoleModel{ |
51 | 51 | ISchema: NewSchema(id, data), |
52 | - Role: data, | |
52 | + Data: data, | |
53 | 53 | Heros: make(SchemaMap), |
54 | 54 | Teams: make(SchemaMap), |
55 | 55 | Equipments: make(SchemaMap), |
... | ... | @@ -60,34 +60,34 @@ func NewRole(id string) *RoleModel { |
60 | 60 | } |
61 | 61 | |
62 | 62 | func (m *RoleModel) IncreByKey(key string, detal uint32) uint32 { |
63 | - v, ok := m.Role.Incres[key] | |
63 | + v, ok := m.Data.Incres[key] | |
64 | 64 | if !ok { |
65 | 65 | v = detal |
66 | 66 | } else { |
67 | 67 | v += detal |
68 | 68 | } |
69 | - m.Role.Incres[key] = v | |
70 | - m.SetProperty("incres", m.Role.Incres) | |
69 | + m.Data.Incres[key] = v | |
70 | + m.SetProperty("incres", m.Data.Incres) | |
71 | 71 | return v |
72 | 72 | } |
73 | 73 | |
74 | 74 | func (m *RoleModel) IncreHearByKey(detal uint32) string { |
75 | - return fmt.Sprintf("%s%04d", m.Role.Id, m.IncreByKey("hero", detal)) | |
75 | + return fmt.Sprintf("%s%04d", m.Data.Id, m.IncreByKey("hero", detal)) | |
76 | 76 | } |
77 | 77 | |
78 | 78 | func (m *RoleModel) IncreTeamByKey(detal uint32) string { |
79 | - return fmt.Sprintf("%s%02d", m.Role.Id, m.IncreByKey("team", detal)) | |
79 | + return fmt.Sprintf("%s%02d", m.Data.Id, m.IncreByKey("team", detal)) | |
80 | 80 | } |
81 | 81 | |
82 | 82 | func (m *RoleModel) IncreEquipByKey(detal uint32) string { |
83 | - return fmt.Sprintf("%s%04d", m.Role.Id, m.IncreByKey("equipment", detal)) | |
83 | + return fmt.Sprintf("%s%04d", m.Data.Id, m.IncreByKey("equipment", detal)) | |
84 | 84 | } |
85 | 85 | |
86 | 86 | func (m *RoleModel) InitRole() { |
87 | 87 | //init hero |
88 | 88 | h1 := pb.Hero{ |
89 | 89 | Id: m.IncreHearByKey(1), |
90 | - RoleId: m.Role.Id, | |
90 | + RoleId: m.Data.Id, | |
91 | 91 | Type: 1, |
92 | 92 | Level: 1, |
93 | 93 | ReinCount: 0, |
... | ... | @@ -113,7 +113,7 @@ func (m *RoleModel) InitRole() { |
113 | 113 | //init team |
114 | 114 | t1 := pb.Team{ |
115 | 115 | Id: m.IncreTeamByKey(1), |
116 | - RoleId: m.Role.Id, | |
116 | + RoleId: m.Data.Id, | |
117 | 117 | HeroId1: h1.Id, |
118 | 118 | HeroId2: h2.Id, |
119 | 119 | HeroId3: h3.Id, |
... | ... | @@ -141,7 +141,7 @@ func (m *RoleModel) InitRole() { |
141 | 141 | |
142 | 142 | func (m *RoleModel) LoadHero() { |
143 | 143 | heros := make([]*pb.Hero, 10) |
144 | - err := mongoproxy.FindMany("hero", "roleid", m.Role.Id, &heros) | |
144 | + err := mongoproxy.FindMany("hero", "roleid", m.Data.Id, &heros) | |
145 | 145 | if err != nil { |
146 | 146 | logger.Error(err) |
147 | 147 | return |
... | ... | @@ -153,7 +153,7 @@ func (m *RoleModel) LoadHero() { |
153 | 153 | |
154 | 154 | func (m *RoleModel) LoadTeams() { |
155 | 155 | teams := make([]*pb.Team, 4) |
156 | - err := mongoproxy.FindMany("team", "roleid", m.Role.Id, &teams) | |
156 | + err := mongoproxy.FindMany("team", "roleid", m.Data.Id, &teams) | |
157 | 157 | if err != nil { |
158 | 158 | logger.Error(err) |
159 | 159 | return |
... | ... | @@ -165,12 +165,12 @@ func (m *RoleModel) LoadTeams() { |
165 | 165 | |
166 | 166 | //加载背包数据到内存 |
167 | 167 | func (m *RoleModel) LoadItems() { |
168 | - m.Items = common.StringToMapNum(m.Role.Items) | |
168 | + m.Items = common.StringToMapNum(m.Data.Items) | |
169 | 169 | } |
170 | 170 | |
171 | 171 | func (m *RoleModel) LoadEquipments() { |
172 | 172 | data := make([]*pb.Equipment, 10) |
173 | - err := mongoproxy.FindMany("equipment", "roleid", m.Role.Id, &data) | |
173 | + err := mongoproxy.FindMany("equipment", "roleid", m.Data.Id, &data) | |
174 | 174 | if err != nil { |
175 | 175 | logger.Error(err) |
176 | 176 | return |
... | ... | @@ -204,16 +204,16 @@ func (m *RoleModel) UpdateProperties(property map[string]interface{}, notify boo |
204 | 204 | return |
205 | 205 | } |
206 | 206 | |
207 | - update := &pb.RoleUpdatePropertyRsp{ | |
207 | + update := &pb.RoleUpdatePropertyNty{ | |
208 | 208 | Id: ids, |
209 | 209 | Role: role, |
210 | 210 | } |
211 | 211 | if rsp, err := proto.Marshal(update); err != nil { |
212 | - logger.Error("id %s, err:", m.Role.Id, err) | |
212 | + logger.Error("id %s, err:", m.Data.Id, err) | |
213 | 213 | return |
214 | 214 | } else { |
215 | 215 | if m.GetConn() != nil && notify { |
216 | - m.GetConn().Send(0, uint32(pb.ProtoCode_RoleUpdatePropertyRsp), rsp) | |
216 | + m.GetConn().Send(0, uint32(pb.ProtoCode_RoleUpdatePropertyNty), rsp) | |
217 | 217 | } |
218 | 218 | } |
219 | 219 | } |
... | ... | @@ -221,7 +221,7 @@ func (m *RoleModel) UpdateProperties(property map[string]interface{}, notify boo |
221 | 221 | func (m *RoleModel) GetAllHero() []*pb.Hero { |
222 | 222 | var h []*pb.Hero |
223 | 223 | for _, hero := range m.Heros { |
224 | - h = append(h, hero.(*HeroModel).Hero) | |
224 | + h = append(h, hero.(*HeroModel).Data) | |
225 | 225 | } |
226 | 226 | return h |
227 | 227 | } |
... | ... | @@ -229,7 +229,7 @@ func (m *RoleModel) GetAllHero() []*pb.Hero { |
229 | 229 | func (m *RoleModel) GetAllTeam() []*pb.Team { |
230 | 230 | var t []*pb.Team |
231 | 231 | for _, team := range m.Teams { |
232 | - t = append(t, team.(*TeamModel).Team) | |
232 | + t = append(t, team.(*TeamModel).Data) | |
233 | 233 | } |
234 | 234 | return t |
235 | 235 | } |
... | ... | @@ -237,7 +237,7 @@ func (m *RoleModel) GetAllTeam() []*pb.Team { |
237 | 237 | func (m *RoleModel) GetEquipments() []*pb.Equipment { |
238 | 238 | var equips []*pb.Equipment |
239 | 239 | for _, e := range m.Equipments { |
240 | - equips = append(equips, e.(*EquipModel).Equip) | |
240 | + equips = append(equips, e.(*EquipModel).Data) | |
241 | 241 | } |
242 | 242 | return equips |
243 | 243 | } | ... | ... |
models/rolePlugin.go
... | ... | @@ -104,7 +104,7 @@ func (m *RoleModel) AddTeam(team *pb.Team) { |
104 | 104 | |
105 | 105 | func (m *RoleModel) UpdateTeam(teams []*pb.Team) { |
106 | 106 | for _, team := range teams { |
107 | - team.RoleId = m.Role.Id | |
107 | + team.RoleId = m.Data.Id | |
108 | 108 | t := m.Teams[team.Id] |
109 | 109 | if t != nil { |
110 | 110 | t.UpdateSchema(team) |
... | ... | @@ -121,20 +121,20 @@ func (m *RoleModel) AddEquip(equip *pb.Equipment) *EquipModel { |
121 | 121 | } |
122 | 122 | |
123 | 123 | func (m *RoleModel) EquipmentAddNotify(equip *pb.Equipment) { |
124 | - update := &pb.EquipmentAddRsp{Equip: equip} | |
124 | + update := &pb.EquipmentAddNty{Equip: equip} | |
125 | 125 | if rsp, err := proto.Marshal(update); err != nil { |
126 | 126 | logger.Error(" EquipmentAddNotify err:", err.Error()) |
127 | 127 | return |
128 | 128 | } else { |
129 | 129 | if m.GetConn() != nil { |
130 | - m.GetConn().SendSuccess(uint32(pb.ProtoCode_EquipmentAddRsp), rsp) | |
130 | + m.GetConn().SendSuccess(uint32(pb.ProtoCode_EquipmentAddNty), rsp) | |
131 | 131 | } |
132 | 132 | } |
133 | 133 | } |
134 | 134 | |
135 | 135 | func (m *RoleModel) UpLevel(exp int32) (int32, int32) { |
136 | - exp = exp + m.Role.Exp | |
137 | - level := m.Role.Level | |
136 | + exp = exp + m.Data.Exp | |
137 | + level := m.Data.Level | |
138 | 138 | oldLevelExp := csvdata.Get().TbAccountLevelExp.Get(level) |
139 | 139 | if oldLevelExp == nil { |
140 | 140 | return level, exp |
... | ... | @@ -177,18 +177,18 @@ func (m *RoleModel) EquipmentRefer(equipId, heroId string, refer bool, pos int32 |
177 | 177 | // 2.1.2 如果不是戒指,如果其他英雄已经被穿戴,则脱了再穿, 同位置装备是否穿戴, 已经被穿戴,则脱了再穿 |
178 | 178 | // 可以合并。不用判断是否是戒指。 |
179 | 179 | h1 := m.Heros[heroId] |
180 | - h2 := m.Heros[equip.Equip.HeroId] | |
180 | + h2 := m.Heros[equip.Data.HeroId] | |
181 | 181 | |
182 | 182 | var outHero, inHero *HeroModel |
183 | - inEquip := csvdata.Get().TbEquipmentData.Get(equip.Equip.GetTbId()) | |
183 | + inEquip := csvdata.Get().TbEquipmentData.Get(equip.Data.GetTbId()) | |
184 | 184 | if !refer { |
185 | 185 | if h1 != nil { |
186 | 186 | outHero = h1.(*HeroModel) |
187 | - outHero.DelEquipment(equip.Equip.Id) | |
187 | + outHero.DelEquipment(equip.Data.Id) | |
188 | 188 | } |
189 | 189 | if h2 != nil { |
190 | 190 | outHero = h2.(*HeroModel) |
191 | - outHero.DelEquipment(equip.Equip.Id) | |
191 | + outHero.DelEquipment(equip.Data.Id) | |
192 | 192 | } |
193 | 193 | equip.SetProperty("heroid", "") |
194 | 194 | |
... | ... | @@ -204,7 +204,7 @@ func (m *RoleModel) EquipmentRefer(equipId, heroId string, refer bool, pos int32 |
204 | 204 | } |
205 | 205 | } |
206 | 206 | // 2.1.1 |
207 | - if equip.Equip.HeroId == "" { | |
207 | + if equip.Data.HeroId == "" { | |
208 | 208 | var outEquipID string |
209 | 209 | for id, typ := range inHero.Equipments { |
210 | 210 | if typ == pos { |
... | ... | @@ -221,8 +221,8 @@ func (m *RoleModel) EquipmentRefer(equipId, heroId string, refer bool, pos int32 |
221 | 221 | } |
222 | 222 | } |
223 | 223 | |
224 | - inHero.AddEquipment(equip.Equip.Id, pos) | |
225 | - equip.SetProperty("heroid", inHero.Hero.Id) | |
224 | + inHero.AddEquipment(equip.Data.Id, pos) | |
225 | + equip.SetProperty("heroid", inHero.Data.Id) | |
226 | 226 | equip.SetProperty("pos", pos) |
227 | 227 | } else { |
228 | 228 | if h2 == nil { |
... | ... | @@ -247,9 +247,9 @@ func (m *RoleModel) EquipmentRefer(equipId, heroId string, refer bool, pos int32 |
247 | 247 | } |
248 | 248 | } |
249 | 249 | |
250 | - outHero.DelEquipment(equip.Equip.Id) | |
251 | - inHero.AddEquipment(equip.Equip.Id, pos) | |
252 | - equip.SetProperty("heroid", inHero.Hero.Id) | |
250 | + outHero.DelEquipment(equip.Data.Id) | |
251 | + inHero.AddEquipment(equip.Data.Id, pos) | |
252 | + equip.SetProperty("heroid", inHero.Data.Id) | |
253 | 253 | equip.SetProperty("pos", pos) |
254 | 254 | } |
255 | 255 | ... | ... |
models/role_test.go
... | ... | @@ -21,9 +21,9 @@ func TestNewRole(t *testing.T) { |
21 | 21 | role := RoleExistByUid(uid) |
22 | 22 | if role != nil { |
23 | 23 | //uid存在 , 更新角色 |
24 | - //role.AddHero(&pb.Hero{ | |
24 | + //role.AddHero(&pb.Data{ | |
25 | 25 | // Id: 1, |
26 | - // RoleId: role.Role.Id, | |
26 | + // RoleId: role.Data.Id, | |
27 | 27 | // Type: 0, |
28 | 28 | // Level: 0, |
29 | 29 | // ReinCount: 0, |
... | ... | @@ -35,9 +35,9 @@ func TestNewRole(t *testing.T) { |
35 | 35 | } else { |
36 | 36 | //uid不存在,创建角色 |
37 | 37 | role = NewRole("1") |
38 | - role.Role.Uid = uid | |
39 | - role.Role.Device = "111111" | |
40 | - role.Role.Level = 0 | |
38 | + role.Data.Uid = uid | |
39 | + role.Data.Device = "111111" | |
40 | + role.Data.Level = 0 | |
41 | 41 | err := role.Create() |
42 | 42 | fmt.Println(err) |
43 | 43 | } |
... | ... | @@ -81,7 +81,7 @@ func TestRoleModel_ProtoReflect(t *testing.T) { |
81 | 81 | // "Device": "12312312312", |
82 | 82 | //} |
83 | 83 | sch.UpdateProperty("Device", "123123123", false) |
84 | - fmt.Println(sch.Role) | |
84 | + fmt.Println(sch.Data) | |
85 | 85 | } |
86 | 86 | |
87 | 87 | func TestRoleModel_UpdateTeam(t *testing.T) { |
... | ... | @@ -115,9 +115,9 @@ func TestRoleModel_IncreByKey(t *testing.T) { |
115 | 115 | //sch.Load() |
116 | 116 | //sch.LoadAll() |
117 | 117 | // |
118 | - //sch.Role.Incres["hero"] = 4 | |
119 | - //sch.Role.Incres["team"] = 4 | |
120 | - //sch.SetProperty("incres", sch.Role.Incres) | |
118 | + //sch.Data.Incres["hero"] = 4 | |
119 | + //sch.Data.Incres["team"] = 4 | |
120 | + //sch.SetProperty("incres", sch.Data.Incres) | |
121 | 121 | //sch.Update() |
122 | 122 | |
123 | 123 | fmt.Printf("%03d\n", 3) | ... | ... |
models/team.go
... | ... | @@ -10,13 +10,13 @@ import ( |
10 | 10 | type TeamMap map[string]*TeamModel |
11 | 11 | type TeamModel struct { |
12 | 12 | components.ISchema |
13 | - Team *pb.Team | |
13 | + Data *pb.Team | |
14 | 14 | } |
15 | 15 | |
16 | 16 | func NewTeam(data *pb.Team) *TeamModel { |
17 | 17 | m := &TeamModel{ |
18 | 18 | ISchema: NewSchema(data.Id, data), |
19 | - Team: data, | |
19 | + Data: data, | |
20 | 20 | } |
21 | 21 | |
22 | 22 | return m |
... | ... | @@ -25,12 +25,12 @@ func NewTeam(data *pb.Team) *TeamModel { |
25 | 25 | func TeamExistsByID(id string) *TeamModel { |
26 | 26 | data := &pb.Team{Id: id} |
27 | 27 | if err := mongoproxy.FindOne(mongoproxy.GetCollName(data), mongoproxy.GetBsonM("id", id), data); err != nil { |
28 | - logger.Error("Role not exist err: %v", err) | |
28 | + logger.Error("Data not exist err: %v", err) | |
29 | 29 | return nil |
30 | 30 | } |
31 | 31 | r := &TeamModel{ |
32 | 32 | ISchema: NewSchema(data.Id, data), |
33 | - Team: data, | |
33 | + Data: data, | |
34 | 34 | } |
35 | 35 | return r |
36 | 36 | } | ... | ... |
pb/account.pb.go
... | ... | @@ -217,6 +217,69 @@ func (x *Register) GetCode() string { |
217 | 217 | return "" |
218 | 218 | } |
219 | 219 | |
220 | +type UpdateVersion struct { | |
221 | + state protoimpl.MessageState | |
222 | + sizeCache protoimpl.SizeCache | |
223 | + unknownFields protoimpl.UnknownFields | |
224 | + | |
225 | + I int32 `protobuf:"varint,1,opt,name=i,proto3" json:"i,omitempty"` | |
226 | + X int32 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` | |
227 | + Y int32 `protobuf:"varint,3,opt,name=y,proto3" json:"y,omitempty"` | |
228 | +} | |
229 | + | |
230 | +func (x *UpdateVersion) Reset() { | |
231 | + *x = UpdateVersion{} | |
232 | + if protoimpl.UnsafeEnabled { | |
233 | + mi := &file_account_proto_msgTypes[3] | |
234 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
235 | + ms.StoreMessageInfo(mi) | |
236 | + } | |
237 | +} | |
238 | + | |
239 | +func (x *UpdateVersion) String() string { | |
240 | + return protoimpl.X.MessageStringOf(x) | |
241 | +} | |
242 | + | |
243 | +func (*UpdateVersion) ProtoMessage() {} | |
244 | + | |
245 | +func (x *UpdateVersion) ProtoReflect() protoreflect.Message { | |
246 | + mi := &file_account_proto_msgTypes[3] | |
247 | + if protoimpl.UnsafeEnabled && x != nil { | |
248 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
249 | + if ms.LoadMessageInfo() == nil { | |
250 | + ms.StoreMessageInfo(mi) | |
251 | + } | |
252 | + return ms | |
253 | + } | |
254 | + return mi.MessageOf(x) | |
255 | +} | |
256 | + | |
257 | +// Deprecated: Use UpdateVersion.ProtoReflect.Descriptor instead. | |
258 | +func (*UpdateVersion) Descriptor() ([]byte, []int) { | |
259 | + return file_account_proto_rawDescGZIP(), []int{3} | |
260 | +} | |
261 | + | |
262 | +func (x *UpdateVersion) GetI() int32 { | |
263 | + if x != nil { | |
264 | + return x.I | |
265 | + } | |
266 | + return 0 | |
267 | +} | |
268 | + | |
269 | +func (x *UpdateVersion) GetX() int32 { | |
270 | + if x != nil { | |
271 | + return x.X | |
272 | + } | |
273 | + return 0 | |
274 | +} | |
275 | + | |
276 | +func (x *UpdateVersion) GetY() int32 { | |
277 | + if x != nil { | |
278 | + return x.Y | |
279 | + } | |
280 | + return 0 | |
281 | +} | |
282 | + | |
220 | 283 | var File_account_proto protoreflect.FileDescriptor |
221 | 284 | |
222 | 285 | var file_account_proto_rawDesc = []byte{ |
... | ... | @@ -240,8 +303,12 @@ var file_account_proto_rawDesc = []byte{ |
240 | 303 | 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, |
241 | 304 | 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, |
242 | 305 | 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, |
243 | - 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, | |
244 | - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
306 | + 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x39, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, | |
307 | + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0c, 0x0a, 0x01, 0x69, 0x18, 0x01, 0x20, 0x01, | |
308 | + 0x28, 0x05, 0x52, 0x01, 0x69, 0x12, 0x0c, 0x0a, 0x01, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, | |
309 | + 0x52, 0x01, 0x78, 0x12, 0x0c, 0x0a, 0x01, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x01, | |
310 | + 0x79, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, | |
311 | + 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
245 | 312 | } |
246 | 313 | |
247 | 314 | var ( |
... | ... | @@ -256,11 +323,12 @@ func file_account_proto_rawDescGZIP() []byte { |
256 | 323 | return file_account_proto_rawDescData |
257 | 324 | } |
258 | 325 | |
259 | -var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3) | |
326 | +var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 4) | |
260 | 327 | var file_account_proto_goTypes = []interface{}{ |
261 | - (*ServiceInfo)(nil), // 0: account.ServiceInfo | |
262 | - (*LoginRsp)(nil), // 1: account.LoginRsp | |
263 | - (*Register)(nil), // 2: account.Register | |
328 | + (*ServiceInfo)(nil), // 0: account.ServiceInfo | |
329 | + (*LoginRsp)(nil), // 1: account.LoginRsp | |
330 | + (*Register)(nil), // 2: account.Register | |
331 | + (*UpdateVersion)(nil), // 3: account.UpdateVersion | |
264 | 332 | } |
265 | 333 | var file_account_proto_depIdxs = []int32{ |
266 | 334 | 0, // 0: account.LoginRsp.game_service:type_name -> account.ServiceInfo |
... | ... | @@ -313,6 +381,18 @@ func file_account_proto_init() { |
313 | 381 | return nil |
314 | 382 | } |
315 | 383 | } |
384 | + file_account_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { | |
385 | + switch v := v.(*UpdateVersion); i { | |
386 | + case 0: | |
387 | + return &v.state | |
388 | + case 1: | |
389 | + return &v.sizeCache | |
390 | + case 2: | |
391 | + return &v.unknownFields | |
392 | + default: | |
393 | + return nil | |
394 | + } | |
395 | + } | |
316 | 396 | } |
317 | 397 | type x struct{} |
318 | 398 | out := protoimpl.TypeBuilder{ |
... | ... | @@ -320,7 +400,7 @@ func file_account_proto_init() { |
320 | 400 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
321 | 401 | RawDescriptor: file_account_proto_rawDesc, |
322 | 402 | NumEnums: 0, |
323 | - NumMessages: 3, | |
403 | + NumMessages: 4, | |
324 | 404 | NumExtensions: 0, |
325 | 405 | NumServices: 0, |
326 | 406 | }, | ... | ... |
pb/game.pb.go
... | ... | @@ -503,8 +503,8 @@ func (x *RoleRsp) GetEquipments() []*Equipment { |
503 | 503 | return nil |
504 | 504 | } |
505 | 505 | |
506 | -//ResponseCmd RoleUpdatePropertyRsp | |
507 | -type RoleUpdatePropertyRsp struct { | |
506 | +//ResponseCmd RoleUpdatePropertyNty | |
507 | +type RoleUpdatePropertyNty struct { | |
508 | 508 | state protoimpl.MessageState |
509 | 509 | sizeCache protoimpl.SizeCache |
510 | 510 | unknownFields protoimpl.UnknownFields |
... | ... | @@ -513,8 +513,8 @@ type RoleUpdatePropertyRsp struct { |
513 | 513 | Role *Role `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` |
514 | 514 | } |
515 | 515 | |
516 | -func (x *RoleUpdatePropertyRsp) Reset() { | |
517 | - *x = RoleUpdatePropertyRsp{} | |
516 | +func (x *RoleUpdatePropertyNty) Reset() { | |
517 | + *x = RoleUpdatePropertyNty{} | |
518 | 518 | if protoimpl.UnsafeEnabled { |
519 | 519 | mi := &file_game_proto_msgTypes[9] |
520 | 520 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -522,13 +522,13 @@ func (x *RoleUpdatePropertyRsp) Reset() { |
522 | 522 | } |
523 | 523 | } |
524 | 524 | |
525 | -func (x *RoleUpdatePropertyRsp) String() string { | |
525 | +func (x *RoleUpdatePropertyNty) String() string { | |
526 | 526 | return protoimpl.X.MessageStringOf(x) |
527 | 527 | } |
528 | 528 | |
529 | -func (*RoleUpdatePropertyRsp) ProtoMessage() {} | |
529 | +func (*RoleUpdatePropertyNty) ProtoMessage() {} | |
530 | 530 | |
531 | -func (x *RoleUpdatePropertyRsp) ProtoReflect() protoreflect.Message { | |
531 | +func (x *RoleUpdatePropertyNty) ProtoReflect() protoreflect.Message { | |
532 | 532 | mi := &file_game_proto_msgTypes[9] |
533 | 533 | if protoimpl.UnsafeEnabled && x != nil { |
534 | 534 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -540,19 +540,19 @@ func (x *RoleUpdatePropertyRsp) ProtoReflect() protoreflect.Message { |
540 | 540 | return mi.MessageOf(x) |
541 | 541 | } |
542 | 542 | |
543 | -// Deprecated: Use RoleUpdatePropertyRsp.ProtoReflect.Descriptor instead. | |
544 | -func (*RoleUpdatePropertyRsp) Descriptor() ([]byte, []int) { | |
543 | +// Deprecated: Use RoleUpdatePropertyNty.ProtoReflect.Descriptor instead. | |
544 | +func (*RoleUpdatePropertyNty) Descriptor() ([]byte, []int) { | |
545 | 545 | return file_game_proto_rawDescGZIP(), []int{9} |
546 | 546 | } |
547 | 547 | |
548 | -func (x *RoleUpdatePropertyRsp) GetId() []int32 { | |
548 | +func (x *RoleUpdatePropertyNty) GetId() []int32 { | |
549 | 549 | if x != nil { |
550 | 550 | return x.Id |
551 | 551 | } |
552 | 552 | return nil |
553 | 553 | } |
554 | 554 | |
555 | -func (x *RoleUpdatePropertyRsp) GetRole() *Role { | |
555 | +func (x *RoleUpdatePropertyNty) GetRole() *Role { | |
556 | 556 | if x != nil { |
557 | 557 | return x.Role |
558 | 558 | } |
... | ... | @@ -919,7 +919,7 @@ func (x *EquipmentDelReq) GetId() []string { |
919 | 919 | } |
920 | 920 | |
921 | 921 | //ResponseCmd EquipmentAddRsp |
922 | -type EquipmentAddRsp struct { | |
922 | +type EquipmentAddNty struct { | |
923 | 923 | state protoimpl.MessageState |
924 | 924 | sizeCache protoimpl.SizeCache |
925 | 925 | unknownFields protoimpl.UnknownFields |
... | ... | @@ -927,8 +927,8 @@ type EquipmentAddRsp struct { |
927 | 927 | Equip *Equipment `protobuf:"bytes,1,opt,name=equip,proto3" json:"equip,omitempty"` |
928 | 928 | } |
929 | 929 | |
930 | -func (x *EquipmentAddRsp) Reset() { | |
931 | - *x = EquipmentAddRsp{} | |
930 | +func (x *EquipmentAddNty) Reset() { | |
931 | + *x = EquipmentAddNty{} | |
932 | 932 | if protoimpl.UnsafeEnabled { |
933 | 933 | mi := &file_game_proto_msgTypes[16] |
934 | 934 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -936,13 +936,13 @@ func (x *EquipmentAddRsp) Reset() { |
936 | 936 | } |
937 | 937 | } |
938 | 938 | |
939 | -func (x *EquipmentAddRsp) String() string { | |
939 | +func (x *EquipmentAddNty) String() string { | |
940 | 940 | return protoimpl.X.MessageStringOf(x) |
941 | 941 | } |
942 | 942 | |
943 | -func (*EquipmentAddRsp) ProtoMessage() {} | |
943 | +func (*EquipmentAddNty) ProtoMessage() {} | |
944 | 944 | |
945 | -func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { | |
945 | +func (x *EquipmentAddNty) ProtoReflect() protoreflect.Message { | |
946 | 946 | mi := &file_game_proto_msgTypes[16] |
947 | 947 | if protoimpl.UnsafeEnabled && x != nil { |
948 | 948 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
... | ... | @@ -954,12 +954,12 @@ func (x *EquipmentAddRsp) ProtoReflect() protoreflect.Message { |
954 | 954 | return mi.MessageOf(x) |
955 | 955 | } |
956 | 956 | |
957 | -// Deprecated: Use EquipmentAddRsp.ProtoReflect.Descriptor instead. | |
958 | -func (*EquipmentAddRsp) Descriptor() ([]byte, []int) { | |
957 | +// Deprecated: Use EquipmentAddNty.ProtoReflect.Descriptor instead. | |
958 | +func (*EquipmentAddNty) Descriptor() ([]byte, []int) { | |
959 | 959 | return file_game_proto_rawDescGZIP(), []int{16} |
960 | 960 | } |
961 | 961 | |
962 | -func (x *EquipmentAddRsp) GetEquip() *Equipment { | |
962 | +func (x *EquipmentAddNty) GetEquip() *Equipment { | |
963 | 963 | if x != nil { |
964 | 964 | return x.Equip |
965 | 965 | } |
... | ... | @@ -1111,8 +1111,8 @@ var file_game_proto_rawDesc = []byte{ |
1111 | 1111 | 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, |
1112 | 1112 | 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x65, 0x71, |
1113 | 1113 | 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x49, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, |
1114 | - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, | |
1115 | - 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, | |
1114 | + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x4e, 0x74, | |
1115 | + 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, | |
1116 | 1116 | 0x64, 0x12, 0x20, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, |
1117 | 1117 | 0x0c, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, |
1118 | 1118 | 0x6f, 0x6c, 0x65, 0x22, 0x2a, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, |
... | ... | @@ -1149,7 +1149,7 @@ var file_game_proto_rawDesc = []byte{ |
1149 | 1149 | 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, |
1150 | 1150 | 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, |
1151 | 1151 | 0x22, 0x3a, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, |
1152 | - 0x52, 0x73, 0x70, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, | |
1152 | + 0x4e, 0x74, 0x79, 0x12, 0x27, 0x0a, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, | |
1153 | 1153 | 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x45, 0x71, 0x75, 0x69, |
1154 | 1154 | 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65, 0x71, 0x75, 0x69, 0x70, 0x22, 0x3e, 0x0a, 0x0e, |
1155 | 1155 | 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x12, 0x16, |
... | ... | @@ -1186,14 +1186,14 @@ var file_game_proto_goTypes = []interface{}{ |
1186 | 1186 | (*EquipInfo)(nil), // 6: game.EquipInfo |
1187 | 1187 | (*HeroEquipReferReq)(nil), // 7: game.HeroEquipReferReq |
1188 | 1188 | (*RoleRsp)(nil), // 8: game.RoleRsp |
1189 | - (*RoleUpdatePropertyRsp)(nil), // 9: game.RoleUpdatePropertyRsp | |
1189 | + (*RoleUpdatePropertyNty)(nil), // 9: game.RoleUpdatePropertyNty | |
1190 | 1190 | (*RoleUpdateItemsNty)(nil), // 10: game.RoleUpdateItemsNty |
1191 | 1191 | (*RoleClearItemsReq)(nil), // 11: game.RoleClearItemsReq |
1192 | 1192 | (*RoleStartBattleReq)(nil), // 12: game.RoleStartBattleReq |
1193 | 1193 | (*RoleEndBattleReq)(nil), // 13: game.RoleEndBattleReq |
1194 | 1194 | (*RoleEndBattleRsp)(nil), // 14: game.RoleEndBattleRsp |
1195 | 1195 | (*EquipmentDelReq)(nil), // 15: game.EquipmentDelReq |
1196 | - (*EquipmentAddRsp)(nil), // 16: game.EquipmentAddRsp | |
1196 | + (*EquipmentAddNty)(nil), // 16: game.EquipmentAddNty | |
1197 | 1197 | (*HeroUpLevelReq)(nil), // 17: game.HeroUpLevelReq |
1198 | 1198 | (*HeroUpLevelRsp)(nil), // 18: game.HeroUpLevelRsp |
1199 | 1199 | (*Team)(nil), // 19: models.Team |
... | ... | @@ -1208,9 +1208,9 @@ var file_game_proto_depIdxs = []int32{ |
1208 | 1208 | 21, // 3: game.RoleRsp.hero:type_name -> models.Hero |
1209 | 1209 | 19, // 4: game.RoleRsp.team:type_name -> models.Team |
1210 | 1210 | 22, // 5: game.RoleRsp.equipments:type_name -> models.Equipment |
1211 | - 20, // 6: game.RoleUpdatePropertyRsp.role:type_name -> models.Role | |
1211 | + 20, // 6: game.RoleUpdatePropertyNty.role:type_name -> models.Role | |
1212 | 1212 | 21, // 7: game.RoleEndBattleRsp.hero:type_name -> models.Hero |
1213 | - 22, // 8: game.EquipmentAddRsp.equip:type_name -> models.Equipment | |
1213 | + 22, // 8: game.EquipmentAddNty.equip:type_name -> models.Equipment | |
1214 | 1214 | 21, // 9: game.HeroUpLevelRsp.hero:type_name -> models.Hero |
1215 | 1215 | 10, // [10:10] is the sub-list for method output_type |
1216 | 1216 | 10, // [10:10] is the sub-list for method input_type |
... | ... | @@ -1335,7 +1335,7 @@ func file_game_proto_init() { |
1335 | 1335 | } |
1336 | 1336 | } |
1337 | 1337 | file_game_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { |
1338 | - switch v := v.(*RoleUpdatePropertyRsp); i { | |
1338 | + switch v := v.(*RoleUpdatePropertyNty); i { | |
1339 | 1339 | case 0: |
1340 | 1340 | return &v.state |
1341 | 1341 | case 1: |
... | ... | @@ -1419,7 +1419,7 @@ func file_game_proto_init() { |
1419 | 1419 | } |
1420 | 1420 | } |
1421 | 1421 | file_game_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { |
1422 | - switch v := v.(*EquipmentAddRsp); i { | |
1422 | + switch v := v.(*EquipmentAddNty); i { | |
1423 | 1423 | case 0: |
1424 | 1424 | return &v.state |
1425 | 1425 | case 1: | ... | ... |
pb/models.pb.go
... | ... | @@ -83,6 +83,61 @@ func (x *Account) GetUid() string { |
83 | 83 | return "" |
84 | 84 | } |
85 | 85 | |
86 | +type Config struct { | |
87 | + state protoimpl.MessageState | |
88 | + sizeCache protoimpl.SizeCache | |
89 | + unknownFields protoimpl.UnknownFields | |
90 | + | |
91 | + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" index:"unique" pri:"1"` // @inject_tag: index:"unique" pri:"1" | |
92 | + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` | |
93 | +} | |
94 | + | |
95 | +func (x *Config) Reset() { | |
96 | + *x = Config{} | |
97 | + if protoimpl.UnsafeEnabled { | |
98 | + mi := &file_models_proto_msgTypes[1] | |
99 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
100 | + ms.StoreMessageInfo(mi) | |
101 | + } | |
102 | +} | |
103 | + | |
104 | +func (x *Config) String() string { | |
105 | + return protoimpl.X.MessageStringOf(x) | |
106 | +} | |
107 | + | |
108 | +func (*Config) ProtoMessage() {} | |
109 | + | |
110 | +func (x *Config) ProtoReflect() protoreflect.Message { | |
111 | + mi := &file_models_proto_msgTypes[1] | |
112 | + if protoimpl.UnsafeEnabled && x != nil { | |
113 | + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) | |
114 | + if ms.LoadMessageInfo() == nil { | |
115 | + ms.StoreMessageInfo(mi) | |
116 | + } | |
117 | + return ms | |
118 | + } | |
119 | + return mi.MessageOf(x) | |
120 | +} | |
121 | + | |
122 | +// Deprecated: Use Config.ProtoReflect.Descriptor instead. | |
123 | +func (*Config) Descriptor() ([]byte, []int) { | |
124 | + return file_models_proto_rawDescGZIP(), []int{1} | |
125 | +} | |
126 | + | |
127 | +func (x *Config) GetId() string { | |
128 | + if x != nil { | |
129 | + return x.Id | |
130 | + } | |
131 | + return "" | |
132 | +} | |
133 | + | |
134 | +func (x *Config) GetVersion() string { | |
135 | + if x != nil { | |
136 | + return x.Version | |
137 | + } | |
138 | + return "" | |
139 | +} | |
140 | + | |
86 | 141 | type Hero struct { |
87 | 142 | state protoimpl.MessageState |
88 | 143 | sizeCache protoimpl.SizeCache |
... | ... | @@ -101,7 +156,7 @@ type Hero struct { |
101 | 156 | func (x *Hero) Reset() { |
102 | 157 | *x = Hero{} |
103 | 158 | if protoimpl.UnsafeEnabled { |
104 | - mi := &file_models_proto_msgTypes[1] | |
159 | + mi := &file_models_proto_msgTypes[2] | |
105 | 160 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
106 | 161 | ms.StoreMessageInfo(mi) |
107 | 162 | } |
... | ... | @@ -114,7 +169,7 @@ func (x *Hero) String() string { |
114 | 169 | func (*Hero) ProtoMessage() {} |
115 | 170 | |
116 | 171 | func (x *Hero) ProtoReflect() protoreflect.Message { |
117 | - mi := &file_models_proto_msgTypes[1] | |
172 | + mi := &file_models_proto_msgTypes[2] | |
118 | 173 | if protoimpl.UnsafeEnabled && x != nil { |
119 | 174 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
120 | 175 | if ms.LoadMessageInfo() == nil { |
... | ... | @@ -127,7 +182,7 @@ func (x *Hero) ProtoReflect() protoreflect.Message { |
127 | 182 | |
128 | 183 | // Deprecated: Use Hero.ProtoReflect.Descriptor instead. |
129 | 184 | func (*Hero) Descriptor() ([]byte, []int) { |
130 | - return file_models_proto_rawDescGZIP(), []int{1} | |
185 | + return file_models_proto_rawDescGZIP(), []int{2} | |
131 | 186 | } |
132 | 187 | |
133 | 188 | func (x *Hero) GetId() string { |
... | ... | @@ -203,7 +258,7 @@ type Equipment struct { |
203 | 258 | func (x *Equipment) Reset() { |
204 | 259 | *x = Equipment{} |
205 | 260 | if protoimpl.UnsafeEnabled { |
206 | - mi := &file_models_proto_msgTypes[2] | |
261 | + mi := &file_models_proto_msgTypes[3] | |
207 | 262 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
208 | 263 | ms.StoreMessageInfo(mi) |
209 | 264 | } |
... | ... | @@ -216,7 +271,7 @@ func (x *Equipment) String() string { |
216 | 271 | func (*Equipment) ProtoMessage() {} |
217 | 272 | |
218 | 273 | func (x *Equipment) ProtoReflect() protoreflect.Message { |
219 | - mi := &file_models_proto_msgTypes[2] | |
274 | + mi := &file_models_proto_msgTypes[3] | |
220 | 275 | if protoimpl.UnsafeEnabled && x != nil { |
221 | 276 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
222 | 277 | if ms.LoadMessageInfo() == nil { |
... | ... | @@ -229,7 +284,7 @@ func (x *Equipment) ProtoReflect() protoreflect.Message { |
229 | 284 | |
230 | 285 | // Deprecated: Use Equipment.ProtoReflect.Descriptor instead. |
231 | 286 | func (*Equipment) Descriptor() ([]byte, []int) { |
232 | - return file_models_proto_rawDescGZIP(), []int{2} | |
287 | + return file_models_proto_rawDescGZIP(), []int{3} | |
233 | 288 | } |
234 | 289 | |
235 | 290 | func (x *Equipment) GetId() string { |
... | ... | @@ -293,7 +348,7 @@ type Prop struct { |
293 | 348 | func (x *Prop) Reset() { |
294 | 349 | *x = Prop{} |
295 | 350 | if protoimpl.UnsafeEnabled { |
296 | - mi := &file_models_proto_msgTypes[3] | |
351 | + mi := &file_models_proto_msgTypes[4] | |
297 | 352 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
298 | 353 | ms.StoreMessageInfo(mi) |
299 | 354 | } |
... | ... | @@ -306,7 +361,7 @@ func (x *Prop) String() string { |
306 | 361 | func (*Prop) ProtoMessage() {} |
307 | 362 | |
308 | 363 | func (x *Prop) ProtoReflect() protoreflect.Message { |
309 | - mi := &file_models_proto_msgTypes[3] | |
364 | + mi := &file_models_proto_msgTypes[4] | |
310 | 365 | if protoimpl.UnsafeEnabled && x != nil { |
311 | 366 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
312 | 367 | if ms.LoadMessageInfo() == nil { |
... | ... | @@ -319,7 +374,7 @@ func (x *Prop) ProtoReflect() protoreflect.Message { |
319 | 374 | |
320 | 375 | // Deprecated: Use Prop.ProtoReflect.Descriptor instead. |
321 | 376 | func (*Prop) Descriptor() ([]byte, []int) { |
322 | - return file_models_proto_rawDescGZIP(), []int{3} | |
377 | + return file_models_proto_rawDescGZIP(), []int{4} | |
323 | 378 | } |
324 | 379 | |
325 | 380 | func (x *Prop) GetId() string { |
... | ... | @@ -351,7 +406,7 @@ type Team struct { |
351 | 406 | func (x *Team) Reset() { |
352 | 407 | *x = Team{} |
353 | 408 | if protoimpl.UnsafeEnabled { |
354 | - mi := &file_models_proto_msgTypes[4] | |
409 | + mi := &file_models_proto_msgTypes[5] | |
355 | 410 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
356 | 411 | ms.StoreMessageInfo(mi) |
357 | 412 | } |
... | ... | @@ -364,7 +419,7 @@ func (x *Team) String() string { |
364 | 419 | func (*Team) ProtoMessage() {} |
365 | 420 | |
366 | 421 | func (x *Team) ProtoReflect() protoreflect.Message { |
367 | - mi := &file_models_proto_msgTypes[4] | |
422 | + mi := &file_models_proto_msgTypes[5] | |
368 | 423 | if protoimpl.UnsafeEnabled && x != nil { |
369 | 424 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
370 | 425 | if ms.LoadMessageInfo() == nil { |
... | ... | @@ -377,7 +432,7 @@ func (x *Team) ProtoReflect() protoreflect.Message { |
377 | 432 | |
378 | 433 | // Deprecated: Use Team.ProtoReflect.Descriptor instead. |
379 | 434 | func (*Team) Descriptor() ([]byte, []int) { |
380 | - return file_models_proto_rawDescGZIP(), []int{4} | |
435 | + return file_models_proto_rawDescGZIP(), []int{5} | |
381 | 436 | } |
382 | 437 | |
383 | 438 | func (x *Team) GetId() string { |
... | ... | @@ -427,7 +482,7 @@ type Increment struct { |
427 | 482 | func (x *Increment) Reset() { |
428 | 483 | *x = Increment{} |
429 | 484 | if protoimpl.UnsafeEnabled { |
430 | - mi := &file_models_proto_msgTypes[5] | |
485 | + mi := &file_models_proto_msgTypes[6] | |
431 | 486 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
432 | 487 | ms.StoreMessageInfo(mi) |
433 | 488 | } |
... | ... | @@ -440,7 +495,7 @@ func (x *Increment) String() string { |
440 | 495 | func (*Increment) ProtoMessage() {} |
441 | 496 | |
442 | 497 | func (x *Increment) ProtoReflect() protoreflect.Message { |
443 | - mi := &file_models_proto_msgTypes[5] | |
498 | + mi := &file_models_proto_msgTypes[6] | |
444 | 499 | if protoimpl.UnsafeEnabled && x != nil { |
445 | 500 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
446 | 501 | if ms.LoadMessageInfo() == nil { |
... | ... | @@ -453,7 +508,7 @@ func (x *Increment) ProtoReflect() protoreflect.Message { |
453 | 508 | |
454 | 509 | // Deprecated: Use Increment.ProtoReflect.Descriptor instead. |
455 | 510 | func (*Increment) Descriptor() ([]byte, []int) { |
456 | - return file_models_proto_rawDescGZIP(), []int{5} | |
511 | + return file_models_proto_rawDescGZIP(), []int{6} | |
457 | 512 | } |
458 | 513 | |
459 | 514 | func (x *Increment) GetKey() string { |
... | ... | @@ -499,7 +554,7 @@ type Role struct { |
499 | 554 | func (x *Role) Reset() { |
500 | 555 | *x = Role{} |
501 | 556 | if protoimpl.UnsafeEnabled { |
502 | - mi := &file_models_proto_msgTypes[6] | |
557 | + mi := &file_models_proto_msgTypes[7] | |
503 | 558 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
504 | 559 | ms.StoreMessageInfo(mi) |
505 | 560 | } |
... | ... | @@ -512,7 +567,7 @@ func (x *Role) String() string { |
512 | 567 | func (*Role) ProtoMessage() {} |
513 | 568 | |
514 | 569 | func (x *Role) ProtoReflect() protoreflect.Message { |
515 | - mi := &file_models_proto_msgTypes[6] | |
570 | + mi := &file_models_proto_msgTypes[7] | |
516 | 571 | if protoimpl.UnsafeEnabled && x != nil { |
517 | 572 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
518 | 573 | if ms.LoadMessageInfo() == nil { |
... | ... | @@ -525,7 +580,7 @@ func (x *Role) ProtoReflect() protoreflect.Message { |
525 | 580 | |
526 | 581 | // Deprecated: Use Role.ProtoReflect.Descriptor instead. |
527 | 582 | func (*Role) Descriptor() ([]byte, []int) { |
528 | - return file_models_proto_rawDescGZIP(), []int{6} | |
583 | + return file_models_proto_rawDescGZIP(), []int{7} | |
529 | 584 | } |
530 | 585 | |
531 | 586 | func (x *Role) GetId() string { |
... | ... | @@ -670,88 +725,91 @@ var file_models_proto_rawDesc = []byte{ |
670 | 725 | 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, |
671 | 726 | 0x6f, 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, |
672 | 727 | 0x6f, 0x72, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, |
673 | - 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0xc9, 0x01, 0x0a, 0x04, 0x48, 0x65, 0x72, 0x6f, 0x12, 0x0e, | |
674 | - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, | |
675 | - 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, | |
676 | - 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, | |
677 | - 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6c, | |
678 | - 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, | |
679 | - 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, | |
680 | - 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x43, 0x6f, 0x75, 0x6e, 0x74, | |
681 | - 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x06, | |
682 | - 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, | |
683 | - 0x1e, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, | |
684 | - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, | |
685 | - 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, | |
686 | - 0x70, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x12, | |
728 | + 0x52, 0x03, 0x75, 0x69, 0x64, 0x22, 0x32, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, | |
687 | 729 | 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, |
688 | - 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, | |
689 | - 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x62, 0x5f, 0x69, | |
690 | - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x62, 0x49, 0x64, 0x12, 0x23, 0x0a, | |
691 | - 0x0d, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, | |
692 | - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x4c, 0x65, 0x76, | |
693 | - 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, | |
694 | - 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x71, | |
695 | - 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x71, 0x75, | |
696 | - 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, 0x18, 0x07, 0x20, 0x01, | |
697 | - 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x2c, 0x0a, 0x04, 0x50, 0x72, 0x6f, 0x70, 0x12, | |
698 | - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, | |
699 | - 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, | |
700 | - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x04, 0x54, 0x65, 0x61, 0x6d, 0x12, 0x0e, | |
701 | - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, | |
702 | - 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, | |
703 | - 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, | |
704 | - 0x69, 0x64, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, | |
705 | - 0x64, 0x31, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x32, 0x18, 0x04, | |
706 | - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x32, 0x12, 0x19, 0x0a, | |
707 | - 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x33, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, | |
708 | - 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x33, 0x22, 0x2f, 0x0a, 0x09, 0x49, 0x6e, 0x63, 0x72, | |
709 | - 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, | |
710 | - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, 0x61, 0x6c, 0x18, 0x02, | |
711 | - 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x99, 0x05, 0x0a, 0x04, 0x52, 0x6f, | |
712 | - 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, | |
713 | - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, | |
714 | - 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x18, 0x03, | |
715 | - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, | |
716 | - 0x6e, 0x69, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x6b, | |
717 | - 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, | |
718 | - 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x06, 0x20, | |
719 | - 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x68, 0x70, 0x18, 0x07, | |
720 | - 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x68, 0x70, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x70, 0x5f, 0x6d, | |
721 | - 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x68, 0x70, 0x4d, 0x61, 0x78, 0x12, | |
722 | - 0x13, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, | |
723 | - 0x62, 0x75, 0x79, 0x52, 0x12, 0x13, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x5f, 0x72, 0x18, 0x0c, 0x20, | |
724 | - 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x79, 0x52, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x65, 0x6c, | |
725 | - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x06, 0x69, | |
726 | - 0x6e, 0x63, 0x72, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x6d, 0x6f, | |
727 | - 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, | |
728 | - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x12, 0x14, 0x0a, | |
729 | - 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x74, | |
730 | - 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, | |
731 | - 0x6d, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, | |
732 | - 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, | |
733 | - 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x77, | |
734 | - 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x6f, | |
735 | - 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0d, 0x52, | |
736 | - 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x6a, | |
737 | - 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x13, 0x20, 0x01, 0x28, | |
738 | - 0x0d, 0x52, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, | |
739 | - 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x69, 0x74, | |
740 | - 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, | |
741 | - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, | |
742 | - 0x70, 0x74, 0x65, 0x72, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x6f, | |
743 | - 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x50, 0x61, 0x73, 0x73, 0x63, 0x68, | |
744 | - 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x70, 0x61, 0x73, | |
745 | - 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x49, 0x6e, 0x63, | |
746 | - 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, | |
747 | - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, | |
748 | - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, | |
749 | - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, | |
750 | - 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, | |
751 | - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, | |
752 | - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, | |
753 | - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, | |
754 | - 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
730 | + 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, | |
731 | + 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc9, 0x01, 0x0a, 0x04, 0x48, 0x65, | |
732 | + 0x72, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, | |
733 | + 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, | |
734 | + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, | |
735 | + 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, | |
736 | + 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, | |
737 | + 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x63, 0x6f, | |
738 | + 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x43, | |
739 | + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x69, 0x6e, 0x5f, 0x70, 0x6f, 0x69, | |
740 | + 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x72, 0x65, 0x69, 0x6e, 0x50, 0x6f, | |
741 | + 0x69, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, | |
742 | + 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, | |
743 | + 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, | |
744 | + 0x52, 0x03, 0x65, 0x78, 0x70, 0x22, 0xb3, 0x01, 0x0a, 0x09, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, | |
745 | + 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, | |
746 | + 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, | |
747 | + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x13, 0x0a, 0x05, | |
748 | + 0x74, 0x62, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x62, 0x49, | |
749 | + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x6c, 0x65, 0x76, | |
750 | + 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x65, 0x6e, 0x68, 0x61, 0x6e, 0x63, | |
751 | + 0x65, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, | |
752 | + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x12, | |
753 | + 0x18, 0x0a, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, | |
754 | + 0x52, 0x07, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x70, 0x6f, 0x73, | |
755 | + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x70, 0x6f, 0x73, 0x22, 0x2c, 0x0a, 0x04, 0x50, | |
756 | + 0x72, 0x6f, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, | |
757 | + 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, | |
758 | + 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x04, 0x54, 0x65, | |
759 | + 0x61, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, | |
760 | + 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x72, 0x6f, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, | |
761 | + 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x6f, 0x6c, 0x65, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x68, | |
762 | + 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x31, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, | |
763 | + 0x65, 0x72, 0x6f, 0x49, 0x64, 0x31, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, | |
764 | + 0x64, 0x32, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, | |
765 | + 0x32, 0x12, 0x19, 0x0a, 0x08, 0x68, 0x65, 0x72, 0x6f, 0x5f, 0x69, 0x64, 0x33, 0x18, 0x05, 0x20, | |
766 | + 0x01, 0x28, 0x09, 0x52, 0x07, 0x68, 0x65, 0x72, 0x6f, 0x49, 0x64, 0x33, 0x22, 0x2f, 0x0a, 0x09, | |
767 | + 0x49, 0x6e, 0x63, 0x72, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, | |
768 | + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x76, | |
769 | + 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x76, 0x61, 0x6c, 0x22, 0x99, 0x05, | |
770 | + 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, | |
771 | + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, | |
772 | + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x76, 0x69, | |
773 | + 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, | |
774 | + 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, | |
775 | + 0x6e, 0x69, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x05, 0x20, | |
776 | + 0x01, 0x28, 0x05, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x78, | |
777 | + 0x70, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x78, 0x70, 0x12, 0x0e, 0x0a, 0x02, | |
778 | + 0x68, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x68, 0x70, 0x12, 0x15, 0x0a, 0x06, | |
779 | + 0x68, 0x70, 0x5f, 0x6d, 0x61, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x68, 0x70, | |
780 | + 0x4d, 0x61, 0x78, 0x12, 0x13, 0x0a, 0x05, 0x62, 0x75, 0x79, 0x5f, 0x72, 0x18, 0x0b, 0x20, 0x01, | |
781 | + 0x28, 0x09, 0x52, 0x04, 0x62, 0x75, 0x79, 0x52, 0x12, 0x13, 0x0a, 0x05, 0x70, 0x61, 0x79, 0x5f, | |
782 | + 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x79, 0x52, 0x12, 0x10, 0x0a, | |
783 | + 0x03, 0x64, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x64, 0x65, 0x6c, 0x12, | |
784 | + 0x30, 0x0a, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0b, 0x32, | |
785 | + 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x49, 0x6e, | |
786 | + 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x69, 0x6e, 0x63, 0x72, 0x65, | |
787 | + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, | |
788 | + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6c, 0x6f, 0x74, 0x68, | |
789 | + 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x63, | |
790 | + 0x6c, 0x6f, 0x74, 0x68, 0x65, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x77, | |
791 | + 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, | |
792 | + 0x0d, 0x52, 0x0c, 0x77, 0x65, 0x61, 0x70, 0x6f, 0x6e, 0x73, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, | |
793 | + 0x1e, 0x0a, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x12, 0x20, | |
794 | + 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, | |
795 | + 0x22, 0x0a, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, | |
796 | + 0x13, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6a, 0x65, 0x77, 0x65, 0x6c, 0x72, 0x79, 0x6c, 0x69, | |
797 | + 0x6d, 0x69, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x6c, | |
798 | + 0x69, 0x6d, 0x69, 0x74, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x6d, 0x61, 0x74, 0x65, | |
799 | + 0x72, 0x69, 0x61, 0x6c, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x42, 0x0a, 0x0c, 0x70, 0x61, 0x73, | |
800 | + 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x18, 0x15, 0x20, 0x03, 0x28, 0x0b, 0x32, | |
801 | + 0x1e, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x52, 0x6f, 0x6c, 0x65, 0x2e, 0x50, 0x61, | |
802 | + 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, | |
803 | + 0x0c, 0x70, 0x61, 0x73, 0x73, 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x1a, 0x39, 0x0a, | |
804 | + 0x0b, 0x49, 0x6e, 0x63, 0x72, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, | |
805 | + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, | |
806 | + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, | |
807 | + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3f, 0x0a, 0x11, 0x50, 0x61, 0x73, 0x73, | |
808 | + 0x63, 0x68, 0x61, 0x70, 0x74, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, | |
809 | + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, | |
810 | + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, | |
811 | + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, | |
812 | + 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
755 | 813 | } |
756 | 814 | |
757 | 815 | var ( |
... | ... | @@ -766,21 +824,22 @@ func file_models_proto_rawDescGZIP() []byte { |
766 | 824 | return file_models_proto_rawDescData |
767 | 825 | } |
768 | 826 | |
769 | -var file_models_proto_msgTypes = make([]protoimpl.MessageInfo, 9) | |
827 | +var file_models_proto_msgTypes = make([]protoimpl.MessageInfo, 10) | |
770 | 828 | var file_models_proto_goTypes = []interface{}{ |
771 | 829 | (*Account)(nil), // 0: models.Account |
772 | - (*Hero)(nil), // 1: models.Hero | |
773 | - (*Equipment)(nil), // 2: models.Equipment | |
774 | - (*Prop)(nil), // 3: models.Prop | |
775 | - (*Team)(nil), // 4: models.Team | |
776 | - (*Increment)(nil), // 5: models.Increment | |
777 | - (*Role)(nil), // 6: models.Role | |
778 | - nil, // 7: models.Role.IncresEntry | |
779 | - nil, // 8: models.Role.PasschaptersEntry | |
830 | + (*Config)(nil), // 1: models.Config | |
831 | + (*Hero)(nil), // 2: models.Hero | |
832 | + (*Equipment)(nil), // 3: models.Equipment | |
833 | + (*Prop)(nil), // 4: models.Prop | |
834 | + (*Team)(nil), // 5: models.Team | |
835 | + (*Increment)(nil), // 6: models.Increment | |
836 | + (*Role)(nil), // 7: models.Role | |
837 | + nil, // 8: models.Role.IncresEntry | |
838 | + nil, // 9: models.Role.PasschaptersEntry | |
780 | 839 | } |
781 | 840 | var file_models_proto_depIdxs = []int32{ |
782 | - 7, // 0: models.Role.incres:type_name -> models.Role.IncresEntry | |
783 | - 8, // 1: models.Role.passchapters:type_name -> models.Role.PasschaptersEntry | |
841 | + 8, // 0: models.Role.incres:type_name -> models.Role.IncresEntry | |
842 | + 9, // 1: models.Role.passchapters:type_name -> models.Role.PasschaptersEntry | |
784 | 843 | 2, // [2:2] is the sub-list for method output_type |
785 | 844 | 2, // [2:2] is the sub-list for method input_type |
786 | 845 | 2, // [2:2] is the sub-list for extension type_name |
... | ... | @@ -807,7 +866,7 @@ func file_models_proto_init() { |
807 | 866 | } |
808 | 867 | } |
809 | 868 | file_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { |
810 | - switch v := v.(*Hero); i { | |
869 | + switch v := v.(*Config); i { | |
811 | 870 | case 0: |
812 | 871 | return &v.state |
813 | 872 | case 1: |
... | ... | @@ -819,7 +878,7 @@ func file_models_proto_init() { |
819 | 878 | } |
820 | 879 | } |
821 | 880 | file_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { |
822 | - switch v := v.(*Equipment); i { | |
881 | + switch v := v.(*Hero); i { | |
823 | 882 | case 0: |
824 | 883 | return &v.state |
825 | 884 | case 1: |
... | ... | @@ -831,7 +890,7 @@ func file_models_proto_init() { |
831 | 890 | } |
832 | 891 | } |
833 | 892 | file_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { |
834 | - switch v := v.(*Prop); i { | |
893 | + switch v := v.(*Equipment); i { | |
835 | 894 | case 0: |
836 | 895 | return &v.state |
837 | 896 | case 1: |
... | ... | @@ -843,7 +902,7 @@ func file_models_proto_init() { |
843 | 902 | } |
844 | 903 | } |
845 | 904 | file_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { |
846 | - switch v := v.(*Team); i { | |
905 | + switch v := v.(*Prop); i { | |
847 | 906 | case 0: |
848 | 907 | return &v.state |
849 | 908 | case 1: |
... | ... | @@ -855,7 +914,7 @@ func file_models_proto_init() { |
855 | 914 | } |
856 | 915 | } |
857 | 916 | file_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { |
858 | - switch v := v.(*Increment); i { | |
917 | + switch v := v.(*Team); i { | |
859 | 918 | case 0: |
860 | 919 | return &v.state |
861 | 920 | case 1: |
... | ... | @@ -867,6 +926,18 @@ func file_models_proto_init() { |
867 | 926 | } |
868 | 927 | } |
869 | 928 | file_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { |
929 | + switch v := v.(*Increment); i { | |
930 | + case 0: | |
931 | + return &v.state | |
932 | + case 1: | |
933 | + return &v.sizeCache | |
934 | + case 2: | |
935 | + return &v.unknownFields | |
936 | + default: | |
937 | + return nil | |
938 | + } | |
939 | + } | |
940 | + file_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { | |
870 | 941 | switch v := v.(*Role); i { |
871 | 942 | case 0: |
872 | 943 | return &v.state |
... | ... | @@ -885,7 +956,7 @@ func file_models_proto_init() { |
885 | 956 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
886 | 957 | RawDescriptor: file_models_proto_rawDesc, |
887 | 958 | NumEnums: 0, |
888 | - NumMessages: 9, | |
959 | + NumMessages: 10, | |
889 | 960 | NumExtensions: 0, |
890 | 961 | NumServices: 0, |
891 | 962 | }, | ... | ... |
pb/protocode.pb.go
... | ... | @@ -35,13 +35,9 @@ const ( |
35 | 35 | ProtoCode_EquipmentDelRpc ProtoCode = 9 |
36 | 36 | ProtoCode_HeroUpLevelRpc ProtoCode = 10 |
37 | 37 | ProtoCode_DisConnectNty ProtoCode = 11 |
38 | - ProtoCode_RoleUpdateItemsNty ProtoCode = 12 | |
39 | - ProtoCode_HeartRsp ProtoCode = 13 | |
40 | - ProtoCode_RoleRsp ProtoCode = 14 | |
41 | - ProtoCode_RoleUpdatePropertyRsp ProtoCode = 15 | |
42 | - ProtoCode_RoleEndBattleRsp ProtoCode = 16 | |
43 | - ProtoCode_EquipmentAddRsp ProtoCode = 17 | |
44 | - ProtoCode_HeroUpLevelRsp ProtoCode = 18 | |
38 | + ProtoCode_RoleUpdatePropertyNty ProtoCode = 12 | |
39 | + ProtoCode_RoleUpdateItemsNty ProtoCode = 13 | |
40 | + ProtoCode_EquipmentAddNty ProtoCode = 14 | |
45 | 41 | ) |
46 | 42 | |
47 | 43 | // Enum value maps for ProtoCode. |
... | ... | @@ -59,13 +55,9 @@ var ( |
59 | 55 | 9: "EquipmentDelRpc", |
60 | 56 | 10: "HeroUpLevelRpc", |
61 | 57 | 11: "DisConnectNty", |
62 | - 12: "RoleUpdateItemsNty", | |
63 | - 13: "HeartRsp", | |
64 | - 14: "RoleRsp", | |
65 | - 15: "RoleUpdatePropertyRsp", | |
66 | - 16: "RoleEndBattleRsp", | |
67 | - 17: "EquipmentAddRsp", | |
68 | - 18: "HeroUpLevelRsp", | |
58 | + 12: "RoleUpdatePropertyNty", | |
59 | + 13: "RoleUpdateItemsNty", | |
60 | + 14: "EquipmentAddNty", | |
69 | 61 | } |
70 | 62 | ProtoCode_value = map[string]int32{ |
71 | 63 | "UNKNOWN": 0, |
... | ... | @@ -80,13 +72,9 @@ var ( |
80 | 72 | "EquipmentDelRpc": 9, |
81 | 73 | "HeroUpLevelRpc": 10, |
82 | 74 | "DisConnectNty": 11, |
83 | - "RoleUpdateItemsNty": 12, | |
84 | - "HeartRsp": 13, | |
85 | - "RoleRsp": 14, | |
86 | - "RoleUpdatePropertyRsp": 15, | |
87 | - "RoleEndBattleRsp": 16, | |
88 | - "EquipmentAddRsp": 17, | |
89 | - "HeroUpLevelRsp": 18, | |
75 | + "RoleUpdatePropertyNty": 12, | |
76 | + "RoleUpdateItemsNty": 13, | |
77 | + "EquipmentAddNty": 14, | |
90 | 78 | } |
91 | 79 | ) |
92 | 80 | |
... | ... | @@ -121,7 +109,7 @@ var File_protocode_proto protoreflect.FileDescriptor |
121 | 109 | |
122 | 110 | var file_protocode_proto_rawDesc = []byte{ |
123 | 111 | 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, |
124 | - 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xfb, 0x02, 0x0a, | |
112 | + 0x6f, 0x12, 0x09, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x64, 0x65, 0x2a, 0xb6, 0x02, 0x0a, | |
125 | 113 | 0x09, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, |
126 | 114 | 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, |
127 | 115 | 0x52, 0x70, 0x63, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x70, |
... | ... | @@ -136,17 +124,13 @@ var file_protocode_proto_rawDesc = []byte{ |
136 | 124 | 0x08, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, |
137 | 125 | 0x6c, 0x52, 0x70, 0x63, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, |
138 | 126 | 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x70, 0x63, 0x10, 0x0a, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x69, |
139 | - 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4e, 0x74, 0x79, 0x10, 0x0b, 0x12, 0x16, 0x0a, | |
140 | - 0x12, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, | |
141 | - 0x4e, 0x74, 0x79, 0x10, 0x0c, 0x12, 0x0c, 0x0a, 0x08, 0x48, 0x65, 0x61, 0x72, 0x74, 0x52, 0x73, | |
142 | - 0x70, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x10, 0x0e, | |
143 | - 0x12, 0x19, 0x0a, 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, | |
144 | - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x73, 0x70, 0x10, 0x0f, 0x12, 0x14, 0x0a, 0x10, 0x52, | |
145 | - 0x6f, 0x6c, 0x65, 0x45, 0x6e, 0x64, 0x42, 0x61, 0x74, 0x74, 0x6c, 0x65, 0x52, 0x73, 0x70, 0x10, | |
146 | - 0x10, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, | |
147 | - 0x64, 0x52, 0x73, 0x70, 0x10, 0x11, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x65, 0x72, 0x6f, 0x55, 0x70, | |
148 | - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x73, 0x70, 0x10, 0x12, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, | |
149 | - 0x2f, 0x70, 0x62, 0x3b, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
127 | + 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x4e, 0x74, 0x79, 0x10, 0x0b, 0x12, 0x19, 0x0a, | |
128 | + 0x15, 0x52, 0x6f, 0x6c, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x70, 0x65, | |
129 | + 0x72, 0x74, 0x79, 0x4e, 0x74, 0x79, 0x10, 0x0c, 0x12, 0x16, 0x0a, 0x12, 0x52, 0x6f, 0x6c, 0x65, | |
130 | + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x4e, 0x74, 0x79, 0x10, 0x0d, | |
131 | + 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x71, 0x75, 0x69, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x41, 0x64, 0x64, | |
132 | + 0x4e, 0x74, 0x79, 0x10, 0x0e, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x62, 0x3b, 0x70, | |
133 | + 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, | |
150 | 134 | } |
151 | 135 | |
152 | 136 | var ( | ... | ... |
tools/generator.py
... | ... | @@ -9,7 +9,7 @@ ProtoCodeStr = "syntax = \"proto3\";\noption go_package = \"../pb;pb\";\n\npacka |
9 | 9 | "UNKNOWN = 0;\n {}\n}} " |
10 | 10 | ProtoCodeLineReq = "\t{}Rpc = {};\n" |
11 | 11 | ProtoCodeLineRsp = "\t{}Rsp = {};\n" |
12 | -ProtoCodeLineNty = "\t{}Nty= {};\n" | |
12 | +ProtoCodeLineNty = "\t{}Nty = {};\n" | |
13 | 13 | |
14 | 14 | GoProtoCodeStr = "package action\n\nimport (\n\t\"pro2d/common/logger\"\n\t\"pro2d/pb\"\n)\n\nfunc GetActionMap() " \ |
15 | 15 | "map[interface{{}}]interface{{}} {{\n\tlogger.Debug(\"init protocode...\")\n\tam := make(map[interface{{" \ |
... | ... | @@ -81,22 +81,22 @@ def generatorProto(path): |
81 | 81 | GoCodeTestData += GoProtoCodeTestNtyLine.format(messageStr[:n3], messageStr[:n3]) |
82 | 82 | |
83 | 83 | # rsp 满足客户端需要 |
84 | - for line in lines: | |
85 | - if line.find("message") == -1: | |
86 | - continue | |
87 | - sline = line.split(' ') | |
88 | - if len(sline) < 2: | |
89 | - continue | |
90 | - | |
91 | - messageStr = sline[1].replace('\n', '').replace('{', "") | |
92 | - n2 = messageStr.find('Rsp') | |
93 | - loginReq = messageStr.find('LoginReq') | |
94 | - if n2 != -1: | |
95 | - code += 1 | |
96 | - ProtoCodeData += ProtoCodeLineRsp.format(messageStr[:n2], code) | |
97 | - if loginReq != -1: | |
98 | - continue | |
99 | - GoCodeTestData += GoProtoCodeTestRspLine.format(messageStr[:n2], messageStr[:n2]) | |
84 | + # for line in lines: | |
85 | + # if line.find("message") == -1: | |
86 | + # continue | |
87 | + # sline = line.split(' ') | |
88 | + # if len(sline) < 2: | |
89 | + # continue | |
90 | + # | |
91 | + # messageStr = sline[1].replace('\n', '').replace('{', "") | |
92 | + # n2 = messageStr.find('Rsp') | |
93 | + # loginReq = messageStr.find('LoginReq') | |
94 | + # if n2 != -1: | |
95 | + # code += 1 | |
96 | + # ProtoCodeData += ProtoCodeLineRsp.format(messageStr[:n2], code) | |
97 | + # if loginReq != -1: | |
98 | + # continue | |
99 | + # GoCodeTestData += GoProtoCodeTestRspLine.format(messageStr[:n2], messageStr[:n2]) | |
100 | 100 | |
101 | 101 | |
102 | 102 | # protocode.go | ... | ... |