pb/colorgame.proto

272 lines
6.6 KiB
Protocol Buffer
Raw Normal View History

2025-06-19 21:57:32 +08:00
syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
import "code.proto";
// 奖励档位
enum ColorPrizeArea
{
CPA_Single_0 = 0; // 单色投注区域开出单色
CPA_Single_1 = 1; // 单色投注区域开出双色
CPA_Single_2 = 2; // 单色投注区域开出三色
CPA_Double = 3; // 双色投注区域
CPA_Three = 4; // 三色投注区域
}
// 投注区域赔率范围配置信息
message ColorPrizeAreaRange
{
ColorPrizeArea pos = 1; // 下注区域为单色区0-2时该值表明是单色还是双色三色不同的赔率
int64 minMul = 2;
int64 maxMul = 3;
}
// color玩法配置信息
message ColorRoomConfig
{
repeated int64 betList = 3; // 下注档位
repeated ColorPrizeAreaRange mulRangeConfig = 5; // 赔率显示
}
//骰子颜色类型
enum ColorType
{
CT_Yellow = 0; // 黄色
CT_White = 1; // 白色
CT_Pink = 2; // 粉色
CT_Blue = 3; // 蓝色
CT_Red = 4; // 红色
CT_Green = 5; // 绿色
}
// 押注区域
enum ColorBetArea
{
CBA_Yellow = 0; // 黄色
CBA_White = 1; // 白色
CBA_Pink = 2; // 粉色
CBA_Blue = 3; // 蓝色
CBA_Red = 4; // 红色
CBA_Green = 5; // 绿色
CBA_Yellow2 = 6; // 双黄色
CBA_White2 = 7; // 双白色
CBA_Pink2 = 8; // 双粉色
CBA_Blue2 = 9; // 双蓝色
CBA_Red2 = 10; // 双红色
CBA_Green2 = 11; // 双绿色
CBA_Yellow3 = 12; // 三黄色
CBA_White3 = 13; // 三白色
CBA_Pink3 = 14; // 三粉色
CBA_Blue3 = 15; // 三蓝色
CBA_Red3 = 16; // 三红色
CBA_Green3 = 17; // 三绿色
}
//游戏阶段
enum ColorGameStatus
{
CGS_WaitStart = 0; // 等待准备
CGS_Start = 1; // 开始
CGS_Betting = 2; // 下注
CGS_BetEnd = 3; // 下注结束
CGS_OpenThreeDice = 4; // 开三色
CGS_Settle = 5; // 结算
}
// 等待状态下房间显示信息
message ColorRoomWaitStart
{
NtfColorTrend Trends = 1; // 路途显示
}
// 开始房间显示信息
message ColorRoomStart
{
NtfColorGameStart start = 1;
NtfColorTrend Trends = 2; // 路途显示
}
// 下注显示信息
message ColorRoomBetting
{
NtfColorBetAreaInfo betAreaInfo = 1; // 每个投注区域的下注人数,下注金额显示
}
// 结束下注显示信息
message ColorRoomEndBet
{
NtfColorEndBetting areaMul = 1; // 结束下注后,更新每个投注区域的赔率
NtfColorBetAreaInfo betAreaInfo = 2; // 每个投注区域的下注人数,下注金额显示
NtfColorBigUser bigUser = 3; // 大客数据
}
// 开骰子显示信息
message ColorRoomOpenThreeDice
{
NtfColorOpenThreeDice dices = 1;
}
// 结算信息
message ColorRoomSettle
{
NtfColorSettle settle = 1;
}
// 进房间发送房间当前所有信息及状态
message NtfColorRoomInfo
{
ColorGameStatus status = 1;
int64 endTime = 2; // 该状态结束时间
ColorRoomConfig config = 101; // 房间配置
ColorUser user = 100;
ColorRoomWaitStart waitStart = 3; // 等待状态房间数据
ColorRoomStart start = 4;
ColorRoomBetting betting = 5;
ColorRoomEndBet endBet = 6;
ColorRoomOpenThreeDice openThreeDice = 7;
ColorRoomSettle settle = 8;
}
message NtfColorGameStart
{
int64 endTime = 1; // 倒计时3秒后游戏开始endTime = statusTime+3秒
int64 jackpot = 2; // jackpot池
}
message NtfColorBetting
{
int64 endTime = 1; // 结束时间
}
message ReqColorBetting
{
ColorBetArea area = 1;
int64 bet = 2;
}
message RspColorBetting
{
ErrCode code = 1;
ColorBetAreaInfo areaInfo = 2;
}
message ColorBetAreaInfo
{
ColorBetArea area = 1; // 投注区域
int64 totalBet = 2; // 所有玩家总投注金额
int32 playerNum = 3; // 投注该区域人数
int64 myBet = 4; // 我的投注金额
}
// 更新投注区域信息
message NtfColorBetAreaInfo
{
repeated ColorBetAreaInfo areaInfos = 1;
}
// 奖励类型
enum ColorPrizeType
{
CPT_Normal = 0; // 普通奖励
CPT_Big = 1; // 爆奖
CPT_Jackpot = 2; // jackpot奖
}
// 投注区域实际赔率,奖励类型
message ColorBetAreaMul
{
ColorBetArea area = 1; // 区域位置
ColorPrizeArea prizeArea = 2; // 奖励档位
ColorPrizeType prizeType = 3; // 奖励类型
int64 mul = 4; // 赔率
}
// 结束投注
message NtfColorEndBetting
{
int64 endTime = 1; // 结束时间
repeated ColorBetAreaMul areaMul = 2; // 更新区域实际赔率
int64 jackpot = 3; // 下注结束更新jackpot值
}
message NtfColorOpenThreeDice
{
repeated ColorType color = 1; // 骰子开出颜色 3个
int32 aniRouteIndex = 3; // 动画路径
repeated ColorBetArea winArea = 4; // 中奖区域高亮
}
// 玩家结算信息
message NtfColorSettle
{
message UserBetAreaMul
{
ColorBetAreaMul areaMul = 1;
int64 bet = 2; // 玩家在该区域投注金额
int64 win = 3; // 该区域税前赢钱
int64 realWin = 4; // 税后赢钱
}
repeated UserBetAreaMul userAreaWin = 1; // 每个投注区域的下注及输赢
repeated ColorType threeDice = 2; // 骰子开出颜色
int64 totalWin = 3; // 总输赢,税后包含本金
int64 totalBet = 4; // 总投注
int64 totalWinBaseBet = 6; // 赢钱区域的总投注
int64 tax = 5; // 税
}
//游戏中几个玩家的数据
message ColorUser {
string Nick = 1; // 用户昵称
string Head = 2; // 头像
int64 Score = 3; // 分数
int32 SeatId = 4; //在场景中的座位id
int64 UserID = 5; //用户ID
}
// 结束下注,更新大客投注信息
message NtfColorBigUser
{
repeated ColorBigUser bigUser = 34; // 大客投注
}
// 路途展示
message NtfColorTrend
{
message ColorRate
{
ColorType color = 1;
int32 rate = 2;
}
repeated ColorRate colorRate = 1; // 最近30局各颜色中奖概率
}
// 赢钱或下注最多的6个玩家
message ColorBigUser
{
string nickName = 5; //名字
string avatar = 2;
int64 winChips = 1; // 赢取金币
repeated int64 areaId = 3; // 赢钱区域(前6个)
}
// 系统维护或流局
message NtfColorMaintain
{
string msg = 2; // 维护消息
int64 gold = 3; // 玩家金币重置为该值
}