game_sync/protocol/fortunedragon/fortunedragon.proto

68 lines
2.2 KiB
Protocol Buffer

syntax = "proto3";
package fortunedragon;
option go_package = "mongo.games.com/game/protocol/fortunedragon";
//fortunedragon
//龙
enum FortuneDragonPID {
PACKET_FORTUNEDRAGON_ZERO = 0;// 弃用消息号
PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONROOMINFO = 5600; //房间信息
PACKET_FORTUNEDRAGON_CSFORTUNEDRAGONOP = 5601;
PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONOP = 5602;
PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONROOMSTATE = 5603;
PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED = 5604;
}
message FortuneDragonPlayerData {
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_FORTUNEDRAGON_SCFORTUNEDRAGONROOMINFO
message SCFortuneDragonRoomInfo {
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; //房间模式
FortuneDragonPlayerData Player = 10; //房间内的玩家信息
string PlayerInfo = 11;
}
//玩家操作
//PACKET_FORTUNEDRAGON_CSFORTUNEDRAGONOP
message CSFortuneDragonOp {
int32 OpCode = 1; //操作码 0.spin
repeated int64 Params = 2; //操作参数 下注索引编号
}
//玩家操作返回
//PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONOP
message SCFortuneDragonOp {
int32 OpCode = 1; //操作码
int32 OpRetCode = 2; //操作结果 1.金币不足 2.低于该值不能押注
repeated int64 Params = 3; //操作参数
}
//房间状态
//PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONROOMSTATE
message SCFortuneDragonRoomState {
int32 State = 1; //房间当前状态
int32 SubState = 2; //房间当前子状态
repeated int32 Params = 3; //状态参数
}
//PACKET_FORTUNEDRAGON_SCFORTUNEDRAGONBILLED
message SCFortuneDragonBilled{
int32 OpRetCode = 1;//0.spin成功 1.spin失败
string GameEndStr = 2;
}