game/common/pb/colorgame.proto
2025-06-08 00:52:17 +08:00

581 lines
21 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

syntax = "proto3";
package pb;
option go_package = "common/proto/pb";
// color玩法配置信息
message ColorRoomInfo
{
}
//骰子颜色类型
enum ColorPinoyLiveDiceColorType {
ColorPinoyLiveType_Void = 0;
ColorPinoyLiveType_YELLOW = 1; //黄色
ColorPinoyLiveType_WHITE = 2; //白色
ColorPinoyLiveType_PINK = 3; //粉色
ColorPinoyLiveType_BLUE = 4; //蓝色
ColorPinoyLiveType_RED = 5; //红色
ColorPinoyLiveType_GREEN = 6; //绿色
}
// 带jackpot版本的押注类型
enum ColorPinoyLiveBetTypeJP {
CLJ_Yellow = 0; // 黄色
CLJ_White = 1; // 白色
CLJ_Pink = 2; // 粉色
CLJ_Blue = 3; // 蓝色
CLJ_Red = 4; // 红色
CLJ_Green = 5; // 绿色
CLJ_Double_Yellow = 6; // 双黄色
CLJ_Double_White = 7; // 双白色
CLJ_Double_Pink = 8; // 双粉色
CLJ_Double_Blue = 9; // 双蓝色
CLJ_Double_Red = 10; // 双红色
CLJ_Double_Green = 11; // 双绿色
CLJ_Three_Yellow = 12; // 双黄色
CLJ_Three_White = 13; // 双白色
CLJ_Three_Pink = 14; // 双粉色
CLJ_Three_Blue = 15; // 双蓝色
CLJ_Three_Red = 16; // 双红色
CLJ_Three_Green = 17; // 双绿色
}
//游戏阶段
enum ColorPinoyLiveGameStatus{
ColorPinoyLiveStartUnReady = 0;
ColorPinoyLiveStartReady = 1; //开始321
ColorPinoyLiveStartMovie = 2; //开始动画
ColorPinoyLiveBetStatus = 3; //下注阶段
ColorPinoyLiveEndBetMovie = 4; //结束下注动画
// ColorPinoyLiveOpenLuckyDice = 5; //开lucky dice
ColorPinoyLiveOpenThreeDice = 6; //开3个 dice
ColorPinoyLiveSettleStatus = 7; //结算阶段
ColorPinoyLiveRankStatus = 8; //排行阶段
}
enum ColorPinoyLiveLeaveReason {
ColorPinoyLiveLeaveReason_void = 0;
ColorPinoyLiveLeaveReason_PLAYER_QUIT_ROOM=2; // 玩家离开游戏
ColorPinoyLiveLeaveReason_Maintaince=20; //维护公告
ColorPinoyLiveLeaveReason_Server_Update=21; //服务器更新
ColorPinoyLiveLeaveReason_Ban=22; //封禁
}
message ColorPinoyLiveStatusMessage{
int32 Status = 1; //状态
int32 StatusTime = 2; //状态的总时间
int32 StatusRemainTime = 3; // 状态还剩多久结束时间
int64 jackpot = 4;
}
message ColorPinoyLiveGameOpenThreeDice{
int32 Status = 1; //游戏状态
repeated ColorPinoyLiveDiceColorType color = 2; //骰子颜色 3个
int32 aniRouteIndex = 3; // 动画路径
}
message ColorPinoyLiveBetReq {
ColorPinoyLiveBetTypeJP BetType = 1;//下注区域
int32 BetLevel = 2;//筹码级别
int32 BetIndex = 3;//下注的下标
int64 BetAmount = 4;//下注cash
}
// 服务器收到的押注信息
message ColorPinoyLiveBetReqs {
repeated ColorPinoyLiveBetReq info = 1; // 下注区域数组
}
message ColorPinoyLiveBetResp {
int32 code = 1;
string msg = 2;
}
//游戏中几个玩家的数据
message ColorPinoyLiveSeatUser {
string Nick = 1; // 用户昵称
string Head = 2; // 头像
int64 Score = 3; // 分数
int32 SeatId = 4; //在场景中的座位id
int64 UserID = 5; //用户ID
}
// 发送在线人数
message ColorPinoyLiveS2COnlinePlayerNum{
int64 Num = 1; //
}
// 结束下注,更新大客投注信息
message ColorPinoyLivePlayerBigWinner
{
repeated ColorPinoyLiveBigWinner bigBet = 34; // 大客投注
int64 jackpot = 1; // 下注结束更新jackpot值
}
message ColorPinoyLiveSceneBetInfo{
int64 UserBetTotal = 1;//玩家总下注
repeated int64 TotalBets = 2;//总各区域下注
repeated int64 UserBets = 3;//用户各区域下注
ColorPinoyLiveUserInfo UserInfo = 4;//用户信息
}
message ColorPinoyLiveBetArr{
repeated int64 betArr = 3; //下注数组
}
// 房间下注规则
message ColorPinoyLiveRoomBetRuleMsg{
int32 userBetLimit = 1;
int64 betMinLimit = 2;//最低携带金币限制
repeated ColorPinoyLiveBetArr betLevels = 3;//下注级别
repeated int64 level = 4;//等级
repeated BetAreaMulRangeConfig mulRangeConfig = 5; // 赔率显示
}
message ColorPinoyLiveTrendGroup{
ColorPinoyLiveDiceColorType luckyDice = 1; // 幸运骰子
repeated ColorPinoyLiveDiceColorType threeDice = 2; // 3个普通骰子
}
message ColorPinoyLiveTrend{
repeated ColorPinoyLiveTrendGroup listTrendGroup = 1;
repeated int32 luckStarRate = 2; // 数组索引号为颜色从0-5(ColorPinoyLiveDiceColorType-1)
}
// 腾讯云实时音视频房间参数
message TRTCRoomArgs {
int32 appId = 1;
string strRoomId = 2;
string userId = 3;
string userSig = 4;
}
// 赢钱最多的6个玩家
message ColorPinoyLiveBigWinner
{
string nickName = 5;//名字
string avatar = 2;
int64 winChips = 1; // 赢取金币
repeated int64 areaId = 3; // 赢钱区域(前6个)
}
// 投注区域赔率范围配置信息
message BetAreaMulRangeConfig {
ColorPinoyLiveBigBetAreaPos pos = 1; // 下注区域为单色区0-2时该值表明是单色还是双色三色不同的赔率
int64 minMul = 2;
int64 maxMul = 3;
}
// 发送场景数据
message SceneMessage{
int32 roomID = 1;
ColorPinoyLiveStatusMessage gameStatus = 2; // 游戏状态
int32 statusTime = 3; // 游戏状态剩余时间(下注倒计时会有 其余时间为 零)
int32 onlineNum = 4; // 在线人数
ColorPinoyLiveTrend trendList = 5; // 走势图
ColorPinoyLiveDiceColorType luckyDice = 6; // 幸运骰子
repeated ColorPinoyLiveDiceColorType threeDice = 7; // 3个普通骰子
repeated ColorPinoyLiveGameBetAreaInfo betAreaInfo = 8; // 下注信息
ColorPinoyLiveRoomBetRuleMsg betRule = 9; // 下注规则
// repeated SeatUser userData = 10; // 在坐玩家
int32 aniLuckyDiceRouteIndex = 10; // 幸运骰子 掉落路径
int32 aniThreeDiceRouteIndex = 11; // 3个骰子 掉落路径
int32 onlineNums = 12; // 在线人数
repeated ColorPinoyLiveBetReqs lastTimeBet = 13; // 上局下注
repeated ColorPinoyLivePlayerData rankList = 14; // 玩家数据
int32 bonus = 15; // 幸运骰子加成
string artcUrl = 16; // 阿里云拉流地址
TRTCRoomArgs trtcRoomArgs = 17; // 腾讯云房间参数
int64 balance = 18; // 用户余额
repeated ColorPinoyLiveBigWinner bigWinner = 19; // 大客数据
repeated string dealerName = 20; // 主播名字
int64 jackpot = 21; // jackpot值
repeated BetAreaMulRangeConfig mulRangeConfig = 22; // 赔率显示
}
message ColorPinoyLiveUserSitDown{
int32 ChairNo = 1;//座位号
}
message ColorPinoyLiveUserSitDownFail{
string FailReaSon = 1;//坐下失败
}
message ColorPinoyLiveBetAreaOdd{
ColorPinoyLiveBetTypeJP betArea = 1; // 投注区域
int64 odd = 4; // 实际中奖赔率
int64 viewOdd = 9; // 投注面板显示的赔率比如单黄区域爆奖显示x10赔率开出黄白红则实际中奖赔率是基础赔率而不是爆奖赔率
bool isBigOdd = 5; // true:爆奖
ColorPinoyLiveBigBetAreaPos bigSingleColorOddPos = 6; // 下注区域为单色区0-2时该值表明是单色还是双色三色不同的赔率
bool isWin = 7; // 该区域是否中奖
bool isJackpot = 8; // true:jackpot位置
}
//扑克消息
message ColorPinoyLivePokerMsg{
repeated ColorPinoyLiveBetAreaOdd winBetArea = 5; // 中奖区域
}
message ColorPinoyLiveUserInfo{
string NikeName = 1;//昵称
int64 UserGlod = 2;//玩家金币
int64 BetGold = 3;//近20局赢取的金币
int32 WinCount = 4;//赢的次数
string Head = 5; // 头像
int64 UserID = 6;//用户id
}
//用户列表
message ColorPinoyLiveUserList{
repeated ColorPinoyLiveUserInfo UserList = 1;
}
//个人 结算消息
message ColorPinoyLiveUserSettleMsg{
int64 TotalWinBaseBet = 1; //赢区的投注总和
int64 UserScore = 2; //用户当前的分数
int64 TotalWin = 3; //扣税以后总赢钱
repeated int64 UserBets = 4; //用户各区域下注
repeated int64 TotalBets = 5; //总各区域下注
repeated int64 UserWins = 6; //用户各区域赢钱
repeated int64 UserRealWins = 7;//用户各区域赢钱扣税后
int64 Tax = 9; //税
repeated int64 oddsWins = 10; // // 老版 用户各区域的赢区的结算倍率 todo
repeated int64 userBetsCount = 11; // 用户各区域下注次数
repeated ColorPinoyLiveBetAreaOdd winAreaOdd = 12; // 中奖区域及中奖赔率
int64 jackpotWin = 13; // jackpot奖励
repeated string jackpotUserName = 14; // 中jackpot 玩家名单
}
message ColorPinoyLiveGameBetAreaUserInfo{
int64 userID = 1;
int64 betChips = 2;
}
// 爆奖区域位置
enum ColorPinoyLiveBigBetAreaPos {
BBA_Single_0 = 0; // 单色投注区域开出单色
BBA_Single_1 = 1; // 单色投注区域开出双色
BBA_Single_2 = 2; // 单色投注区域开出三色
BBA_Double = 3; // 双色投注区域
BBA_Three = 4; // 三色投注区域
}
message ColorPinoyLiveGameBetAreaInfo{
ColorPinoyLiveBetTypeJP betType = 1;// 下注区域
repeated ColorPinoyLiveGameBetAreaUserInfo betChipsInfo = 2;//该下注区的玩家下注情况
int32 isWin = 3; //这个区域是否中奖
repeated int64 odd = 4; // 赔率 单色投注区域有三个赔率 其它投注区域只有一个赔率
bool isBigOdd = 5; // true:爆奖
ColorPinoyLiveBigBetAreaPos bigSingleColorOddPos = 6; // 下注区域为单色区0-2时该值表明是单色还是双色三色不同的赔率
bool isJackpot = 7; // 该区域是否jackpot
}
message ColorPinoyLiveSceneUserInfo{
int64 UserID = 1;
int32 SceneSeatID = 2;
int64 UserScore = 3; //当前分数
int64 TotalWin = 4; //扣税以后总赢钱
int64 jackpotWin = 5; // jackpot赢钱
int64 normalWin = 6; // 非jackpot赢钱
}
//场景上的玩家结算信息
message ColorPinoyLiveSceneSettleMsg{
repeated ColorPinoyLiveGameBetAreaInfo betAreaInfo = 1; // 下注区域信息
// repeated SceneUserInfo UserList = 2; // 有座玩家下注信息
int64 noChairTotalWin = 2;
int64 sysDealerAreaInfo = 3; // 系统庄是否有赢
ColorPinoyLiveSceneUserInfo selfWinInfo = 4; // 自己的输赢
ColorPinoyLiveDiceColorType luckyDice = 5; // 幸运骰子
repeated ColorPinoyLiveDiceColorType threeDice = 6; // 3个普通骰子
ColorPinoyLiveTrendGroup trendGroup = 7;
repeated ColorPinoyLiveBetReqs lastTimeBet = 8; // 上局下注
ColorPinoyLiveTrend trendGroupEx = 9;
repeated ColorPinoyLiveBigWinner bigWinner = 10; // 大客数据
int64 jackpot = 11; // jackpot池
repeated string jackpotUserName = 12; // 中jackpot 玩家名单
}
//message ExitFail{
// string FailReason = 1;//失败的原因
//}
message ColorPinoyLiveKickOutUserMsg{
string KickOutReason = 1;//踢出玩家发送原因
int32 reason = 2; //1没操作 2服务器维护
}
//次消息一秒一次
message ColorPinoyLiveUpdateRoomInfoMsg{
int64 OnlineNum = 1; //在线人数
}
//测试
message ColorPinoyLivetempCardMsg{
bytes LongPoker = 1;
bytes HuPoker = 2;
}
// 押注成功时发送的消息
message ColorPinoyLiveBetSuccessMessage {
int32 SeatId = 1;//座位号,场景中的座位号
int32 BetLevel = 2;//下注的下标
int32 BetIndex = 3;//下注的下标
ColorPinoyLiveBetTypeJP BetType = 4;//下注区域
int64 UserBet = 5; //该玩家本次下注
int64 UserBets = 6; //该玩家各区域总下注
int64 TotalBets = 7;//所有玩家总各区域下注
}
// 押注成功返回
message ColorPinoyLiveS2CRepetBet {
repeated ColorPinoyLiveBetSuccessMessage betInfo = 1;
int64 UserScore = 2; //用户当前的分数
int64 uid = 3;
}
message ColorPinoyLiveS2CNoChairRepetBet {
repeated ColorPinoyLiveBetSuccessMessage betInfo = 1;
repeated int64 UserBets = 2;//用户各区域下注
repeated int64 TotalBets = 3;//总各区域下注
int64 UserScore = 4; //用户当前的分数
int64 uid = 5;
}
// 押注翻倍
message ColorPinoyLiveC2SBetDouble {
}
//撤回类型
enum ColorPinoyLiveUndoType{
ColorPinoyLiveUndoVoid = 0;
ColorPinoyLiveUndoOne = 1;//撤回一次
ColorPinoyLiveUndoAll = 2; //撤回所有
}
// 撤回
message ColorPinoyLiveC2SUndoBet {
ColorPinoyLiveUndoType undoType = 1;
}
//撤回返回
message S2CUndoBet {
ColorPinoyLiveUndoType undoType = 1;
repeated ColorPinoyLiveBetSuccessMessage betInfo = 2;
int64 UserScore = 3; //用户当前的分数
int64 uid = 4;
}
// 广播爆奖
message ColorPinoyLiveNtfBigOddBetArea
{
repeated ColorPinoyLiveGameBetAreaInfo betAreas = 1; // 下注结束后,每个区域更新是否爆奖
}
message ColorPinoyLiveMainteNtf {
ColorPinoyLiveUserInfo userInfo = 1;
string maintMsg = 2;//维护消息
int64 returnGold = 3;//返回金币
}
message ColorPinoyLiveS2CBetEndFailResult{ // 停止下注和平台扣钱 失败返回
int32 code = 1;
repeated ColorPinoyLiveS2CRepetBet players = 2;
}
message ColorPinoyLiveApplyPropsReq{
int64 userId = 1;//使用者 uid
int64 acceptUserId = 2;//接受者uid
string propsId = 3;//道具id
}
message ColorPinoyLivePlayerPropsResp{
int64 applyUserId = 1;//发送者
int64 acceptUserId = 2;//接受者
string propsId = 3;//道具id
int64 chips = 4;//发送者使用道具后金币
}
message ColorPinoyLiveLeaveResp{
int32 code = 1; // 0能离开 其他不能离开
string msg = 2;
}
// 广播主播名字
message ColorPinoyLiveDealerName
{
repeated string dealerName = 1; // 主播名字
}
//================================================================================================================================
message ColorPinoyLivePlayerData {
int64 uid = 1;
repeated int64 totalBets = 2; // 各区域投注
int64 totalBet = 3; // 总投注
int64 score = 4; // 总分
int64 profit = 5; // 实际总盈利(需按照以小博大&破产逻辑计算并抽水)
int64 tax = 6; // 抽水
int64 balance = 7; // 余额
int64 wait_time = 8; // 等待开局时间
int64 pre_balance = 9; // 开局余额
repeated int64 userWins = 10; // 用户各区域赢钱
repeated int64 userRealWins = 11; // 用户各区域真实赢钱
int64 start_time = 12;
string nickname = 13; // 用户冗余数据生产方不需要填入由API查询写入
string avatar = 14; // 用户冗余数据生产方不需要填入由API查询写入
int64 trans_bet = 15; // 流水投注
int64 trans_win = 16; // 流水获利
int32 dev_mode = 17; // 用户属性
repeated int64 odds = 18; // // 老版 投注区域倍率 todo
repeated int64 userBetsCount = 19; // 用户各区域下注次数
int32 isDiscard = 20; // 是否废弃 0正常 1废弃
repeated ColorPinoyLiveBetAreaOdd areaOdds = 21; // 投注区域倍率
}
message ColorPinoyLiveDetail {
repeated int64 winDoubleColorMul = 1; // // 老版 胜利双色奖励倍率 todo
repeated int64 winSingleColorMul = 2; // // 老版 胜利单色奖励倍率 todo
int64 bonus = 3; // 幸运骰子加成
repeated ColorPinoyLiveDiceColorType threeDice = 4; // 3个普通骰子
ColorPinoyLiveDiceColorType luckyDice = 5; // // 老版 幸运骰子 todo
repeated ColorPinoyLiveDiceColorType startDice = 6; // 初始位置摆放的骰子
repeated string resultImg = 7; // 结果图片
repeated string dealerName = 8; // 主播名字
repeated ColorPinoyLiveBetAreaOdd betAreaMul = 9; // 新版各区域的赔率
int64 jackpotFunding = 10; // 本局jackpot系统垫资多少没有垫资为0
int64 jackpotX = 11; // 赎回比例(反应系统盈亏)
int64 jackpotY = 12; // 追加进jackpot池子比例
}
// 对局详情 (游戏生产)
message ColorPinoyLiveEnd {
string game_no = 1; // 编号
int64 start_time = 2; // 开始时间
int64 end_time = 3; // 结束时间
int32 level = 4; // 场次
int64 base_bet = 5; // 底注
repeated ColorPinoyLivePlayerData player_data = 6; // 玩家数据
int64 tax_rate = 7; // 抽水比例
int64 totalBet = 8; //投注总量
repeated int64 totalBets = 9; //各区域投注总量
int64 realSystemWin = 10; //系统输赢
repeated int64 realSystemWins = 11; //各区域系统输赢
int64 tax = 12; //抽水流水
repeated ColorPinoyLiveBetTypeJP wins = 13; // 中奖区域
string op_token = 14; // 平台
ColorPinoyLiveDetail detail = 15; // 数据详情
int32 isDiscard = 16; // 是否废弃 0正常 1废弃
}
//================================================================================================================================
//游戏转态 ColorPinoyLiveGameStatus 客户端 0未开始 1准备 2开始 3下注 4结束下注 5开幸运骰子 6开三个骰子 7结算 8排行
// 对后台 2,3 合并为一个阶段 3 下注阶段, 0忽略 最终 1准备 3 下注 4结束下注 5 开幸运骰子 6 开三个骰子 7 结算 8 排行
enum ColorPinoyLiveProcessCmd{
ColorPinoyLiveVoid = 0;
ColorPinoyLiveMSGGameGetStatus = 300;//获取游戏状态 ColorPinoyLiveGetStatus
ColorPinoyLiveMSGReady = 301;//准备 空
ColorPinoyLiveMSGBetting = 302;//开始下注 空
ColorPinoyLiveMSGLucky = 303;//幸运星 ColorPinoyLiveLucky
ColorPinoyLiveMSGResult = 304;//游戏结果 ColorPinoyLiveResult
ColorPinoyLiveMSGSettle = 305;//结算 空
ColorPinoyLiveMSGRank = 306;//排行榜 空
ColorPinoyLiveMSGMMainteSet = 307;//维护状态 设置 ColorPinoyLiveMainte -> ColorPinoyLiveCommResp
ColorPinoyLiveMSGMDiscard = 308;//废弃 ColorPinoyLiveMainte -> ColorPinoyLiveCommResp
ColorPinoyLiveMSGMRankList = 309;//排行榜列表 空 ->ColorPinoyLiveRankList
ColorPinoyLiveMSGMEndBet = 310;//结束下注 空
ColorPinoyLiveMSGMStartDice = 311;//初始位置摆放的骰子
ColorPinoyLiveMSGMResultImg = 312;//结果图片
ColorPinoyLiveMSGMSyncNotify = 400;//状态同步通知
ColorPinoyLiveMSGMChat = 401; //聊天数据推送
ColorPinoyLiveMSGLiveConfig = 402; //直播配置推送
ColorPinoyLiveMSGSetDealer = 403; // 设置主播名
}
enum ColorPinoyLiveCmd{
ColorPinoyLiveCmdMSGMRandomNext = 0; // 只用于控制点击NEXT按钮推进流程
}
enum ColorPinoyLiveProcessError{
ColorPinoyLiveProcessErrorVoid =0;
ColorPinoyLiveProcessErrorGameSatus = 1;//游戏状态错误
ColorPinoyLiveProcessErrorMainteStatus = 2;//维护状态错误
ColorPinoyLiveProcessErrorDice = 3;//骰子错误
}
//通用返回
message ColorPinoyLiveCommResp{
int32 code = 1;
string msg = 2;
int32 gameId = 3;
int32 gameStatus = 4; // 当前游戏状态
int64 countdown = 5; // 进入下一个阶段的毫秒时间戳
int64 countdown2 = 6; // 进入下一个阶段的毫秒时间戳
int32 maintainStatus = 7; // 维护状态 0 正常 1 维护
string maintainMsg = 8; //维护消息
ColorPinoyLiveDiceColorType luckyStar = 9; // 幸运星
repeated ColorPinoyLiveDiceColorType drawResult = 10; // 开奖结果
repeated int64 times = 11;
ColorPinoyLiveRankList rankList = 12; // 排行榜列表
repeated ColorPinoyLiveDiceColorType startDice = 13; // 初始位置摆放的骰子
repeated string resultImg = 14; // 结果图片
bool randomNext = 15; // randomNext
string gameNo = 16; // 对局编号
repeated string dealerName = 19; // 当前主播名字
repeated ColorPinoyLiveGameBetAreaInfo betAreaMul = 20; // 新版各区域的赔率
int64 jackpot = 30; // jackpot金额
}
//GameGetStatus
message ColorPinoyLiveGetStatus{
int32 gameId = 1;
}
//幸运星
message ColorPinoyLiveLucky{
ColorPinoyLiveDiceColorType Color = 1;
}
//游戏结果
message ColorPinoyLiveResult{
repeated ColorPinoyLiveDiceColorType Color = 1;
}
//初始位置摆放的骰子
message ColorPinoyLiveStartDice{
repeated ColorPinoyLiveDiceColorType startDice = 1; // 初始位置摆放的骰子
}
//结果图片
message ColorPinoyLiveResultImg{
repeated string resultImg = 1; // 结果图片
int32 stage = 2; // 控制台使用 1: random 2: lottery
}
// 维护状态设置
message ColorPinoyLiveMaintain{
int32 targetStatus = 1;// 维护状态 0 正常 1 维护
string msg = 2;//维护消息
}
//排行榜列表
message ColorPinoyLiveRankList{
repeated ColorPinoyLivePlayerData player_data = 1; // 玩家数据
string game_no = 2; // 编号
int64 start_time = 3; // 开始时间
int64 end_time = 4; // 结束时间
}
// 设置主播名字
message ColorPinoyLiveSetDealer{
repeated string dealerName = 1; // 主播名字
}