protocol.proto
31 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
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
syntax = "proto3";
package protocol;
//message header definition
//uint16 | uint16 | int32 | int32 | package_len - 12 |
//package_len | msgid | seq | playerid | payload |
//package_len : 一个消息包的长度
//msgid: 消息的id
//seq: 请求消息的编号(同一个tcp链接建立之后,消息id从0开始,每次发送一个请求编号+1)
//playerid: 玩家的uid
//paylaod: 消息内容(protobuf打包序列化之后的二进制内容放到这里)
//消息id枚举定义
enum MSGID {
MsgID_Min = 0;
//server inner proto msgid
MsgID_ConnClose_Notice = 10;
//server inner proto end
MsgID_Logon_Request = 10000;
MsgID_Logon_Response = 10001;
MsgID_CreateRoom_Request = 10002;
MsgID_CreateRoom_Response = 10003;
MsgID_CreateRoom_Notice = 10004;
MsgID_DestroyRoom_Request = 10005;
MsgID_DestroyRoom_Response = 10006;
MsgID_DestroyRoom_Notice = 10007;
MsgID_JoinRoom_Request = 10008;
MsgID_JoinRoom_Response = 10009;
MsgID_LeaveRoom_Request = 10010;
MsgID_LeaveRoom_Response = 10011;
MsgID_SitDown_Request = 10012;
MsgID_SitDown_Response = 10013;
MsgID_SitDown_Notice = 10014;
MsgID_Standup_Request = 10015;
MsgID_Standup_Response = 10016;
MsgID_Standup_Notice = 10017;
MsgID_Buyin_Request = 10018;
MsgID_Buyin_Response = 10019;
MsgID_Buyin_To_Owner_Notice = 10020;
MsgID_Buyin_To_Applicant_Notice = 10021;
MsgID_Answer_Buyin_Request = 10022;
MsgID_Answer_Buyin_Response = 10023;
MsgID_StartGame_Request = 10024;
MsgID_StartGame_Response = 10025;
MsgID_StartGame_Notice = 10026;
MsgID_ResetGame_Notice = 10027;
MsgID_Game_Post_Notice = 10028;
MsgID_Game_Ante_Notice = 10029;
MsgID_Game_ElectDealer_Notice = 10030;
MsgID_Game_Blind_Notice = 10031;
MsgID_Game_HoleCard_Notice = 10032;
MsgID_PlayerActionTurn_Notice = 10033;
MsgID_Action_Request = 10034;
MsgID_Action_Response = 10035;
MsgID_PlayerAction_Notice = 10036;
MsgID_Game_RoundEnd_Notice = 10037;
MsgID_CommunityCards_Notice = 10038;
MsgID_Game_ShowCard_Notice = 10039;
MsgID_Game_Insurance_Notice = 10040;
MsgID_BuyInsurance_Request = 10041;
MsgID_BuyInsurance_Response = 10042;
MsgID_Game_Settlement_Notice = 10043;
MsgID_Game_Snapshot_Notice = 10044;
MsgID_Random_Seat_Notice = 10045;
MsgID_Game_ShowDown_Notice = 10046;
MsgID_Room_Situation_Request = 10047;
MsgID_Room_Situation_Response = 10048;
MsgID_Room_Situation_Notice = 10049;
MsgID_SendCard_Fun_Request = 10050;
MsgID_SendCard_Fun_Response = 10051;
MsgID_SendCard_Fun_Notice = 10052;
MsgID_SendChat_Request = 10053;
MsgID_SendChat_Response = 10054;
MsgID_SendChat_Notice = 10055;
MsgID_StayPosition_Request = 10056;
MsgID_StayPosition_Response = 10057;
MsgID_StayPosition_Notice = 10058;
MsgID_BackPosition_Request = 10059;
MsgID_BackPosition_Response = 10060;
MsgID_BackPosition_Notice = 10061;
MsgID_ShowCard_Request = 10062;
MsgID_ShowCard_Response = 10063;
MsgID_ShowCard_Notice = 10064;
MsgID_Login_Player_JoinRoom_Notice = 10065;
MsgID_Waiting_OtherPlayer_Notice = 10066;
MsgID_UpdateMoney_Request = 10067;
MsgID_UpdateMoney_Response = 10068;
MsgID_Buyin_Notice = 10069;
MsgID_GameRecords_Notice = 10070;
MsgID_ModifyBuyinLimit_Request = 10071; //请求增加带入上限
MsgID_ModifyBuyinLimit_Response = 10072;
MsgID_ModifyBuyinLimit_Notice = 10073;
MsgID_BuyInsuranceResult_Notice = 10074;
MsgID_InsuranceToomanyLeader_Notice = 10075;
MsgID_InsuranceHitOuts_Notice = 10076;
MsgID_InsuranceMissOuts_Notice = 10077;
MsgID_NoNeedInsurance_Notice = 10078;
MsgID_Snapshot_Request = 10079;
MsgID_Snapshot_Response = 10080;
MsgID_Buyout_Request = 10081;
MsgID_Buyout_Response = 10082;
MsgID_Buyout_Notice = 10083;
MsgID_RealStart_Notice = 10084;
MsgID_AddActionTime_Notice = 10085;
MsgID_NotSupport_Insurance_Notice = 10086;
MsgID_HeartBeat_Request = 10087;
MsgID_HeartBeat_Response = 10088;
MsgID_InteractiveExpression_Request = 10089;
MsgID_InteractiveExpression_Response = 10090;
MsgID_InteractiveExpression_Notice = 10091;
MsgID_AddInsuranceTime_Request = 10092;
MsgID_AddInsuranceTime_Response = 10093;
MsgID_AddInsuranceTime_Notice = 10094;
MsgID_AddRoomTime_Request = 10095;
MsgID_AddRoomTime_Response = 10096;
MsgID_AddRoomTime_Notice = 10097;
MsgID_ProhibitSitdown_Request = 10098;
MsgID_ProhibitSitdown_Response = 10099;
MsgID_ProhibitSitdown_Notice = 10100;
MsgID_ForceStandup_Request = 10101;
MsgID_ForceStandup_Response = 10102;
MsgID_ForceStandup_Notice = 10103;
MsgID_PauseGame_Request = 10104;
MsgID_PauseGame_Response = 10105;
MsgID_PauseGame_Notice = 10106;
MsgID_InitiativeDestroyRoom_Notice = 10107;
MsgID_CheckOutAndLeave_Request = 10108;
MsgID_CheckOutAndLeave_Response = 10109;
MsgID_CheckOutAndLeave_Notice = 10110;
MsgID_DefaultFold_Request = 10111;
MsgID_DefaultFold_Response = 10112;
MsgID_OwnerSetBuyinLimit_Request = 10113;
MsgID_OwnerSetBuyinLimit_Response = 10114;
MsgID_OwnerSetBuyinLimit_Notice = 10115;
MsgID_PlayerBuyinsInfo_Request = 10116;
MsgID_PlayerBuyinsInfo_Response = 10117;
MsgID_PlayerBuyinsInfo_Notice = 10118;
MsgID_GameActionTurn_Request = 10119;
MsgID_GameActionTurn_Response = 10120;
MsgID_PhotoVerify_Request = 10121;
MsgID_PhotoVerify_Response = 10122;
MsgID_PhotoVerify_Notice = 10123;
MsgID_UploadVerifyPhotoSucc_Request = 10124;
MsgID_UploadVerifyPhotoSucc_Response = 10125;
MsgID_UploadVerifyPhotoSucc_Notice = 10126;
MsgID_GlobalMessage_Notice = 10127;
MsgID_FairGame_Notice = 10128;
MsgID_CheckAllianceRoomPriviledge_Request = 10129;
MsgID_CheckAllianceRoomPriviledge_Response = 10130;
MsgID_ForceShowCard_Request = 10131;
MsgID_ForceShowCard_Response = 10132;
MsgID_ForceShowCard_Notice = 10133;
MsgID_AddRommExTimeLeft_Notice = 10134; //房间剩余延时次数通知
MsgID_AddRoomTimeCount_Request = 10135; //请求当前房间剩余延时次数
MsgID_AddRoomTimeCount_response = 10136; //请求当前房间剩余延时次数响应
}
message PositionInfo{
float longtitude = 1; //经度
float latitude = 2; //纬度
string ip = 3; //ip addr
}
message PlayerInfo{
uint32 playerid = 1;
int32 seatid = 2;
string name = 3;
string headurl = 4;
string marks = 5;
int32 gender = 6;
int64 stake = 7;
string last_voice = 8; //总是保存玩家发过的最后一条chat消息voice类型的内容
ActionType last_action = 9;
bool in_game = 10;
bool inStay = 12; //是否处于保位离桌
int32 left_stay_time = 13; //如果是保位离桌状态,就是剩余的保位离桌时间
int64 round_bet = 14; //玩家的本回合下注总数; 比如当前是turn 我下了2次注 一次200 一次raise到800 这个值就是1000 也就是还在桌面上 没有进入pot的金额
repeated CardItem cards = 15; //如果入局了 并且是发送目标 就有这个数据 就是说 如果我是断线重连进来的 我已经入局了并且有手牌 那么就有这个值 或者是针对showdown阶段已经show牌的玩家,包括主动show牌的玩家,就是说底牌可见的就有这个数据
PositionInfo position = 16; //位置信息
}
//消息体定义
//logon
message RequestLogon {
string version = 1;
string token = 2;
PositionInfo position = 3;
string device_info = 4;
}
message ResponseLogon {
int32 error = 1; // 0: success; 1:version not match; 2:uid not-exist; 3:token-failure
}
//create room
message RoomParams{
int32 owner_type = 1; //区分普通牌具/俱乐部牌局/定制俱乐部牌局
int32 game_mode = 2; //区分普通牌局/比赛/其它游戏类型
int32 player_count_max = 3; //牌桌最大人数
int32 rule_blind_enum = 4; //牌局限定大小盲注对应id
int32 rule_buyin_min_enum = 5; //局限定最小带入对应id
int32 rule_buyin_fold = 6; //牌局限定最大带入对于最小带入的倍数
int32 rule_time_limit = 7; //牌局时长对应8个时长类型
int32 rule_switch_buyin_control = 8; //带入控制功能开关
int32 rule_switch_insurance = 9; //保险功能开关
int32 rule_switch_anti_cheat = 10;//防作弊相关功能开关
int32 rule_switch_force_straddle = 11;//强制straddle功能开关
int32 rule_switch_random_seat = 12;//随机入座功能开关
int64 rule_ante_amount = 13;//ante金额
string game_name = 14;//房间名字
uint32 club_id = 15; //创建房间所属的俱乐部id
bool is_associated_jackpot = 16; //是否关联jackpot
bool is_allin_allfold = 17; //是否是allin allfold
repeated uint32 alliance_ids = 18; //联盟id集合
string owner_clubname = 19;//房间所属俱乐部
uint32 CreaterId = 20; //创建房间的玩家ID
bool short_game_double_ante = 21; //短牌模式是否开启Dealer2倍Ante
bool short_fullhouse_flush_straight_three = 22; //短牌模式开启和长牌同样比牌顺序
bool is_opened_drawback = 23; //是否打开撤码功能
int32 drawback_hold_times = 24; //撤出记分牌保留的倍数(为保证整数客户端*10,所以服务器计算时/10)
int32 drawback_times = 25; //撤出记分牌倍数(为保证整数客户端*10,所以服务器计算时/10)
bool choose_outs = 26; //是否可选outs
bool muck_switch = 27; //埋牌开关
bool anti_simulator = 28; //禁止模拟器开关
bool force_showcard = 29; //强制秀牌开关
bool unlimit_force_showcard = 30; //无限强制秀牌开关
}
message RequestCreateRoom{
RoomParams param = 1;
}
message ResponseCreateRoom{
int32 error = 1; //todo:
}
message NoticeCreateRoom{
int32 roomid = 1;
}
message RequestDestroyRoom{
int32 roomid = 1;
}
message ResponseDestroyRoom{
int32 error = 1;
}
message PlayerSettlement{
string player_name = 1;
string player_head = 2;
int64 player_buyin = 3; //玩家总带入
int32 player_hand_count = 4; //玩家总共玩了几手牌
int64 player_settle = 5; //玩家总输赢(当前stake-之前stake)
uint32 playerid = 6;
}
message CardItem{
int32 number = 1;
int32 suit = 2;
}
message HandRecord{
string player_name = 1;
string player_head = 2;
int32 player_betting_round_bet = 3; //本局下注的所有筹码总数
repeated CardItem cards = 4; //手牌
int64 win_bet = 5; //输赢的筹码数
bool bought_insurance = 6; //本局是否买过保险
bool is_fold = 7; //是否弃牌
bool is_show_card = 8;
int32 show_card_ids = 9;
uint32 playerid = 10;
int64 insurance_bet_amount = 11; //一手牌的投保金额
int64 insurance_winbet = 12; //一手牌赢的筹码数
int64 jack_winbet = 13; //一手牌赢的jackpot筹码数
int64 drawin = 14; //一手牌赢的drawin
int64 award2_club_fund = 15;
uint32 last_buyin_clubid = 16;
bool is_muck = 17; //是否自动埋牌
bool shot_force = 18; //强制带回击中保险
bool is_active_show = 19; //主动show
bool is_force_show = 20; //强制show
}
message GameRecord{
repeated CardItem public_cards = 1;
repeated HandRecord records = 2;
int64 total_pot = 3; //本局总的pot金额
int64 insurance_winbet = 4; //本局保险输赢(系统角度,系统赔付1000,即-1000)
int64 insurance_bet = 5; //表示这一手的投保额
int64 insurance_amount = 6; //表示这一手的保险赔付额
}
message NoticeDestroyRoom{
int32 roomid = 1;
uint32 room_create_time = 2; //房间创建时间戳
int32 room_time_limit = 3; //设定的游戏时长(秒数)
string room_owner_name = 4;
int32 room_rule_blind_enum = 5; //小盲的筹码数
int32 room_game_hand = 6; //本房间总共进行了多少游戏手数
int64 room_max_pot = 7; //本房间牌局里面,最大一个pot的金额
int64 room_total_buyin = 8; //所有人的有效带入总和
repeated PlayerSettlement settlements = 9;
uint64 room_uuid = 10;
string room_name = 11;
}
message RequestJoinRoom{
int32 roomid = 1;
}
message ResponseJoinRoom{
int32 error = 1;
int32 roomid = 2;
}
message RequestLeaveRoom{
int32 roomid = 1;
}
message ResponseLeaveRoom{
int32 error = 1;
}
message RequestSitDown{
int32 roomid = 1;
int32 seatid = 2;
PositionInfo position = 3; //位置信息
}
message ResponseSitDown{
int32 error = 1;
uint32 playerid = 2; //和谁冲突了
string playername = 3;
}
message NoticeSitDown{
int32 roomid = 1;
PlayerInfo player = 2;
}
message RequestStandup{
int32 roomid = 1;
}
message ResponseStandup{
int32 error = 1;
}
message NoticeStandup{
int32 roomid = 1;
uint32 target_uid = 2;
int32 seatid = 3;
}
message RequestBuyin{
int32 roomid = 1;
int64 amount = 2; //带入金额
uint32 ownerid = 3;//负责审批的id
uint32 clubid = 4; //俱乐部id
uint32 allianceid = 5; //联盟id 联盟牌局:联盟id 非联盟牌局:-1
}
message ResponseBuyin{
int32 error = 1;
uint32 playerid = 2; //
string playername = 3;
}
message BuyinPlayerInfo{
uint32 playerid = 1;
int64 amount = 2; //带入金额上限
string playername = 3;
string playerhead = 4;
int32 requestid = 5;
uint32 timestamp = 6;
uint32 last_clubid = 8;
repeated AllianceInfo allianceInfos = 9;
}
message AllianceInfo{
uint32 alliance_id = 1;
string alliance_name = 2;
}
message NoticeBuyinToOwner{
int32 roomid = 1;
repeated BuyinPlayerInfo buyins = 2;
string room_name = 3;
uint32 last_club2allianceid = 4; //联盟(最近一次俱乐部成员向牌局买入的联盟id)
}
message NoticeBuyinToApplicant{
int32 roomid = 1;
int64 amount_limit = 2; //还可以带入的金额
bool result = 3; //true : ok-to-buyin; false--reject(timeout/reject..etc)
int64 self_buyin_limit = 4;
int64 self_buyin = 5;
int64 self_stake = 6;
uint64 bank_chips = 7; //身上剩余总筹码
string room_name = 8;
uint32 allianceid = 9; //联盟id 联盟牌局:联盟id 非联盟牌局:-1
}
message RequestAnswerBuyin{
int32 roomid = 1;
int32 requestid = 2;
int64 amount = 3;
bool result = 4; //true : ok-to-buyin; false--reject
uint32 alliance_id = 5;
uint32 club_id = 6;
}
message ResponseAnswerBuyin{
int32 error = 1;
int32 requestid = 2;
uint32 playerid = 3;
int64 amount = 4;
int32 roomid = 5;
bool result = 6; //true : ok-to-buyin; false--reject
}
message RequestStartGame{
int32 roomid = 1;
}
message ResponseStartGame{
int32 error = 1;
}
message NoticeStartGame{
int32 roomid = 1;
}
//重置牌桌
message NoticeResetGame{
int32 roomid = 1;
string gameid = 2; //uuid from CF
repeated PlayerInfo players = 3;//table player
}
message NoticeRandomSeat{
int32 roomid = 1;
repeated PlayerInfo players = 2;
}
message PotInfo{
int32 potid = 1;
int64 amount = 2;
}
//post
message NoticeGamePost{
int32 roomid = 1;
int32 seatid = 2; //post玩家座位号
int64 amount = 3; //post金额
}
//ante
message NoticeGameAnte{
int32 roomid = 1;
repeated int32 seat_list = 2;
repeated int32 amount_list = 3;
}
//elect dealer
message NoticeGameElectDealer{
int32 roomid = 1;
int32 dealer_seatid = 2;
int32 sb_seateid = 3;
int32 bb_seatid = 4;
}
//下盲注
message NoticeGameBlind{
int32 roomid = 1;
int64 sb_amount = 2;
int64 bb_amount = 3;
repeated int32 straddle_seat_list = 5; //straddle座位列表
repeated int32 straddle_amount_list = 6; //straddle金额列表
repeated int32 post_seat_list = 7; //Post座位列表
int32 sb_seatid = 8;
int32 bb_seatid = 9;
int32 dealer_seatid = 10;
}
//发底牌
message NoticeGameHolecard{
int32 roomid = 1;
repeated int32 seat_list = 2;
repeated CardItem holdcards = 3;
}
enum ActionType {
Enum_Action_Null = 0;
Enum_Action_Check = 1;
Enum_Action_Fold = 2;
Enum_Action_Call = 3;
Enum_Action_Bet = 4;
Enum_Action_Raise = 5;
Enum_Action_Allin = 6;
Enum_Action_CallMuck = 7;
Enum_Action_AddActionTime = 8;
Enum_Action_SendCard_Common = 9;
Enum_Action_Send_HoleCards = 10;
Enum_Action_Straddle = 11;
Enum_Action_Post = 12;
}
//通知房间内所有人轮到某个玩家进行操作
message NoticePlayerActionTurn{
int32 roomid = 1;
int32 curr_action_seat_id = 2;
int32 curr_action_uid = 3;
int32 action_time = 4; //本次操作允许时间
int32 minimum_bet = 5; //最小下注额度
int32 last_action_seatid = 6; //上个动作人的座位号
int32 last_action_uid = 7; //上个动作人的uid
bool is_greatest_bet = 8; //代表上一个玩家是否时有效加注,每个新回合初始为true
int32 ActionSeq = 9;
repeated PlayerInfo players = 10;//当前入座了的完整的玩家结构最多9个
repeated PotInfo pots = 11; //当前牌局的Pot信息结构
int64 last_bet_amount = 12;
int64 carr_action_seat_roundbet = 13;
bool default_fold = 14; //是否选择了自动看或弃牌
int32 call_amount = 15;
int64 max_round_bet = 16;
int64 last_valid_raise_amount = 17; //上一次有效加注差额
}
message RequestAction{
int32 roomid = 1;
ActionType action = 2;
int64 amount = 3; //bet & raise
int32 ActionSeq = 4;
string token = 5;
}
message ResponseAction{
int32 error = 1;
}
//广播玩家做出的动作
message NoticePlayerAction{
int32 roomid = 1;
int32 last_action_seat_id = 2;
ActionType action_type = 3;
int64 amount = 4;
repeated PotInfo pots = 5;
bool default_fold = 6;
int32 ActionSeq = 7;
}
//通知房间内所有人该轮下注回合结束
message NoticeGameRoundEnd{
int32 roomid = 1;
repeated PotInfo pots = 2;
repeated CardItem public_card = 3; //当前牌局的公共牌信息,有几张发几张
}
enum BettingRoundType {
Enum_BettingRound_Preflop = 0;
Enum_BettingRound_Flop = 1;
Enum_BettingRound_Turn = 2;
Enum_BettingRound_River = 3;
}
//发公共牌
message NoticeCommunityCards{
int32 roomid = 1;
repeated CardItem cards = 2; //3张;1张; 1张;
BettingRoundType betting_round = 3;
}
message ShowCardsSeatInfo {
int32 show_seat_id = 1;
repeated CardItem cards = 2; //手牌
}
//show牌阶段
message NoticeGameShowCard{
int32 roomid = 1;
repeated ShowCardsSeatInfo show_seats = 2;
}
message OutItem{
int32 outs_id = 1;
CardItem card = 2;
bool is_tie = 3;
}
message PlayerSeatInfo{
int32 seatid = 1;
string playername = 2;
int32 outs_count = 3;
repeated CardItem holecards = 4;
int64 total_investment = 5;//该玩家在本手游戏中总共下注的金额 相当于是每一轮round_bet的总和
}
//需要购买保险通知
message NoticeGameInsurance{
int32 roomid = 1;
repeated PlayerSeatInfo player_seats = 2;
repeated OutItem outs = 3;
int64 pot_amount = 4;
int64 buy_amount = 5; //上一轮buyer_uid投保额
int32 buyer_seatid = 6;
int32 buyer_uid = 7;
int64 total_pot_amount = 8;// 所有底池金额的总和 不管有没有参与或领先的
int32 action_seq = 9; //server下发actionseq
int64 inv_amount = 10; //数据是购买保险者在当前所购买保险的这个底池中所投入的金额
int64 total_inv_amount = 11; //数据是购买保险者在本手游戏中所投入的金额总数
int64 total_pot = 12; //数据是本手游戏所有pot的总额
int32 count_time = 13; //数据是倒计时剩余时间
int64 limit_amount = 14; //至少需要买多少钱的保险
repeated CardItem public_cards = 15; //公共牌
}
//购买保险请求
message RequestBuyInsurance{
int32 roomid = 1;
int64 amount = 2; //购买保险具体金额, 当amount字段为0时则是客户端选择不买保险
repeated int32 outs_id = 3; //选中的outs id列表
int32 action_seq = 4; //购买时,从下发通知中原值返回
bool is_buy = 5; //买保险=true;不买=false
}
message ResponseBuyInsurance{
int32 error = 1; //成功发1,不管够不够买保险都要广播房间里所有人NoticeBuyInsuranceResult
}
message WinPotInfo{
int32 potid = 1; //赢的potid
int64 amount = 2; //这个pot里面赢了多少钱
}
message PlayerSettleInfo{
int32 seatid = 1;
uint32 playerid = 2;
int64 amount = 3;
bool is_steal_blind = 4;
repeated WinPotInfo pots = 5;
int64 total_investment = 6;//该玩家在本手游戏中总共下注的金额 相当于是每一轮round_bet的总和 ResetGame时重置为0
}
//结算信息通知
message NoticeGameSettlement {
int32 roomid = 1;
repeated PlayerSettleInfo winners = 2;
repeated PotInfo pots = 3;
uint64 gameuuid = 4;
}
message RoomStates {
bool isBegin = 1; //是否已经开始游戏
bool isWaiting = 2; //是否在由于人数不足在等待开局
bool isPause = 3; //是否暂停了游戏
bool isMute = 4; //是否静音 如果静音 chat消息中voice类型的消息会发送失败
}
message TableStates{
repeated PlayerInfo players = 1;//当前入座了的完整的玩家结构最多9个
repeated PotInfo pots = 2; //当前牌局的Pot信息结构 如果是结算阶段已经结算过的pot不发所以最好结算完就删掉该pot
repeated CardItem public_card = 3; //当前牌局的公共牌信息,有几张发几张
int32 curr_action_player_seatid = 4; //当前操作者的座位号 没有就-1
int32 curr_action_left_time = 5; //当前操作者剩余的操作时间 没有就-1
int32 curr_dealer_seatid = 6; //当前dealer位置
int32 curr_bb_seatid = 7; //当前小盲位置
int32 curr_sb_seatid = 8; //当前大盲位置
int32 curr_straddle_seatid = 9; //当前straddle位置如果有的话
int64 bb_amount = 10; //大盲注金额
int64 sb_amount = 11; //小盲注金额
}
message clubInfo{
uint32 club_id = 1;
uint32 creater_id = 2;
string club_name = 3;
}
message NoticeGameSnapshot{
int32 roomid = 1;
uint32 room_owner_id = 2; //创建者id
RoomParams params = 3; //房间参数
int64 self_buyin_limit = 4; //我在本房间的带入上限 初始为0
int64 self_buyin = 5; //我在本房间的总共已经带入过的金额 不是stake 初始为0
int64 self_stake = 6; //我我在该房间中剩余的stake
RoomStates rstate = 7; //
repeated BuyinPlayerInfo buyins = 8; //房间消息结构体 针对那些还未超时并且房主未处理的申请,在进入房间的时候发一遍
TableStates tstate = 9;
int32 room_create_time = 10; //房间创建时间
int32 room_start_time = 11; //点击开始时间
repeated uint64 game_uuids = 12;
repeated uint32 prohibit_sitdown_list = 13;
uint32 last_buyin_clubid = 14;
uint32 last_buyin_ownerid = 15;
repeated clubInfo clubInfos = 16;
repeated PlayerBuyinInfo buyin_infos = 17;
int32 autoaddactiontime_count = 18; //自动补时次数
int32 actiontime_count = 19; //自己当前的add action time次数
repeated uint32 club_createrids = 20;
int64 total_buyout = 21; //自己的总带出
uint32 last_buyin_allianceid = 22;
}
message PlayerShowDownInfo{
int32 seatid = 1;
uint32 playerid = 2;
repeated CardItem cards = 3; //手牌
}
message NoticeGameShowDown{
int32 roomid = 1;
repeated PlayerShowDownInfo shows = 2;
repeated uint32 muck_list = 3;
}
message RequestRoomSituation{
int32 roomid = 1;
}
message ResponseRoomSituation{
int32 error = 1;
}
message PlayerBuyinInfo{
string playername = 1;
uint32 playerid = 2;
int64 total_buyin = 3;
int64 curr_record = 4;
int64 buyin_limit = 5; //已批准的带入上限
}
message NoticeRoomStituation{
int32 roomid = 1;
repeated PlayerBuyinInfo buyin_player_list = 2;
repeated PlayerInfo observer_list = 3;
int64 insurance_winbet = 4; //本局保险输赢(系统角度,系统赔付1000,即-1000)
int32 left_time = 5; //房间剩余秒数
int32 room_start_time = 6; //点击开始时间
repeated uint32 bystander_list = 7; //旁观者列表(不包含已退出房间的)
int64 jackpot_winbet = 8; //本局jackpot输赢(系统角度,系统赔付1000,即-1000)
repeated uint32 check_out_list = 9; //结算离桌的玩家列表
}
message RequestSendCardFun{
int32 roomid = 1;
}
message ResponseSendCardFun{
int32 error = 1;
}
message NoticeRoomCardFun{
int32 roomid = 1;
int32 round_state = 2;
string player_name = 3;
repeated CardItem cards = 4;
int32 next_price = 5;
uint32 player_id = 6;
}
enum ChatType {
Enum_Emoji = 0;
Enum_Voice = 1;
}
message RequestSendChat{
int32 roomid = 1;
ChatType ctype = 2;
string content = 3;
}
message ResponseSendChat{
int32 error = 1;
}
message NoticeSendChat{
int32 roomid = 1;
ChatType ctype = 2;
string content = 3;
uint32 playerid = 4;
int32 seatid = 5;
}
message RequestStayPosition{
int32 roomid = 1;
}
message ResponseStayPosition{
int32 error = 1;
}
message NoticePlayerStay{
int32 roomid = 1;
repeated PlayerInfo players = 2;
}
message RequestBackPosition{
int32 roomid = 1;
}
message ResponseBackPosition{
int32 error = 1;
}
message NoticeBackPosition{
int32 roomid = 1;
PlayerInfo player = 2;
}
message RequestShowCard{
int32 roomid = 1;
int32 cards = 2; //0,1表示第一张和第二张
bool is_show = 3; //表示show或者不show
}
message ResponseShowCard{
int32 error = 1;
}
message PlayerShowInfo{
int32 playerid = 1;
int32 seatid = 2;
repeated CardItem cards = 3;
}
message NoticePlayerShow{
int32 roomid = 1;
repeated int32 show_card_id = 2;
repeated PlayerShowInfo players = 3;
}
message NoticeLoginPlayerJoinRoom{
int32 roomid = 1;
bool anti_simulator = 2;
}
message NoticeWaitingOtherPlayer{
int32 roomid = 1;
}
message RequestUpdateMoney{
int64 money = 1;
}
message ResponseUpdateMoney{
int32 error = 1;
}
//处理完带入请求后(无论成功失败),发送给请求者
message NoticeBuyin{
int64 self_buyin_limit = 1; //我在本房间的带入上限 初始为0
int64 self_buyin = 2; //我在本房间的总共已经带入过的金额 不是stake 初始为0
int64 self_stake = 3; //我在本房间剩余的stake
int64 bank_chips = 4; //我剩余的筹码(总共的)
int64 self_buyout =5; //剩余buyout总数
int32 roomid = 6;
}
message NoticeGameRecords{
int32 roomid = 1;
repeated GameRecord records = 2; // 返回所请求的手牌纪录
}
//请求增加带入上限
message RequestModifyBuyinLimit{
int64 buyin_limit = 1; //单次增加的上限值
uint32 last_buyin_clubid = 2;
uint32 last_buyin_ownerid = 3;
string last_buyin_clubname = 4;
}
message ResponseModifyBuyinLimit{
int32 error = 1;
int32 roomid = 2;
uint32 playerid = 3; //和谁冲突了
string playername = 4; //和谁冲突了
}
message NoticeModifyBuyinLimit{
int64 buyin_limit = 1; //修改后的带入上限
int64 buyin_now = 2; //当前已经带入的筹码
int32 roomid = 3;
}
//通知保险购买结果
message NoticeBuyInsuranceResult{
int32 room_id = 1;
string player_name = 2; //购买保险者的名称
bool result = 3; //是否购买了保险
int64 insure_amount = 4; //投保额
}
//最大池多个领先者,无法购买保险
message NoticeInsuranceToomanyLeader{
int32 room_id = 1;
}
//击中outs赔付
message NoticeInsuranceHitOuts{
int32 room_id = 1;
string player_name = 2; //购买保险者的名称
uint32 playerid = 3;
int64 insure_amount = 4; //投保额
CardItem card = 5; //击中的outs 结构 card_suit card_num
int64 payment = 6; //赔付额 需要立刻加到stake里
}
//未击中outs
message NoticeInsuranceMissOuts{
int32 room_id = 1;
uint32 playerid = 2;
int64 insure_amount = 3; //投保额
}
message NoticeNoNeedInsurance{
int32 room_id = 1;
}
//
message RequestSnapshot{
int32 roomid = 1;
string token = 2;
}
message ResponseSnapshot{
int32 error = 1;
}
message RequestBuyout{
int32 roomid = 1;
int64 buyout_gold = 2;
}
message ResponseBuyout{
int32 error = 1;
}
message NoticeBuyout{
int32 roomid = 1;
int64 buyout_gold = 2;
int64 remain_gold = 3;
uint32 seat_no = 4;
int64 total_buyout = 5;
}
message NoticeRealStart{
int32 roomid = 1;
int32 starttime = 2;
}
message NoticeAddActionTime{
int32 roomid = 1;
int32 action_seatid = 2;
int32 rest_action_time = 3;
}
message NoticeNotSupportInsurance{
int32 roomid = 1;
}
message RequestHeartBeat{
uint32 uid = 1;
PositionInfo position = 2; //位置信息
}
message ResponseHeartBeat{
uint32 uid = 1;
}
message RequestInteractiveExpression{
int32 roomid = 1;
string content = 2;
}
message ResponseInteractiveExpression{
int32 error = 1;
}
message NoticeInteractiveExpression{
int32 roomid = 1;
string content = 2;
uint32 playerid = 3;
int32 seatid = 4;
}
message RequestAddInsuranceTime{
int32 roomid = 1;
int32 action_seq = 2;
}
message ResponseAddInsuranceTime{
int32 error = 1;
}
message NoticeAddInsuranceTime{
int32 roomid = 1;
uint32 playerid = 2;
int32 action_seatid = 3;
int32 rest_insurance_time = 4;
}
message RequestAddRoomTime{
int32 roomid = 1;
}
message ResponseAddRoomTime{
int32 error = 1;
}
message NoticeAddRoomTime{
int32 roomid = 1;
uint32 playerid = 2;
}
message RequestProhibitSitdown{
int32 roomid = 1;
uint32 targetid = 2;
bool isProhibitSitdown = 3;
}
message ResponseProhibitSitdown{
int32 error = 1;
}
message NoticeProhibitSitdown{
int32 roomid = 1;
uint32 playerid = 2;
string playername = 3;
bool isProhibitSitdown = 4;
repeated uint32 prohibit_sitdown_list = 5;
}
message RequestForceStandup{
int32 roomid = 1;
uint32 targetid = 2;
}
message ResponseForceStandup{
int32 error = 1;
}
message NoticeForceStandup{
int32 roomid = 1;
uint32 playerid = 2;
string playername = 3;
}
message RequestPauseGame{
int32 roomid = 1;
bool isPause = 2;
}
message ResponsePauseGame{
int32 error = 1;
}
message NoticePauseGame{
int32 roomid = 1;
bool isPause = 2;
}
message NoticeInitiativeDestroyRoom{
int32 roomid = 1;
string roomname = 2;
}
message RequestCheckOutAndLeave{
int32 roomid = 1;
}
message ResponseCheckOutAndLeave{
int32 error = 1;
}
message NoticeCheckOutAndLeave{
int32 roomid = 1;
int32 targetid = 2;
string name = 3;
}
message RequestDefaultFold{
int32 roomid = 1;
}
message ResponseDefaultFold{
int32 error = 1;
}
message RequestOwnerSetBuyinLimit{
int32 roomid = 1;
uint32 targetid = 2;
int64 limit_amount = 3;
}
message ResponseOwnerSetBuyinLimit{
int32 error = 1;
}
message NoticeOwnerSetBuyinLimit{
int32 roomid = 1;
int32 targetid = 2;
int64 limit_amount = 3;
}
message RequestPlayerBuyinsInfo{
int32 roomid = 1;
}
message ResponsePlayerBuyinsInfo{
int32 error = 1;
}
message NoticePlayerBuyinsInfo{
int32 roomid = 1;
repeated PlayerBuyinInfo buyin_infos = 2;
}
message RequestGameActionTurn{
int32 roomid = 1;
string token = 2;
}
message ResponseGameActionTurn{
int32 error = 1;
}
message RequestPhotoVerify{
int32 roomid = 1;
int32 targetid = 2;
}
message ResponsePhotoVerify{
int32 error = 1;
}
message NoticePhotoVerify{
int32 roomid = 1;
uint32 ownerid = 2;
int32 targetid = 3;
}
message RequestUploadVerifyPhotoSucc{
int32 roomid = 1;
string url = 2;
}
message ResponseUploadVerifyPhotoSucc{
int32 error = 1;
}
message NoticeUploadVerifyPhotoSucc{
int32 roomid = 1;
int32 targetid = 2;
string url = 3;
}
//全服跑马灯通知
message NoticeGlobalMessage{
int32 repeat_count = 1; //重复播放次数
string msg = 2;
}
message NoticeFairGame{
uint32 playerid = 1; //被站起玩家id
string playername = 2; //被站起玩家昵称
uint32 playerid2 = 3; //playerid和谁冲突了
string playername2 = 4; //
bool ip = 5; //ip问题
bool gps = 6; //gps问题
int32 roomid = 7; //
string roomname = 8;
}
message RequestCheckAllianceRoomPriviledge{
uint32 playerid = 1; //被站起玩家id
}
message ResponseCheckAllianceRoomPriviledge{
int32 error = 1;
}
message RequestForceShowCard{
int32 roomid = 1;
}
message ResponseForceShowCard{
int32 error = 1;
}
message NoticeForceShowCard{
int32 roomid = 1;
uint32 playerid = 2; //请求者id
string playername = 3; //请求者名字
repeated ShowCardsSeatInfo show_seats = 4;
}
message NoticeAddRoomTimeLeft{
int32 roomid = 1;
int32 leftcount =2; //剩余可以延时次数
}
message RequestAddRoomTimeCount{
int32 roomid = 1;
}
message ResponseAddRoomTimeCount{
int32 error = 1;
}