68 lines
2.1 KiB
Protocol Buffer
68 lines
2.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package cashmania;
|
|
option go_package = "mongo.games.com/game/protocol/cashmania";
|
|
|
|
//cashmania
|
|
//龙
|
|
enum CashManiaPID {
|
|
PACKET_CASHMANIA_ZERO = 0;// 弃用消息号
|
|
PACKET_CASHMANIA_SCCASHMANIAROOMINFO = 5650; //房间信息
|
|
PACKET_CASHMANIA_CSCASHMANIAOP = 5651;
|
|
PACKET_CASHMANIA_SCCASHMANIAOP = 5652;
|
|
PACKET_CASHMANIA_SCCASHMANIAROOMSTATE = 5653;
|
|
PACKET_CASHMANIA_SCCASHMANIABILLED = 5654;
|
|
}
|
|
|
|
message CashManiaPlayerData {
|
|
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_FORTUNEMOUSE_SCFORTUNEMOUSEROOMINFO
|
|
message SCCashManiaRoomInfo {
|
|
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; //房间模式
|
|
CashManiaPlayerData Player = 10; //房间内的玩家信息
|
|
string PlayerInfo = 11;
|
|
}
|
|
//玩家操作
|
|
//PACKET_FORTUNEMOUSE_CSFORTUNEMOUSEOP
|
|
message CSCashManiaOp {
|
|
int32 OpCode = 1; //操作码 0.spin
|
|
repeated int64 Params = 2; //操作参数 下注索引编号
|
|
}
|
|
//玩家操作返回
|
|
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEOP
|
|
message SCCashManiaOp {
|
|
int32 OpCode = 1; //操作码
|
|
int32 OpRetCode = 2; //操作结果 1.金币不足 2.低于该值不能押注
|
|
repeated int64 Params = 3; //操作参数
|
|
}
|
|
//房间状态
|
|
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEROOMSTATE
|
|
message SCCashManiaRoomState {
|
|
int32 State = 1; //房间当前状态
|
|
int32 SubState = 2; //房间当前子状态
|
|
repeated int32 Params = 3; //状态参数
|
|
}
|
|
//PACKET_FORTUNEMOUSE_SCFORTUNEMOUSEBILLED
|
|
message SCCashManiaBilled{
|
|
int32 OpRetCode = 1;//0.spin成功 1.spin失败
|
|
string GameEndStr = 2;
|
|
} |