123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- syntax = "proto3"; //指定版本,必须要写(proto3、proto2)
- option go_package="./;gameproto";
- package gameproto;
- enum NotifyTypeEnum {
- NotifyTypePing = 0;
- NotifyTypeJoinRoom = 1;
- NotifyTypeLeaveRoom = 2;
- NotifyTypeConnect = 3;
- NotifyTypeDisconnect = 4;
- NotifyTypeReady = 5;
- NotifyTypeUnReady = 6;
- NotifyTypeStart = 7;
- NotifyTypeChooseMaster = 8;
- NotifyTypeChooseMasterFinish = 9;
- NotifyTypeChooseMul = 10;
- NotifyTypeChooseMulinish = 11;
- NotifyTypeGameInit = 12;
- NotifyTypeOpen = 13;
- }
- enum DataType {
- DataTypeNormal = 0; //0x00000000
- DataTypeGZip = 2; //0x00000010
- DataTypeEnc = 4; //0x00000100
- }
- enum RoomType {
- RoomTypeFree = 0;
- RoomTypeNormal = 1;
- }
- //Ping
- message Ping {
- }
- message Room {
- uint32 ID = 1;
- string Name = 2;
- RoomType RoomType = 3;
- double BseAmount = 4;
- uint32 ChairUserID1 = 5;
- uint32 ChairUserID2 = 6;
- uint32 ChairUserID3 = 7;
- uint32 ChairUserID4 = 8;
- uint32 ChairUserID5 = 9;
- }
- message Connect {
- uint32 UserID = 1;
- string Name = 2;
- string Img = 3;
- double Balance = 4;
- repeated Room RoomList = 5;
- }
- message Disconnect {
- uint32 UserID = 1;
- }
- message JoinRoom {
- uint32 RoomID = 1;
- uint32 ChairID = 2;
- uint32 UserID = 3;
- uint32 GameStatus = 4;
- }
- message LeaveRoom {
- uint32 RoomID = 1;
- uint32 ChairID = 2;
- uint32 UserID = 3;
- }
- message Ready {
- uint32 RoomID = 1;
- uint32 UserID = 3;
- }
- message UnReady {
- uint32 RoomID = 1;
- uint32 UserID = 3;
- }
- //准备人数够,开始游戏
- message Start {
- uint32 RoomID = 1;
- repeated uint32 MulList = 2; //抢庄倍数列表
- }
- //选庄
- message ChooseMaster {
- uint32 UserID = 1;
- uint32 Mul = 2; //0,1,2,3 - 0表示不抢
- uint32 RoomID = 3;
- }
- //选倍数
- message ChooseMul {
- uint32 UserID = 1;
- uint32 Mul = 2; //1,2,3 - 倍数
- uint32 RoomID = 3;
- }
- //选庄完成
- message ChooseMasterFinish {
- uint32 MasterUserID = 1; //庄家的ID
- repeated uint32 MulList = 2; //倍数列表
- uint32 RoomID = 3;
- }
- //选倍数完成
- message ChooseMulinish {
- uint32 RoomID = 3;
- }
- //开牌
- message Open {
- uint32 RoomID = 1;
- uint32 UserID = 2;
- repeated uint32 CardList = 3; //牌型列表
- double winloss = 4; //输赢
- }
- //游戏初始化
- message GameInit {
- uint32 RoomID = 1;
- }
|