68 lines
2.1 KiB
Protocol Buffer
68 lines
2.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package fortunetiger;
|
|
option go_package = "mongo.games.com/game/protocol/fortunetiger";
|
|
|
|
//fortunetiger
|
|
//龙
|
|
enum FortuneTigerPID {
|
|
PACKET_FORTUNETIGER_ZERO = 0;// 弃用消息号
|
|
PACKET_FORTUNETIGER_SCFORTUNETIGERROOMINFO = 5630; //房间信息
|
|
PACKET_FORTUNETIGER_CSFORTUNETIGEROP = 5631;
|
|
PACKET_FORTUNETIGER_SCFORTUNETIGEROP = 5632;
|
|
PACKET_FORTUNETIGER_SCFORTUNETIGERROOMSTATE = 5633;
|
|
PACKET_FORTUNETIGER_SCFORTUNETIGERBILLED = 5634;
|
|
}
|
|
|
|
message FortuneTigerPlayerData {
|
|
string Name = 1; //名字
|
|
int32 SnId = 2; //账号
|
|
int32 Head = 3; //头像
|
|
int32 Sex = 4; //性别
|
|
int64 Coin = 5; //金币
|
|
int32 Pos = 6; //座位位置
|
|
int32 Flag = 7; //二进制标记
|
|
repeated string Params = 8; //其他数据 如:ip 等
|
|
string City = 9; //城市
|
|
int32 HeadOutLine = 10; //头像框
|
|
int32 VIP = 11;
|
|
}
|
|
//房间信息
|
|
//PACKET_FORTUNETIGER_SCFORTUNETIGERROOMINFO
|
|
message SCFortuneTigerRoomInfo {
|
|
int32 RoomId = 1; //房间id
|
|
int32 GameFreeId = 2;
|
|
int32 GameId = 3; //游戏id
|
|
int32 RoomMode = 4; //游戏模式
|
|
repeated int32 Params = 5; //规则参数
|
|
int32 NumOfGames = 6; //当前第几局
|
|
int32 State = 7; //房间当前状态
|
|
repeated int64 ParamsEx = 8; //其他参数
|
|
int32 SceneType = 9; //房间模式
|
|
FortuneTigerPlayerData Player = 10; //房间内的玩家信息
|
|
string PlayerInfo = 11;
|
|
}
|
|
//玩家操作
|
|
//PACKET_FORTUNETIGER_CSFORTUNETIGEROP
|
|
message CSFortuneTigerOp {
|
|
int32 OpCode = 1; //操作码 0.spin
|
|
repeated int64 Params = 2; //操作参数 下注索引编号
|
|
}
|
|
//玩家操作返回
|
|
//PACKET_FORTUNETIGER_SCFORTUNETIGEROP
|
|
message SCFortuneTigerOp {
|
|
int32 OpCode = 1; //操作码
|
|
int32 OpRetCode = 2; //操作结果 1.金币不足 2.低于该值不能押注
|
|
repeated int64 Params = 3; //操作参数
|
|
}
|
|
//房间状态
|
|
//PACKET_FORTUNETIGER_SCFORTUNETIGERROOMSTATE
|
|
message SCFortuneTigerRoomState {
|
|
int32 State = 1; //房间当前状态
|
|
int32 SubState = 2; //房间当前子状态
|
|
repeated int32 Params = 3; //状态参数
|
|
}
|
|
//PACKET_FORTUNETIGER_SCFORTUNETIGERBILLED
|
|
message SCFortuneTigerBilled{
|
|
int32 OpRetCode = 1;//0.spin成功 1.spin失败
|
|
string GameEndStr = 2;
|
|
} |