gateway_msg.proto
13.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
//syntax="proto3";
package gateway_msg;
import "common_msg.proto";
import "share_msg.proto";
////////////////////////////////////////////////
//gateway[0x00000,0x0ffff]
////////////////////////////////////////////////
////////////////////////////////////////////////
//登录消息,[0x00100,0x001ff]
////////////////////////////////////////////////
//登陆消息范围,用于服务器判定
enum LOGIN_CMD
{
LOGIN_CMD_BEGIN = 0x0100;//登录消息最小值
LOGIN_CMD_END = 0x01ff;//登录消息最大值
}
message login_msg//1,0x00101#登录
{
optional uint32 platform = 1;//登陆类型#share_msg.E_PLATFORM
optional string account = 2; //账号
optional string session = 3;//登录的session
}
message task_daily_t
{
optional uint32 type = 1;//任务类型#share_msg.E_TASK_DAILY_TYPE
optional uint32 param = 2;//参数
optional uint32 step_id = 3;//领取到的step_id
optional uint32 game_id = 4;//游戏ID,share_msg.E_GAME_ID_GD
}
message online_reward_t
{
optional uint32 id = 1;//领到的ID
optional uint32 time_sec = 2;//距离下一个ID的时间
}
message login_msg_res
{
optional uint32 has_role = 1;//是否有角色0:无,1:有
optional share_msg.load_role_t load_role = 2;//用户信息
repeated share_msg.item_t items = 3;//道具信息
repeated share_msg.score_t score = 4;//游戏积分
repeated task_daily_t task_daily = 5;//每日任务
repeated uint32 sign = 6;//签到信息
repeated uint32 sign_reward = 7;//已领取的签到奖励
optional uint32 role_reward = 8;//已领取的新手角色奖励
optional uint32 role_reward_time = 9;//已领取的新手角色奖励的时间
optional uint32 time_second = 10;//当前时间
repeated share_msg.score_t game_win = 11;//胜利次数
repeated share_msg.score_t game_lost = 12;//失败次数
repeated share_msg.mail_t mail = 14;//邮件
repeated uint32 lobby_id = 15;//大厅ID
optional uint32 create_reward = 16;//创建礼包,是否领取[0:未领取,1:领取过]
//支付,按天数领取(key:pay.xml中的id,val1:上次领取的时间,val2:到期时间)
repeated share_msg.key_val_t pay_day = 17;
repeated uint32 first_pay_id = 18;//使用过的首充
optional online_reward_t online_reward = 19;//每日在线礼包
optional uint32 relief_cnt = 20;//每日救济数量
optional uint32 task_left_change_cnt = 21;//每日任务 剩余改变次数
repeated task_daily_t finish_task_daily = 22;//已完成 每日任务
}
message create_role_msg//1,0x00104#创建角色
{
optional string nick = 1;
optional uint32 head = 2;//头像
}
message create_role_msg_res
{
}
////////////////////////////////////////////////
//登录之后的消息,消息ID必须比登录消息大
////////////////////////////////////////////////
////////////////////////////////////////////////
//榜单信息[0x00200,0x002ff]
////////////////////////////////////////////////
message get_rank_msg//1,0x00201#获取榜单
{
optional uint32 type = 1; //排名类型#share_msg.E_RANK_TYPE
}
message get_rank_msg_res
{
optional uint32 type = 1; //排名类型#share_msg.E_RANK_TYPE
repeated share_msg.rank_user_t rank_user = 4;//用户数据
optional uint32 data = 5; //用户自己数据
}
////////////////////////////////////////////////
//商店信息[0x00300,0x003ff]
////////////////////////////////////////////////
message shop_buy_msg//1,0x00301#买
{
optional uint32 id = 1; //
optional uint32 cnt = 2; //
}
message shop_buy_msg_res
{
}
message pay_get_id_msg//1,0x00350#获取订单号
{
optional string product = 3;//商品ID
}
message pay_get_id_msg_res
{
optional string pay_id = 1; //订单号
optional string url_callback = 2; //回调URL
optional string peng_bo_shi_token = 3; //鹏博士token
optional string zfb_url_callback = 4; //支付宝回调URL
optional string wx_url_callback = 5; //微信回调URL
}
message notify_pay_succ_msg//0,0x00351#购买成功
{
}
message notify_pay_succ_msg_res
{
optional string product = 1;//产品号
}
message get_pay_day_reward_msg//1,0x00352#领取购买的每天领取奖励
{
optional uint32 id = 1; //pay.xml中的id
}
message get_pay_day_reward_msg_res
{
}
////////////////////////////////////////////////
//角色基础信息[0x00400,0x004ff]
////////////////////////////////////////////////
message change_nick_msg//1,0x0402#改名字
{
optional uint32 id1 = 1;//名字表中的序号
optional uint32 id2 = 2;//名字表中的序号
optional uint32 id3 = 3;//名字表中的序号
}
message change_nick_msg_res
{
optional uint32 res = 1;//0:已改变,1:失败,被占用
optional string nick = 2;//名字
}
message change_head_msg//1,0x0403#改头像
{
optional uint32 head = 1;//头像
}
message change_head_msg_res
{
optional uint32 head = 1;//头像
}
////////////////////////////////////////////////
//任务信息[0x00500,0x005ff]
////////////////////////////////////////////////
message notify_task_daily_msg//0,0x00501#通知,每日任务
{
}
message notify_task_daily_msg_res
{
optional uint32 type = 1;//任务类型#share_msg.E_TASK_DAILY_TYPE
optional uint32 param = 2;//参数
optional uint32 game_id = 3;//游戏ID,share_msg.E_GAME_ID_GD
}
message get_task_daily_reward_msg//1,0x00502#领取每日任务的奖励
{
optional uint32 task_id = 1;//任务ID
optional uint32 step_id = 2;//步骤ID
optional uint32 game_id = 3;//游戏ID,share_msg.E_GAME_ID_GD
}
message get_task_daily_reward_msg_res
{
}
message notify_do_task_daily_msg//0,0x00503#通知,在做的每日任务
{
}
message notify_do_task_daily_msg_res
{
repeated task_daily_t task_daily = 5;//每日任务
}
message change_task_daily_msg//1,0x00504#改变每日任务
{
optional uint32 task_id = 1;//任务ID
optional uint32 game_id = 3;//游戏ID,share_msg.E_GAME_ID_GD
}
message change_task_daily_msg_res
{
repeated task_daily_t task_daily = 5;//每日任务
optional uint32 left_change_cnt = 6;//剩余改变次数
repeated task_daily_t finish_task_daily = 7;//已完成 每日任务
}
////////////////////////////////////////////////
//道具[0x00600,0x006ff]
////////////////////////////////////////////////
message notify_item_msg//0,0x0601#通知道具变化
{
}
message notify_item_msg_res
{
repeated share_msg.item_t items = 1;//物品变更
}
message notify_score_msg//0,0x0602#通知积分变化
{
}
message notify_score_msg_res
{
repeated share_msg.score_t score = 1;//积分变更
}
message use_item_msg//1,0x0603#使用道具
{
optional uint32 item_id = 1;//
optional uint64 peer_uid = 2;//对方UID
optional uint32 game_id = 3;//游戏ID,share_msg.E_GAME_ID
optional uint32 item_cnt = 4;//道具数量
}
message use_item_msg_res
{
optional uint64 uid = 1;//使用方UID
optional uint64 peer_uid = 2;//目标方UID
optional uint32 item_id = 3;//使用的道具
optional uint32 item_cnt = 4;//道具数量
}
message notify_win_cnt_msg//0,0x0604#通知胜利次数变化
{
}
message notify_win_cnt_msg_res
{
repeated share_msg.score_t win = 1;//胜利次数变更
}
message notify_lost_cnt_msg//0,0x0605#通知失败次数变化
{
}
message notify_lost_cnt_msg_res
{
repeated share_msg.score_t lost = 1;//失败次数变更
}
////////////////////////////////////////////////
//签到[0x00700,0x007ff]
////////////////////////////////////////////////
message sign_msg//1,0x00701#签到
{
}
message sign_msg_res
{
}
message sign_reward_msg//1,0x00702#签到领取奖励
{
optional uint32 day = 1;//领取sign.xml中哪个档次的奖励
}
message sign_reward_msg_res
{
optional uint32 day = 1;//领取sign.xml中哪个档次的奖励
}
message sign_update_msg//1,0x00703#补签
{
}
message sign_update_msg_res
{
optional uint32 sign_day = 1;//补签的日子
}
message get_role_reward_msg//1,0x00704#领取新手奖励
{
}
message get_role_reward_msg_res
{
}
message get_create_reward_msg//1,0x00705#领取创建奖励, [废除]
{
}
message get_create_reward_msg_res
{
}
message get_online_reward_msg//1,0x00706#领取每日在线礼包
{
}
message get_online_reward_msg_res
{
optional online_reward_t online_reward = 19;//刚才领取的 每日在线礼包
}
message show_btl_cnt_reward_msg//1,0x00707#新手对局福利展现
{
}
message show_btl_cnt_reward_msg_res
{
optional uint32 exprie = 1;//过期
optional uint32 btl_cnt = 2;//打了几局
optional uint32 day = 3;//第几天
optional uint32 get_sec = 4;//领取的时间点
}
message get_btl_cnt_reward_msg//1,0x00708#获取 新手对局福利
{
}
message get_btl_cnt_reward_msg_res
{
optional uint32 id = 3;//抽中的序号
}
message get_turntable_reward_msg//1,0x00709#获取 转盘抽奖
{
}
message get_turntable_reward_msg_res
{
optional uint32 id = 3;//抽中的序号
}
message get_turntable_reward_and_login_reward_msg//1,0x0070a#获取 转盘抽奖和登录奖励 信息
{
}
message get_turntable_reward_and_login_reward_msg_res
{
optional uint32 turntable_get = 1;//每日转盘是否今天领取过0:未领取,1:领取过
repeated uint32 login = 6;//登录信息
repeated uint32 login_reward = 7;//已领取的登录奖励
optional uint32 get_reward = 8;//本次领取登录奖励 0:本次未领取, 1:本次领取
}
message get_relief_msg//1,0x0070b#获取 救济
{
}
message get_relief_msg_res
{
optional uint32 relief_cnt = 20;//每日救济数量
}
////////////////////////////////////////////////
//事件[0x00800,0x008ff]
////////////////////////////////////////////////
message update_event_msg//1,0x0801#更新客户端事件
{
optional common_msg.event_t event = 1;
}
message update_event_msg_res
{
}
message get_event_msg//1,0x0802#获取客户端事件
{
optional uint32 type = 1;//type
optional uint64 id = 2;//id
}
message get_event_msg_res
{
optional common_msg.event_t event = 1;
}
//水果机基础结构
message fruit_machine_t
{
optional uint32 id = 1;//水果ID
optional uint32 cnt = 2;//数量
}
message game_fruit_machine_msg//1,0x0803#水果机
{
optional uint32 base_money = 1;//底钱
repeated fruit_machine_t fruit_machine = 2;//水果信息
}
message game_fruit_machine_msg_res
{
repeated share_msg.item_t items = 1;//奖励道具
repeated uint32 fruit = 2;//中奖的水果
}
////////////////////////////////////////////////
//邮件
////////////////////////////////////////////////
message notify_mail_msg//0,0x0901#通知邮件变化
{
}
message notify_mail_msg_res
{
optional share_msg.mail_t mail = 1;//邮件变更
}
message mail_attachment_msg//1,0x0902#领取邮件附件
{
optional uint32 idx = 1;//邮件序号
}
message mail_attachment_msg_res
{
}
message mail_read_msg//1,0x0903#读邮件
{
optional uint32 idx = 1;//邮件序号
}
message mail_read_msg_res
{
}
message mail_del_msg//1,0x0904#删除邮件
{
repeated uint32 idx = 1;//邮件序号
}
message mail_del_msg_res
{
repeated uint32 idx = 1;//邮件序号
}
////////////////////////////////////////////////
//lobby[0x01000,0x01fff]lobby相关消息
////////////////////////////////////////////////
message lobby_enter_msg//1,0x1000#进入大厅
{
optional uint32 lobby_id = 1;//大厅ID
}
message lobby_enter_msg_res
{
repeated share_msg.room_cfg_t room_cfg = 4;//每个场次,玩家人数
}
message lobby_enter_room_msg//1,0x1001#进入房间
{
optional uint32 base_money = 1;//押注
optional uint32 open_room_type = 2;//开房类型, 0:不开房,1:AA,2:房主付费
optional string room_num = 3;//房间号
}
message lobby_enter_room_msg_res
{
optional string room_num = 3;//房间号
}
message lobby_room_ready_msg//1,0x1002#准备
{
optional uint32 ready = 1;//0:取消准备,1:准备好了
}
message lobby_room_ready_msg_res
{
}
message lobby_out_msg//1,0x1003#离开大厅
{
}
message lobby_out_msg_res
{
}
message lobby_out_room_msg//1,0x1004#离开房间
{
}
message lobby_out_room_msg_res
{
optional uint32 out_room_reason = 1;//离开房间原因#share_msg.E_OUT_ROOM_REASON
}
message notify_user_show_in_room_msg//0,0x1005#通知,玩家在room中的显示
{
}
message notify_user_show_in_room_msg_res
{
repeated share_msg.user_show_in_room_t user_show_in_room = 1;//
}
message notify_game_end_msg//0,0x1006#游戏结束
{
}
message notify_game_end_msg_res
{
repeated share_msg.user_game_end_t user_game_end = 1;
optional share_msg.mail_xzdd_record_t xzdd = 101;
}
message notify_exit_lobby_msg//0,0x1007#退出大厅
{
}
message notify_exit_lobby_msg_res
{
}
message user_chat_msg//1,0x1008#用户聊天
{
optional string chat = 2;//聊天内容
}
message user_chat_msg_res
{
optional uint64 uid = 1;//用户id
optional string chat = 2;//聊天内容
}
////////////////////////////////////////////////
//系统[0x0f000,0x0f0ff]
////////////////////////////////////////////////
message sys_information_msg//1,0xf001#或取系统当前时间
{
}
message sys_information_msg_res
{
optional uint32 time_second = 1;//当前时间
}
message sys_new_day_msg//0,0xf002#新的一天通知包
{
}
message sys_new_day_msg_res
{
}
message sys_notice_msg_res//0,0xf003#通知玩家公告
{
optional uint32 id = 1;//公告id
optional uint64 uid = 2;//用户id
optional string nick = 3;//用户昵称
optional string param = 5;//其他参数,根据公告需求不同,逗号分隔[1,2,3,4,5....]
}
message sys_test_msg//1,0xf004#测试
{
}
message sys_test_msg_res
{
}
message gm_change_item_msg//1,0xf005#gm 调道具
{
optional uint32 id = 1;//id
optional int32 cnt = 2;//数量
}
message gm_change_item_msg_res
{
}