From 0cd61a60c2c889d3c6befea13a1638a34d14e320 Mon Sep 17 00:00:00 2001 From: liuxiaobo <1224730913@qq.com> Date: Sun, 8 Jun 2025 00:52:17 +0800 Subject: [PATCH] .. --- common/pb/colorgame.proto | 571 +++ common/pb/msgId.proto | 37 + common/proto/pb/colorgame.pb.go | 5254 +++++++++++++++++++++++++++- common/proto/pb/msgId.pb.go | 163 +- server/colorgame/room/alive.go | 518 +++ server/colorgame/room/c2s.go | 225 ++ server/colorgame/room/colorRoom.go | 458 +++ server/colorgame/room/helper.go | 1179 +++++++ server/colorgame/room/onMessage.go | 16 - server/colorgame/room/process.go | 117 + server/colorgame/room/s2c.go | 703 ++++ 11 files changed, 9201 insertions(+), 40 deletions(-) create mode 100644 server/colorgame/room/alive.go create mode 100644 server/colorgame/room/c2s.go create mode 100644 server/colorgame/room/helper.go delete mode 100644 server/colorgame/room/onMessage.go create mode 100644 server/colorgame/room/process.go create mode 100644 server/colorgame/room/s2c.go diff --git a/common/pb/colorgame.proto b/common/pb/colorgame.proto index 29dc94c..647cf62 100644 --- a/common/pb/colorgame.proto +++ b/common/pb/colorgame.proto @@ -3,7 +3,578 @@ 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; // 主播名字 +} diff --git a/common/pb/msgId.proto b/common/pb/msgId.proto index 547a3e3..ae3ab0f 100644 --- a/common/pb/msgId.proto +++ b/common/pb/msgId.proto @@ -30,6 +30,43 @@ enum MsgId C2SMatchRoomId = 2200; // 匹配服 S2CMatchRoomId = 2201; NtfUserEnterRoomId = 2202; // 玩家进入房间 所有玩法共用此消息 + + // color game 2300-2499 + ColorPinoyLiveNoticeGameSync = 201; + ColorPinoyLiveNoticeGameReady = 202; + ColorPinoyLiveNoticeGameStart = 203; + ColorPinoyLiveNoticeGameStartBet = 204; + ColorPinoyLiveNoticeGameEndBet = 205; + ColorPinoyLiveNoticeGameOpenLuckyDice = 206; + ColorPinoyLiveNoticeGameOpenThreeDice = 207; + ColorPinoyLiveNoticeGameUserSettle = 208; // 用户自己结算返回 + ColorPinoyLiveNoticeGameSettle = 209; // 广播本局结算信息 + ColorPinoyLiveNoticeGameSeatUserBet = 210; // 广播座位上的玩家下注信息 + ColorPinoyLiveNoticeGameUserBet = 211; // 玩家下注成功返回 + ColorPinoyLiveNoticeGameTrendInfo = 212; // 走势图 + ColorPinoyLiveNoticePlayerLeaveNtf = 213; // 离开广播 + ColorPinoyLiveNoticeOnlinePlayerNum = 214; // 在线玩家数量 + ColorPinoyLiveNoticeUpdateRoomInfo = 215; // 更新房间信息 1秒一次 + ColorPinoyLiveNoticeUndoBet = 216; // 撤销下注 + ColorPinoyLiveNoticeBetFail = 217; // 下注失败 撤销下注失败 ... + ColorPinoyLiveNoticeKickOutUser = 218; // 踢出玩家发送原因 + ColorPinoyLiveNoticeRoomBetRuleMsg = 219; // 推送玩家下注规则 + ColorPinoyLiveNoticePlayerUseProps = 220; // 推送玩家使用道具 + ColorPinoyLiveNoticePlayerBetEndResultFailed = 221; // 推送玩家结束下注时扣钱失败 + ColorPinoyLiveNoticeGameMainte = 222; // 推送游戏维护 ColorPinoyLiveMainteNtf + ColorPinoyLiveNoticeDiscard = 223; // 推送废弃 ColorPinoyLiveMainteNtf + ColorPinoyLiveNoticeRankList = 224; // 推送排行榜 ColorPinoyLiveRankList + ColorPinoyLiveNoticeGameBigWinner = 225; // 大客投注信息 + ColorPinoyLiveNoticeDealerName = 226; // 设置或清空主播名字 + ColorPinoyLiveNoticeBigOddBetArea = 228; // 下注结束后更新区域爆奖信息 + + ColorPinoyLiveApplyBetChips = 101; // 下注信息 + ColorPinoyLiveApplyGetTrend = 102; //获取走势图 + ColorPinoyLiveApplyBetDouble = 104; //一键翻倍押注 + ColorPinoyLiveApplyUndoBet = 105; //撤回押注 + + ColorPinoyLiveApplyLeave = 107; //申请离开 + ColorPinoyLiveApplyBetAgain = 108; //申请重复下注 } diff --git a/common/proto/pb/colorgame.pb.go b/common/proto/pb/colorgame.pb.go index 43b76ee..e2b3c87 100644 --- a/common/proto/pb/colorgame.pb.go +++ b/common/proto/pb/colorgame.pb.go @@ -10,6 +10,7 @@ import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" + sync "sync" unsafe "unsafe" ) @@ -20,19 +21,5252 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +// 骰子颜色类型 +type ColorPinoyLiveDiceColorType int32 + +const ( + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void ColorPinoyLiveDiceColorType = 0 + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_YELLOW ColorPinoyLiveDiceColorType = 1 //黄色 + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_WHITE ColorPinoyLiveDiceColorType = 2 //白色 + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_PINK ColorPinoyLiveDiceColorType = 3 //粉色 + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_BLUE ColorPinoyLiveDiceColorType = 4 //蓝色 + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_RED ColorPinoyLiveDiceColorType = 5 //红色 + ColorPinoyLiveDiceColorType_ColorPinoyLiveType_GREEN ColorPinoyLiveDiceColorType = 6 //绿色 +) + +// Enum value maps for ColorPinoyLiveDiceColorType. +var ( + ColorPinoyLiveDiceColorType_name = map[int32]string{ + 0: "ColorPinoyLiveType_Void", + 1: "ColorPinoyLiveType_YELLOW", + 2: "ColorPinoyLiveType_WHITE", + 3: "ColorPinoyLiveType_PINK", + 4: "ColorPinoyLiveType_BLUE", + 5: "ColorPinoyLiveType_RED", + 6: "ColorPinoyLiveType_GREEN", + } + ColorPinoyLiveDiceColorType_value = map[string]int32{ + "ColorPinoyLiveType_Void": 0, + "ColorPinoyLiveType_YELLOW": 1, + "ColorPinoyLiveType_WHITE": 2, + "ColorPinoyLiveType_PINK": 3, + "ColorPinoyLiveType_BLUE": 4, + "ColorPinoyLiveType_RED": 5, + "ColorPinoyLiveType_GREEN": 6, + } +) + +func (x ColorPinoyLiveDiceColorType) Enum() *ColorPinoyLiveDiceColorType { + p := new(ColorPinoyLiveDiceColorType) + *p = x + return p +} + +func (x ColorPinoyLiveDiceColorType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveDiceColorType) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[0].Descriptor() +} + +func (ColorPinoyLiveDiceColorType) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[0] +} + +func (x ColorPinoyLiveDiceColorType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveDiceColorType.Descriptor instead. +func (ColorPinoyLiveDiceColorType) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{0} +} + +// 带jackpot版本的押注类型 +type ColorPinoyLiveBetTypeJP int32 + +const ( + ColorPinoyLiveBetTypeJP_CLJ_Yellow ColorPinoyLiveBetTypeJP = 0 // 黄色 + ColorPinoyLiveBetTypeJP_CLJ_White ColorPinoyLiveBetTypeJP = 1 // 白色 + ColorPinoyLiveBetTypeJP_CLJ_Pink ColorPinoyLiveBetTypeJP = 2 // 粉色 + ColorPinoyLiveBetTypeJP_CLJ_Blue ColorPinoyLiveBetTypeJP = 3 // 蓝色 + ColorPinoyLiveBetTypeJP_CLJ_Red ColorPinoyLiveBetTypeJP = 4 // 红色 + ColorPinoyLiveBetTypeJP_CLJ_Green ColorPinoyLiveBetTypeJP = 5 // 绿色 + ColorPinoyLiveBetTypeJP_CLJ_Double_Yellow ColorPinoyLiveBetTypeJP = 6 // 双黄色 + ColorPinoyLiveBetTypeJP_CLJ_Double_White ColorPinoyLiveBetTypeJP = 7 // 双白色 + ColorPinoyLiveBetTypeJP_CLJ_Double_Pink ColorPinoyLiveBetTypeJP = 8 // 双粉色 + ColorPinoyLiveBetTypeJP_CLJ_Double_Blue ColorPinoyLiveBetTypeJP = 9 // 双蓝色 + ColorPinoyLiveBetTypeJP_CLJ_Double_Red ColorPinoyLiveBetTypeJP = 10 // 双红色 + ColorPinoyLiveBetTypeJP_CLJ_Double_Green ColorPinoyLiveBetTypeJP = 11 // 双绿色 + ColorPinoyLiveBetTypeJP_CLJ_Three_Yellow ColorPinoyLiveBetTypeJP = 12 // 双黄色 + ColorPinoyLiveBetTypeJP_CLJ_Three_White ColorPinoyLiveBetTypeJP = 13 // 双白色 + ColorPinoyLiveBetTypeJP_CLJ_Three_Pink ColorPinoyLiveBetTypeJP = 14 // 双粉色 + ColorPinoyLiveBetTypeJP_CLJ_Three_Blue ColorPinoyLiveBetTypeJP = 15 // 双蓝色 + ColorPinoyLiveBetTypeJP_CLJ_Three_Red ColorPinoyLiveBetTypeJP = 16 // 双红色 + ColorPinoyLiveBetTypeJP_CLJ_Three_Green ColorPinoyLiveBetTypeJP = 17 // 双绿色 +) + +// Enum value maps for ColorPinoyLiveBetTypeJP. +var ( + ColorPinoyLiveBetTypeJP_name = map[int32]string{ + 0: "CLJ_Yellow", + 1: "CLJ_White", + 2: "CLJ_Pink", + 3: "CLJ_Blue", + 4: "CLJ_Red", + 5: "CLJ_Green", + 6: "CLJ_Double_Yellow", + 7: "CLJ_Double_White", + 8: "CLJ_Double_Pink", + 9: "CLJ_Double_Blue", + 10: "CLJ_Double_Red", + 11: "CLJ_Double_Green", + 12: "CLJ_Three_Yellow", + 13: "CLJ_Three_White", + 14: "CLJ_Three_Pink", + 15: "CLJ_Three_Blue", + 16: "CLJ_Three_Red", + 17: "CLJ_Three_Green", + } + ColorPinoyLiveBetTypeJP_value = map[string]int32{ + "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, + } +) + +func (x ColorPinoyLiveBetTypeJP) Enum() *ColorPinoyLiveBetTypeJP { + p := new(ColorPinoyLiveBetTypeJP) + *p = x + return p +} + +func (x ColorPinoyLiveBetTypeJP) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveBetTypeJP) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[1].Descriptor() +} + +func (ColorPinoyLiveBetTypeJP) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[1] +} + +func (x ColorPinoyLiveBetTypeJP) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveBetTypeJP.Descriptor instead. +func (ColorPinoyLiveBetTypeJP) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{1} +} + +// 游戏阶段 +type ColorPinoyLiveGameStatus int32 + +const ( + ColorPinoyLiveGameStatus_ColorPinoyLiveStartUnReady ColorPinoyLiveGameStatus = 0 + ColorPinoyLiveGameStatus_ColorPinoyLiveStartReady ColorPinoyLiveGameStatus = 1 //开始321 + ColorPinoyLiveGameStatus_ColorPinoyLiveStartMovie ColorPinoyLiveGameStatus = 2 //开始动画 + ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus ColorPinoyLiveGameStatus = 3 //下注阶段 + ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie ColorPinoyLiveGameStatus = 4 //结束下注动画 + // ColorPinoyLiveOpenLuckyDice = 5; //开lucky dice + ColorPinoyLiveGameStatus_ColorPinoyLiveOpenThreeDice ColorPinoyLiveGameStatus = 6 //开3个 dice + ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus ColorPinoyLiveGameStatus = 7 //结算阶段 + ColorPinoyLiveGameStatus_ColorPinoyLiveRankStatus ColorPinoyLiveGameStatus = 8 //排行阶段 +) + +// Enum value maps for ColorPinoyLiveGameStatus. +var ( + ColorPinoyLiveGameStatus_name = map[int32]string{ + 0: "ColorPinoyLiveStartUnReady", + 1: "ColorPinoyLiveStartReady", + 2: "ColorPinoyLiveStartMovie", + 3: "ColorPinoyLiveBetStatus", + 4: "ColorPinoyLiveEndBetMovie", + 6: "ColorPinoyLiveOpenThreeDice", + 7: "ColorPinoyLiveSettleStatus", + 8: "ColorPinoyLiveRankStatus", + } + ColorPinoyLiveGameStatus_value = map[string]int32{ + "ColorPinoyLiveStartUnReady": 0, + "ColorPinoyLiveStartReady": 1, + "ColorPinoyLiveStartMovie": 2, + "ColorPinoyLiveBetStatus": 3, + "ColorPinoyLiveEndBetMovie": 4, + "ColorPinoyLiveOpenThreeDice": 6, + "ColorPinoyLiveSettleStatus": 7, + "ColorPinoyLiveRankStatus": 8, + } +) + +func (x ColorPinoyLiveGameStatus) Enum() *ColorPinoyLiveGameStatus { + p := new(ColorPinoyLiveGameStatus) + *p = x + return p +} + +func (x ColorPinoyLiveGameStatus) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveGameStatus) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[2].Descriptor() +} + +func (ColorPinoyLiveGameStatus) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[2] +} + +func (x ColorPinoyLiveGameStatus) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveGameStatus.Descriptor instead. +func (ColorPinoyLiveGameStatus) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{2} +} + +type ColorPinoyLiveLeaveReason int32 + +const ( + ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_void ColorPinoyLiveLeaveReason = 0 + ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_PLAYER_QUIT_ROOM ColorPinoyLiveLeaveReason = 2 // 玩家离开游戏 + ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_Maintaince ColorPinoyLiveLeaveReason = 20 //维护公告 + ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_Server_Update ColorPinoyLiveLeaveReason = 21 //服务器更新 + ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_Ban ColorPinoyLiveLeaveReason = 22 //封禁 +) + +// Enum value maps for ColorPinoyLiveLeaveReason. +var ( + ColorPinoyLiveLeaveReason_name = map[int32]string{ + 0: "ColorPinoyLiveLeaveReason_void", + 2: "ColorPinoyLiveLeaveReason_PLAYER_QUIT_ROOM", + 20: "ColorPinoyLiveLeaveReason_Maintaince", + 21: "ColorPinoyLiveLeaveReason_Server_Update", + 22: "ColorPinoyLiveLeaveReason_Ban", + } + ColorPinoyLiveLeaveReason_value = map[string]int32{ + "ColorPinoyLiveLeaveReason_void": 0, + "ColorPinoyLiveLeaveReason_PLAYER_QUIT_ROOM": 2, + "ColorPinoyLiveLeaveReason_Maintaince": 20, + "ColorPinoyLiveLeaveReason_Server_Update": 21, + "ColorPinoyLiveLeaveReason_Ban": 22, + } +) + +func (x ColorPinoyLiveLeaveReason) Enum() *ColorPinoyLiveLeaveReason { + p := new(ColorPinoyLiveLeaveReason) + *p = x + return p +} + +func (x ColorPinoyLiveLeaveReason) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveLeaveReason) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[3].Descriptor() +} + +func (ColorPinoyLiveLeaveReason) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[3] +} + +func (x ColorPinoyLiveLeaveReason) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveLeaveReason.Descriptor instead. +func (ColorPinoyLiveLeaveReason) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{3} +} + +// 爆奖区域位置 +type ColorPinoyLiveBigBetAreaPos int32 + +const ( + ColorPinoyLiveBigBetAreaPos_BBA_Single_0 ColorPinoyLiveBigBetAreaPos = 0 // 单色投注区域开出单色 + ColorPinoyLiveBigBetAreaPos_BBA_Single_1 ColorPinoyLiveBigBetAreaPos = 1 // 单色投注区域开出双色 + ColorPinoyLiveBigBetAreaPos_BBA_Single_2 ColorPinoyLiveBigBetAreaPos = 2 // 单色投注区域开出三色 + ColorPinoyLiveBigBetAreaPos_BBA_Double ColorPinoyLiveBigBetAreaPos = 3 // 双色投注区域 + ColorPinoyLiveBigBetAreaPos_BBA_Three ColorPinoyLiveBigBetAreaPos = 4 // 三色投注区域 +) + +// Enum value maps for ColorPinoyLiveBigBetAreaPos. +var ( + ColorPinoyLiveBigBetAreaPos_name = map[int32]string{ + 0: "BBA_Single_0", + 1: "BBA_Single_1", + 2: "BBA_Single_2", + 3: "BBA_Double", + 4: "BBA_Three", + } + ColorPinoyLiveBigBetAreaPos_value = map[string]int32{ + "BBA_Single_0": 0, + "BBA_Single_1": 1, + "BBA_Single_2": 2, + "BBA_Double": 3, + "BBA_Three": 4, + } +) + +func (x ColorPinoyLiveBigBetAreaPos) Enum() *ColorPinoyLiveBigBetAreaPos { + p := new(ColorPinoyLiveBigBetAreaPos) + *p = x + return p +} + +func (x ColorPinoyLiveBigBetAreaPos) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveBigBetAreaPos) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[4].Descriptor() +} + +func (ColorPinoyLiveBigBetAreaPos) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[4] +} + +func (x ColorPinoyLiveBigBetAreaPos) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveBigBetAreaPos.Descriptor instead. +func (ColorPinoyLiveBigBetAreaPos) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{4} +} + +// 撤回类型 +type ColorPinoyLiveUndoType int32 + +const ( + ColorPinoyLiveUndoType_ColorPinoyLiveUndoVoid ColorPinoyLiveUndoType = 0 + ColorPinoyLiveUndoType_ColorPinoyLiveUndoOne ColorPinoyLiveUndoType = 1 //撤回一次 + ColorPinoyLiveUndoType_ColorPinoyLiveUndoAll ColorPinoyLiveUndoType = 2 //撤回所有 +) + +// Enum value maps for ColorPinoyLiveUndoType. +var ( + ColorPinoyLiveUndoType_name = map[int32]string{ + 0: "ColorPinoyLiveUndoVoid", + 1: "ColorPinoyLiveUndoOne", + 2: "ColorPinoyLiveUndoAll", + } + ColorPinoyLiveUndoType_value = map[string]int32{ + "ColorPinoyLiveUndoVoid": 0, + "ColorPinoyLiveUndoOne": 1, + "ColorPinoyLiveUndoAll": 2, + } +) + +func (x ColorPinoyLiveUndoType) Enum() *ColorPinoyLiveUndoType { + p := new(ColorPinoyLiveUndoType) + *p = x + return p +} + +func (x ColorPinoyLiveUndoType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveUndoType) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[5].Descriptor() +} + +func (ColorPinoyLiveUndoType) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[5] +} + +func (x ColorPinoyLiveUndoType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveUndoType.Descriptor instead. +func (ColorPinoyLiveUndoType) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{5} +} + +type ColorPinoyLiveProcessCmd int32 + +const ( + ColorPinoyLiveProcessCmd_ColorPinoyLiveVoid ColorPinoyLiveProcessCmd = 0 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGGameGetStatus ColorPinoyLiveProcessCmd = 300 //获取游戏状态 ColorPinoyLiveGetStatus + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGReady ColorPinoyLiveProcessCmd = 301 //准备 空 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGBetting ColorPinoyLiveProcessCmd = 302 //开始下注 空 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGLucky ColorPinoyLiveProcessCmd = 303 //幸运星 ColorPinoyLiveLucky + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGResult ColorPinoyLiveProcessCmd = 304 //游戏结果 ColorPinoyLiveResult + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGSettle ColorPinoyLiveProcessCmd = 305 //结算 空 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGRank ColorPinoyLiveProcessCmd = 306 //排行榜 空 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMMainteSet ColorPinoyLiveProcessCmd = 307 //维护状态 设置 ColorPinoyLiveMainte -> ColorPinoyLiveCommResp + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMDiscard ColorPinoyLiveProcessCmd = 308 //废弃 ColorPinoyLiveMainte -> ColorPinoyLiveCommResp + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMRankList ColorPinoyLiveProcessCmd = 309 //排行榜列表 空 ->ColorPinoyLiveRankList + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMEndBet ColorPinoyLiveProcessCmd = 310 //结束下注 空 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMStartDice ColorPinoyLiveProcessCmd = 311 //初始位置摆放的骰子 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMResultImg ColorPinoyLiveProcessCmd = 312 //结果图片 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMSyncNotify ColorPinoyLiveProcessCmd = 400 //状态同步通知 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMChat ColorPinoyLiveProcessCmd = 401 //聊天数据推送 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGLiveConfig ColorPinoyLiveProcessCmd = 402 //直播配置推送 + ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGSetDealer ColorPinoyLiveProcessCmd = 403 // 设置主播名 +) + +// Enum value maps for ColorPinoyLiveProcessCmd. +var ( + ColorPinoyLiveProcessCmd_name = map[int32]string{ + 0: "ColorPinoyLiveVoid", + 300: "ColorPinoyLiveMSGGameGetStatus", + 301: "ColorPinoyLiveMSGReady", + 302: "ColorPinoyLiveMSGBetting", + 303: "ColorPinoyLiveMSGLucky", + 304: "ColorPinoyLiveMSGResult", + 305: "ColorPinoyLiveMSGSettle", + 306: "ColorPinoyLiveMSGRank", + 307: "ColorPinoyLiveMSGMMainteSet", + 308: "ColorPinoyLiveMSGMDiscard", + 309: "ColorPinoyLiveMSGMRankList", + 310: "ColorPinoyLiveMSGMEndBet", + 311: "ColorPinoyLiveMSGMStartDice", + 312: "ColorPinoyLiveMSGMResultImg", + 400: "ColorPinoyLiveMSGMSyncNotify", + 401: "ColorPinoyLiveMSGMChat", + 402: "ColorPinoyLiveMSGLiveConfig", + 403: "ColorPinoyLiveMSGSetDealer", + } + ColorPinoyLiveProcessCmd_value = map[string]int32{ + "ColorPinoyLiveVoid": 0, + "ColorPinoyLiveMSGGameGetStatus": 300, + "ColorPinoyLiveMSGReady": 301, + "ColorPinoyLiveMSGBetting": 302, + "ColorPinoyLiveMSGLucky": 303, + "ColorPinoyLiveMSGResult": 304, + "ColorPinoyLiveMSGSettle": 305, + "ColorPinoyLiveMSGRank": 306, + "ColorPinoyLiveMSGMMainteSet": 307, + "ColorPinoyLiveMSGMDiscard": 308, + "ColorPinoyLiveMSGMRankList": 309, + "ColorPinoyLiveMSGMEndBet": 310, + "ColorPinoyLiveMSGMStartDice": 311, + "ColorPinoyLiveMSGMResultImg": 312, + "ColorPinoyLiveMSGMSyncNotify": 400, + "ColorPinoyLiveMSGMChat": 401, + "ColorPinoyLiveMSGLiveConfig": 402, + "ColorPinoyLiveMSGSetDealer": 403, + } +) + +func (x ColorPinoyLiveProcessCmd) Enum() *ColorPinoyLiveProcessCmd { + p := new(ColorPinoyLiveProcessCmd) + *p = x + return p +} + +func (x ColorPinoyLiveProcessCmd) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveProcessCmd) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[6].Descriptor() +} + +func (ColorPinoyLiveProcessCmd) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[6] +} + +func (x ColorPinoyLiveProcessCmd) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveProcessCmd.Descriptor instead. +func (ColorPinoyLiveProcessCmd) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{6} +} + +type ColorPinoyLiveCmd int32 + +const ( + ColorPinoyLiveCmd_ColorPinoyLiveCmdMSGMRandomNext ColorPinoyLiveCmd = 0 // 只用于控制点击NEXT按钮推进流程 +) + +// Enum value maps for ColorPinoyLiveCmd. +var ( + ColorPinoyLiveCmd_name = map[int32]string{ + 0: "ColorPinoyLiveCmdMSGMRandomNext", + } + ColorPinoyLiveCmd_value = map[string]int32{ + "ColorPinoyLiveCmdMSGMRandomNext": 0, + } +) + +func (x ColorPinoyLiveCmd) Enum() *ColorPinoyLiveCmd { + p := new(ColorPinoyLiveCmd) + *p = x + return p +} + +func (x ColorPinoyLiveCmd) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveCmd) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[7].Descriptor() +} + +func (ColorPinoyLiveCmd) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[7] +} + +func (x ColorPinoyLiveCmd) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveCmd.Descriptor instead. +func (ColorPinoyLiveCmd) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{7} +} + +type ColorPinoyLiveProcessError int32 + +const ( + ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorVoid ColorPinoyLiveProcessError = 0 + ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus ColorPinoyLiveProcessError = 1 //游戏状态错误 + ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus ColorPinoyLiveProcessError = 2 //维护状态错误 + ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorDice ColorPinoyLiveProcessError = 3 //骰子错误 +) + +// Enum value maps for ColorPinoyLiveProcessError. +var ( + ColorPinoyLiveProcessError_name = map[int32]string{ + 0: "ColorPinoyLiveProcessErrorVoid", + 1: "ColorPinoyLiveProcessErrorGameSatus", + 2: "ColorPinoyLiveProcessErrorMainteStatus", + 3: "ColorPinoyLiveProcessErrorDice", + } + ColorPinoyLiveProcessError_value = map[string]int32{ + "ColorPinoyLiveProcessErrorVoid": 0, + "ColorPinoyLiveProcessErrorGameSatus": 1, + "ColorPinoyLiveProcessErrorMainteStatus": 2, + "ColorPinoyLiveProcessErrorDice": 3, + } +) + +func (x ColorPinoyLiveProcessError) Enum() *ColorPinoyLiveProcessError { + p := new(ColorPinoyLiveProcessError) + *p = x + return p +} + +func (x ColorPinoyLiveProcessError) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (ColorPinoyLiveProcessError) Descriptor() protoreflect.EnumDescriptor { + return file_colorgame_proto_enumTypes[8].Descriptor() +} + +func (ColorPinoyLiveProcessError) Type() protoreflect.EnumType { + return &file_colorgame_proto_enumTypes[8] +} + +func (x ColorPinoyLiveProcessError) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use ColorPinoyLiveProcessError.Descriptor instead. +func (ColorPinoyLiveProcessError) EnumDescriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{8} +} + +// color玩法配置信息 +type ColorRoomInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorRoomInfo) Reset() { + *x = ColorRoomInfo{} + mi := &file_colorgame_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorRoomInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorRoomInfo) ProtoMessage() {} + +func (x *ColorRoomInfo) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorRoomInfo.ProtoReflect.Descriptor instead. +func (*ColorRoomInfo) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{0} +} + +type ColorPinoyLiveStatusMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status int32 `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"` //状态 + StatusTime int32 `protobuf:"varint,2,opt,name=StatusTime,proto3" json:"StatusTime,omitempty"` //状态的总时间 + StatusRemainTime int32 `protobuf:"varint,3,opt,name=StatusRemainTime,proto3" json:"StatusRemainTime,omitempty"` // 状态还剩多久结束时间 + Jackpot int64 `protobuf:"varint,4,opt,name=jackpot,proto3" json:"jackpot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveStatusMessage) Reset() { + *x = ColorPinoyLiveStatusMessage{} + mi := &file_colorgame_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveStatusMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveStatusMessage) ProtoMessage() {} + +func (x *ColorPinoyLiveStatusMessage) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveStatusMessage.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveStatusMessage) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{1} +} + +func (x *ColorPinoyLiveStatusMessage) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *ColorPinoyLiveStatusMessage) GetStatusTime() int32 { + if x != nil { + return x.StatusTime + } + return 0 +} + +func (x *ColorPinoyLiveStatusMessage) GetStatusRemainTime() int32 { + if x != nil { + return x.StatusRemainTime + } + return 0 +} + +func (x *ColorPinoyLiveStatusMessage) GetJackpot() int64 { + if x != nil { + return x.Jackpot + } + return 0 +} + +type ColorPinoyLiveGameOpenThreeDice struct { + state protoimpl.MessageState `protogen:"open.v1"` + Status int32 `protobuf:"varint,1,opt,name=Status,proto3" json:"Status,omitempty"` //游戏状态 + Color []ColorPinoyLiveDiceColorType `protobuf:"varint,2,rep,packed,name=color,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"color,omitempty"` //骰子颜色 3个 + AniRouteIndex int32 `protobuf:"varint,3,opt,name=aniRouteIndex,proto3" json:"aniRouteIndex,omitempty"` // 动画路径 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveGameOpenThreeDice) Reset() { + *x = ColorPinoyLiveGameOpenThreeDice{} + mi := &file_colorgame_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveGameOpenThreeDice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveGameOpenThreeDice) ProtoMessage() {} + +func (x *ColorPinoyLiveGameOpenThreeDice) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveGameOpenThreeDice.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveGameOpenThreeDice) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{2} +} + +func (x *ColorPinoyLiveGameOpenThreeDice) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *ColorPinoyLiveGameOpenThreeDice) GetColor() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.Color + } + return nil +} + +func (x *ColorPinoyLiveGameOpenThreeDice) GetAniRouteIndex() int32 { + if x != nil { + return x.AniRouteIndex + } + return 0 +} + +type ColorPinoyLiveBetReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetType ColorPinoyLiveBetTypeJP `protobuf:"varint,1,opt,name=BetType,proto3,enum=pb.ColorPinoyLiveBetTypeJP" json:"BetType,omitempty"` //下注区域 + BetLevel int32 `protobuf:"varint,2,opt,name=BetLevel,proto3" json:"BetLevel,omitempty"` //筹码级别 + BetIndex int32 `protobuf:"varint,3,opt,name=BetIndex,proto3" json:"BetIndex,omitempty"` //下注的下标 + BetAmount int64 `protobuf:"varint,4,opt,name=BetAmount,proto3" json:"BetAmount,omitempty"` //下注cash + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBetReq) Reset() { + *x = ColorPinoyLiveBetReq{} + mi := &file_colorgame_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBetReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBetReq) ProtoMessage() {} + +func (x *ColorPinoyLiveBetReq) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBetReq.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBetReq) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{3} +} + +func (x *ColorPinoyLiveBetReq) GetBetType() ColorPinoyLiveBetTypeJP { + if x != nil { + return x.BetType + } + return ColorPinoyLiveBetTypeJP_CLJ_Yellow +} + +func (x *ColorPinoyLiveBetReq) GetBetLevel() int32 { + if x != nil { + return x.BetLevel + } + return 0 +} + +func (x *ColorPinoyLiveBetReq) GetBetIndex() int32 { + if x != nil { + return x.BetIndex + } + return 0 +} + +func (x *ColorPinoyLiveBetReq) GetBetAmount() int64 { + if x != nil { + return x.BetAmount + } + return 0 +} + +// 服务器收到的押注信息 +type ColorPinoyLiveBetReqs struct { + state protoimpl.MessageState `protogen:"open.v1"` + Info []*ColorPinoyLiveBetReq `protobuf:"bytes,1,rep,name=info,proto3" json:"info,omitempty"` // 下注区域数组 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBetReqs) Reset() { + *x = ColorPinoyLiveBetReqs{} + mi := &file_colorgame_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBetReqs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBetReqs) ProtoMessage() {} + +func (x *ColorPinoyLiveBetReqs) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBetReqs.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBetReqs) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{4} +} + +func (x *ColorPinoyLiveBetReqs) GetInfo() []*ColorPinoyLiveBetReq { + if x != nil { + return x.Info + } + return nil +} + +type ColorPinoyLiveBetResp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBetResp) Reset() { + *x = ColorPinoyLiveBetResp{} + mi := &file_colorgame_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBetResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBetResp) ProtoMessage() {} + +func (x *ColorPinoyLiveBetResp) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBetResp.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBetResp) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{5} +} + +func (x *ColorPinoyLiveBetResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ColorPinoyLiveBetResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +// 游戏中几个玩家的数据 +type ColorPinoyLiveSeatUser struct { + state protoimpl.MessageState `protogen:"open.v1"` + Nick string `protobuf:"bytes,1,opt,name=Nick,proto3" json:"Nick,omitempty"` // 用户昵称 + Head string `protobuf:"bytes,2,opt,name=Head,proto3" json:"Head,omitempty"` // 头像 + Score int64 `protobuf:"varint,3,opt,name=Score,proto3" json:"Score,omitempty"` // 分数 + SeatId int32 `protobuf:"varint,4,opt,name=SeatId,proto3" json:"SeatId,omitempty"` //在场景中的座位id + UserID int64 `protobuf:"varint,5,opt,name=UserID,proto3" json:"UserID,omitempty"` //用户ID + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveSeatUser) Reset() { + *x = ColorPinoyLiveSeatUser{} + mi := &file_colorgame_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveSeatUser) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveSeatUser) ProtoMessage() {} + +func (x *ColorPinoyLiveSeatUser) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveSeatUser.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveSeatUser) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{6} +} + +func (x *ColorPinoyLiveSeatUser) GetNick() string { + if x != nil { + return x.Nick + } + return "" +} + +func (x *ColorPinoyLiveSeatUser) GetHead() string { + if x != nil { + return x.Head + } + return "" +} + +func (x *ColorPinoyLiveSeatUser) GetScore() int64 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *ColorPinoyLiveSeatUser) GetSeatId() int32 { + if x != nil { + return x.SeatId + } + return 0 +} + +func (x *ColorPinoyLiveSeatUser) GetUserID() int64 { + if x != nil { + return x.UserID + } + return 0 +} + +// 发送在线人数 +type ColorPinoyLiveS2COnlinePlayerNum struct { + state protoimpl.MessageState `protogen:"open.v1"` + Num int64 `protobuf:"varint,1,opt,name=Num,proto3" json:"Num,omitempty"` // + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveS2COnlinePlayerNum) Reset() { + *x = ColorPinoyLiveS2COnlinePlayerNum{} + mi := &file_colorgame_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveS2COnlinePlayerNum) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveS2COnlinePlayerNum) ProtoMessage() {} + +func (x *ColorPinoyLiveS2COnlinePlayerNum) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveS2COnlinePlayerNum.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveS2COnlinePlayerNum) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{7} +} + +func (x *ColorPinoyLiveS2COnlinePlayerNum) GetNum() int64 { + if x != nil { + return x.Num + } + return 0 +} + +// 结束下注,更新大客投注信息 +type ColorPinoyLivePlayerBigWinner struct { + state protoimpl.MessageState `protogen:"open.v1"` + BigBet []*ColorPinoyLiveBigWinner `protobuf:"bytes,34,rep,name=bigBet,proto3" json:"bigBet,omitempty"` // 大客投注 + Jackpot int64 `protobuf:"varint,1,opt,name=jackpot,proto3" json:"jackpot,omitempty"` // 下注结束,更新jackpot值 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLivePlayerBigWinner) Reset() { + *x = ColorPinoyLivePlayerBigWinner{} + mi := &file_colorgame_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLivePlayerBigWinner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLivePlayerBigWinner) ProtoMessage() {} + +func (x *ColorPinoyLivePlayerBigWinner) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLivePlayerBigWinner.ProtoReflect.Descriptor instead. +func (*ColorPinoyLivePlayerBigWinner) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{8} +} + +func (x *ColorPinoyLivePlayerBigWinner) GetBigBet() []*ColorPinoyLiveBigWinner { + if x != nil { + return x.BigBet + } + return nil +} + +func (x *ColorPinoyLivePlayerBigWinner) GetJackpot() int64 { + if x != nil { + return x.Jackpot + } + return 0 +} + +type ColorPinoyLiveSceneBetInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserBetTotal int64 `protobuf:"varint,1,opt,name=UserBetTotal,proto3" json:"UserBetTotal,omitempty"` //玩家总下注 + TotalBets []int64 `protobuf:"varint,2,rep,packed,name=TotalBets,proto3" json:"TotalBets,omitempty"` //总各区域下注 + UserBets []int64 `protobuf:"varint,3,rep,packed,name=UserBets,proto3" json:"UserBets,omitempty"` //用户各区域下注 + UserInfo *ColorPinoyLiveUserInfo `protobuf:"bytes,4,opt,name=UserInfo,proto3" json:"UserInfo,omitempty"` //用户信息 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveSceneBetInfo) Reset() { + *x = ColorPinoyLiveSceneBetInfo{} + mi := &file_colorgame_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveSceneBetInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveSceneBetInfo) ProtoMessage() {} + +func (x *ColorPinoyLiveSceneBetInfo) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveSceneBetInfo.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveSceneBetInfo) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{9} +} + +func (x *ColorPinoyLiveSceneBetInfo) GetUserBetTotal() int64 { + if x != nil { + return x.UserBetTotal + } + return 0 +} + +func (x *ColorPinoyLiveSceneBetInfo) GetTotalBets() []int64 { + if x != nil { + return x.TotalBets + } + return nil +} + +func (x *ColorPinoyLiveSceneBetInfo) GetUserBets() []int64 { + if x != nil { + return x.UserBets + } + return nil +} + +func (x *ColorPinoyLiveSceneBetInfo) GetUserInfo() *ColorPinoyLiveUserInfo { + if x != nil { + return x.UserInfo + } + return nil +} + +type ColorPinoyLiveBetArr struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetArr []int64 `protobuf:"varint,3,rep,packed,name=betArr,proto3" json:"betArr,omitempty"` //下注数组 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBetArr) Reset() { + *x = ColorPinoyLiveBetArr{} + mi := &file_colorgame_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBetArr) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBetArr) ProtoMessage() {} + +func (x *ColorPinoyLiveBetArr) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBetArr.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBetArr) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{10} +} + +func (x *ColorPinoyLiveBetArr) GetBetArr() []int64 { + if x != nil { + return x.BetArr + } + return nil +} + +// 房间下注规则 +type ColorPinoyLiveRoomBetRuleMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserBetLimit int32 `protobuf:"varint,1,opt,name=userBetLimit,proto3" json:"userBetLimit,omitempty"` + BetMinLimit int64 `protobuf:"varint,2,opt,name=betMinLimit,proto3" json:"betMinLimit,omitempty"` //最低携带金币限制 + BetLevels []*ColorPinoyLiveBetArr `protobuf:"bytes,3,rep,name=betLevels,proto3" json:"betLevels,omitempty"` //下注级别 + Level []int64 `protobuf:"varint,4,rep,packed,name=level,proto3" json:"level,omitempty"` //等级 + MulRangeConfig []*BetAreaMulRangeConfig `protobuf:"bytes,5,rep,name=mulRangeConfig,proto3" json:"mulRangeConfig,omitempty"` // 赔率显示 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) Reset() { + *x = ColorPinoyLiveRoomBetRuleMsg{} + mi := &file_colorgame_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveRoomBetRuleMsg) ProtoMessage() {} + +func (x *ColorPinoyLiveRoomBetRuleMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveRoomBetRuleMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveRoomBetRuleMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{11} +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) GetUserBetLimit() int32 { + if x != nil { + return x.UserBetLimit + } + return 0 +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) GetBetMinLimit() int64 { + if x != nil { + return x.BetMinLimit + } + return 0 +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) GetBetLevels() []*ColorPinoyLiveBetArr { + if x != nil { + return x.BetLevels + } + return nil +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) GetLevel() []int64 { + if x != nil { + return x.Level + } + return nil +} + +func (x *ColorPinoyLiveRoomBetRuleMsg) GetMulRangeConfig() []*BetAreaMulRangeConfig { + if x != nil { + return x.MulRangeConfig + } + return nil +} + +type ColorPinoyLiveTrendGroup struct { + state protoimpl.MessageState `protogen:"open.v1"` + LuckyDice ColorPinoyLiveDiceColorType `protobuf:"varint,1,opt,name=luckyDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"luckyDice,omitempty"` // 幸运骰子 + ThreeDice []ColorPinoyLiveDiceColorType `protobuf:"varint,2,rep,packed,name=threeDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"threeDice,omitempty"` // 3个普通骰子 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveTrendGroup) Reset() { + *x = ColorPinoyLiveTrendGroup{} + mi := &file_colorgame_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveTrendGroup) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveTrendGroup) ProtoMessage() {} + +func (x *ColorPinoyLiveTrendGroup) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveTrendGroup.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveTrendGroup) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{12} +} + +func (x *ColorPinoyLiveTrendGroup) GetLuckyDice() ColorPinoyLiveDiceColorType { + if x != nil { + return x.LuckyDice + } + return ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +func (x *ColorPinoyLiveTrendGroup) GetThreeDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.ThreeDice + } + return nil +} + +type ColorPinoyLiveTrend struct { + state protoimpl.MessageState `protogen:"open.v1"` + ListTrendGroup []*ColorPinoyLiveTrendGroup `protobuf:"bytes,1,rep,name=listTrendGroup,proto3" json:"listTrendGroup,omitempty"` + LuckStarRate []int32 `protobuf:"varint,2,rep,packed,name=luckStarRate,proto3" json:"luckStarRate,omitempty"` // 数组索引号为颜色从0-5(ColorPinoyLiveDiceColorType-1) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveTrend) Reset() { + *x = ColorPinoyLiveTrend{} + mi := &file_colorgame_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveTrend) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveTrend) ProtoMessage() {} + +func (x *ColorPinoyLiveTrend) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveTrend.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveTrend) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{13} +} + +func (x *ColorPinoyLiveTrend) GetListTrendGroup() []*ColorPinoyLiveTrendGroup { + if x != nil { + return x.ListTrendGroup + } + return nil +} + +func (x *ColorPinoyLiveTrend) GetLuckStarRate() []int32 { + if x != nil { + return x.LuckStarRate + } + return nil +} + +// 腾讯云实时音视频房间参数 +type TRTCRoomArgs struct { + state protoimpl.MessageState `protogen:"open.v1"` + AppId int32 `protobuf:"varint,1,opt,name=appId,proto3" json:"appId,omitempty"` + StrRoomId string `protobuf:"bytes,2,opt,name=strRoomId,proto3" json:"strRoomId,omitempty"` + UserId string `protobuf:"bytes,3,opt,name=userId,proto3" json:"userId,omitempty"` + UserSig string `protobuf:"bytes,4,opt,name=userSig,proto3" json:"userSig,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TRTCRoomArgs) Reset() { + *x = TRTCRoomArgs{} + mi := &file_colorgame_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TRTCRoomArgs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TRTCRoomArgs) ProtoMessage() {} + +func (x *TRTCRoomArgs) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TRTCRoomArgs.ProtoReflect.Descriptor instead. +func (*TRTCRoomArgs) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{14} +} + +func (x *TRTCRoomArgs) GetAppId() int32 { + if x != nil { + return x.AppId + } + return 0 +} + +func (x *TRTCRoomArgs) GetStrRoomId() string { + if x != nil { + return x.StrRoomId + } + return "" +} + +func (x *TRTCRoomArgs) GetUserId() string { + if x != nil { + return x.UserId + } + return "" +} + +func (x *TRTCRoomArgs) GetUserSig() string { + if x != nil { + return x.UserSig + } + return "" +} + +// 赢钱最多的6个玩家 +type ColorPinoyLiveBigWinner struct { + state protoimpl.MessageState `protogen:"open.v1"` + NickName string `protobuf:"bytes,5,opt,name=nickName,proto3" json:"nickName,omitempty"` //名字 + Avatar string `protobuf:"bytes,2,opt,name=avatar,proto3" json:"avatar,omitempty"` + WinChips int64 `protobuf:"varint,1,opt,name=winChips,proto3" json:"winChips,omitempty"` // 赢取金币 + AreaId []int64 `protobuf:"varint,3,rep,packed,name=areaId,proto3" json:"areaId,omitempty"` // 赢钱区域(前6个) + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBigWinner) Reset() { + *x = ColorPinoyLiveBigWinner{} + mi := &file_colorgame_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBigWinner) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBigWinner) ProtoMessage() {} + +func (x *ColorPinoyLiveBigWinner) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBigWinner.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBigWinner) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{15} +} + +func (x *ColorPinoyLiveBigWinner) GetNickName() string { + if x != nil { + return x.NickName + } + return "" +} + +func (x *ColorPinoyLiveBigWinner) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *ColorPinoyLiveBigWinner) GetWinChips() int64 { + if x != nil { + return x.WinChips + } + return 0 +} + +func (x *ColorPinoyLiveBigWinner) GetAreaId() []int64 { + if x != nil { + return x.AreaId + } + return nil +} + +// 投注区域赔率范围配置信息 +type BetAreaMulRangeConfig struct { + state protoimpl.MessageState `protogen:"open.v1"` + Pos ColorPinoyLiveBigBetAreaPos `protobuf:"varint,1,opt,name=pos,proto3,enum=pb.ColorPinoyLiveBigBetAreaPos" json:"pos,omitempty"` // 下注区域为单色区0-2时,该值表明是单色还是双色,三色不同的赔率 + MinMul int64 `protobuf:"varint,2,opt,name=minMul,proto3" json:"minMul,omitempty"` + MaxMul int64 `protobuf:"varint,3,opt,name=maxMul,proto3" json:"maxMul,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BetAreaMulRangeConfig) Reset() { + *x = BetAreaMulRangeConfig{} + mi := &file_colorgame_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BetAreaMulRangeConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BetAreaMulRangeConfig) ProtoMessage() {} + +func (x *BetAreaMulRangeConfig) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BetAreaMulRangeConfig.ProtoReflect.Descriptor instead. +func (*BetAreaMulRangeConfig) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{16} +} + +func (x *BetAreaMulRangeConfig) GetPos() ColorPinoyLiveBigBetAreaPos { + if x != nil { + return x.Pos + } + return ColorPinoyLiveBigBetAreaPos_BBA_Single_0 +} + +func (x *BetAreaMulRangeConfig) GetMinMul() int64 { + if x != nil { + return x.MinMul + } + return 0 +} + +func (x *BetAreaMulRangeConfig) GetMaxMul() int64 { + if x != nil { + return x.MaxMul + } + return 0 +} + +// 发送场景数据 +type SceneMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + RoomID int32 `protobuf:"varint,1,opt,name=roomID,proto3" json:"roomID,omitempty"` + GameStatus *ColorPinoyLiveStatusMessage `protobuf:"bytes,2,opt,name=gameStatus,proto3" json:"gameStatus,omitempty"` // 游戏状态 + StatusTime int32 `protobuf:"varint,3,opt,name=statusTime,proto3" json:"statusTime,omitempty"` // 游戏状态剩余时间(下注倒计时会有 其余时间为 零) + OnlineNum int32 `protobuf:"varint,4,opt,name=onlineNum,proto3" json:"onlineNum,omitempty"` // 在线人数 + TrendList *ColorPinoyLiveTrend `protobuf:"bytes,5,opt,name=trendList,proto3" json:"trendList,omitempty"` // 走势图 + LuckyDice ColorPinoyLiveDiceColorType `protobuf:"varint,6,opt,name=luckyDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"luckyDice,omitempty"` // 幸运骰子 + ThreeDice []ColorPinoyLiveDiceColorType `protobuf:"varint,7,rep,packed,name=threeDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"threeDice,omitempty"` // 3个普通骰子 + BetAreaInfo []*ColorPinoyLiveGameBetAreaInfo `protobuf:"bytes,8,rep,name=betAreaInfo,proto3" json:"betAreaInfo,omitempty"` // 下注信息 + BetRule *ColorPinoyLiveRoomBetRuleMsg `protobuf:"bytes,9,opt,name=betRule,proto3" json:"betRule,omitempty"` // 下注规则 + // repeated SeatUser userData = 10; // 在坐玩家 + AniLuckyDiceRouteIndex int32 `protobuf:"varint,10,opt,name=aniLuckyDiceRouteIndex,proto3" json:"aniLuckyDiceRouteIndex,omitempty"` // 幸运骰子 掉落路径 + AniThreeDiceRouteIndex int32 `protobuf:"varint,11,opt,name=aniThreeDiceRouteIndex,proto3" json:"aniThreeDiceRouteIndex,omitempty"` // 3个骰子 掉落路径 + OnlineNums int32 `protobuf:"varint,12,opt,name=onlineNums,proto3" json:"onlineNums,omitempty"` // 在线人数 + LastTimeBet []*ColorPinoyLiveBetReqs `protobuf:"bytes,13,rep,name=lastTimeBet,proto3" json:"lastTimeBet,omitempty"` // 上局下注 + RankList []*ColorPinoyLivePlayerData `protobuf:"bytes,14,rep,name=rankList,proto3" json:"rankList,omitempty"` // 玩家数据 + Bonus int32 `protobuf:"varint,15,opt,name=bonus,proto3" json:"bonus,omitempty"` // 幸运骰子加成 + ArtcUrl string `protobuf:"bytes,16,opt,name=artcUrl,proto3" json:"artcUrl,omitempty"` // 阿里云拉流地址 + TrtcRoomArgs *TRTCRoomArgs `protobuf:"bytes,17,opt,name=trtcRoomArgs,proto3" json:"trtcRoomArgs,omitempty"` // 腾讯云房间参数 + Balance int64 `protobuf:"varint,18,opt,name=balance,proto3" json:"balance,omitempty"` // 用户余额 + BigWinner []*ColorPinoyLiveBigWinner `protobuf:"bytes,19,rep,name=bigWinner,proto3" json:"bigWinner,omitempty"` // 大客数据 + DealerName []string `protobuf:"bytes,20,rep,name=dealerName,proto3" json:"dealerName,omitempty"` // 主播名字 + Jackpot int64 `protobuf:"varint,21,opt,name=jackpot,proto3" json:"jackpot,omitempty"` // jackpot值 + MulRangeConfig []*BetAreaMulRangeConfig `protobuf:"bytes,22,rep,name=mulRangeConfig,proto3" json:"mulRangeConfig,omitempty"` // 赔率显示 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SceneMessage) Reset() { + *x = SceneMessage{} + mi := &file_colorgame_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SceneMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SceneMessage) ProtoMessage() {} + +func (x *SceneMessage) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SceneMessage.ProtoReflect.Descriptor instead. +func (*SceneMessage) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{17} +} + +func (x *SceneMessage) GetRoomID() int32 { + if x != nil { + return x.RoomID + } + return 0 +} + +func (x *SceneMessage) GetGameStatus() *ColorPinoyLiveStatusMessage { + if x != nil { + return x.GameStatus + } + return nil +} + +func (x *SceneMessage) GetStatusTime() int32 { + if x != nil { + return x.StatusTime + } + return 0 +} + +func (x *SceneMessage) GetOnlineNum() int32 { + if x != nil { + return x.OnlineNum + } + return 0 +} + +func (x *SceneMessage) GetTrendList() *ColorPinoyLiveTrend { + if x != nil { + return x.TrendList + } + return nil +} + +func (x *SceneMessage) GetLuckyDice() ColorPinoyLiveDiceColorType { + if x != nil { + return x.LuckyDice + } + return ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +func (x *SceneMessage) GetThreeDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.ThreeDice + } + return nil +} + +func (x *SceneMessage) GetBetAreaInfo() []*ColorPinoyLiveGameBetAreaInfo { + if x != nil { + return x.BetAreaInfo + } + return nil +} + +func (x *SceneMessage) GetBetRule() *ColorPinoyLiveRoomBetRuleMsg { + if x != nil { + return x.BetRule + } + return nil +} + +func (x *SceneMessage) GetAniLuckyDiceRouteIndex() int32 { + if x != nil { + return x.AniLuckyDiceRouteIndex + } + return 0 +} + +func (x *SceneMessage) GetAniThreeDiceRouteIndex() int32 { + if x != nil { + return x.AniThreeDiceRouteIndex + } + return 0 +} + +func (x *SceneMessage) GetOnlineNums() int32 { + if x != nil { + return x.OnlineNums + } + return 0 +} + +func (x *SceneMessage) GetLastTimeBet() []*ColorPinoyLiveBetReqs { + if x != nil { + return x.LastTimeBet + } + return nil +} + +func (x *SceneMessage) GetRankList() []*ColorPinoyLivePlayerData { + if x != nil { + return x.RankList + } + return nil +} + +func (x *SceneMessage) GetBonus() int32 { + if x != nil { + return x.Bonus + } + return 0 +} + +func (x *SceneMessage) GetArtcUrl() string { + if x != nil { + return x.ArtcUrl + } + return "" +} + +func (x *SceneMessage) GetTrtcRoomArgs() *TRTCRoomArgs { + if x != nil { + return x.TrtcRoomArgs + } + return nil +} + +func (x *SceneMessage) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *SceneMessage) GetBigWinner() []*ColorPinoyLiveBigWinner { + if x != nil { + return x.BigWinner + } + return nil +} + +func (x *SceneMessage) GetDealerName() []string { + if x != nil { + return x.DealerName + } + return nil +} + +func (x *SceneMessage) GetJackpot() int64 { + if x != nil { + return x.Jackpot + } + return 0 +} + +func (x *SceneMessage) GetMulRangeConfig() []*BetAreaMulRangeConfig { + if x != nil { + return x.MulRangeConfig + } + return nil +} + +type ColorPinoyLiveUserSitDown struct { + state protoimpl.MessageState `protogen:"open.v1"` + ChairNo int32 `protobuf:"varint,1,opt,name=ChairNo,proto3" json:"ChairNo,omitempty"` //座位号 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveUserSitDown) Reset() { + *x = ColorPinoyLiveUserSitDown{} + mi := &file_colorgame_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveUserSitDown) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveUserSitDown) ProtoMessage() {} + +func (x *ColorPinoyLiveUserSitDown) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveUserSitDown.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveUserSitDown) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{18} +} + +func (x *ColorPinoyLiveUserSitDown) GetChairNo() int32 { + if x != nil { + return x.ChairNo + } + return 0 +} + +type ColorPinoyLiveUserSitDownFail struct { + state protoimpl.MessageState `protogen:"open.v1"` + FailReaSon string `protobuf:"bytes,1,opt,name=FailReaSon,proto3" json:"FailReaSon,omitempty"` //坐下失败 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveUserSitDownFail) Reset() { + *x = ColorPinoyLiveUserSitDownFail{} + mi := &file_colorgame_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveUserSitDownFail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveUserSitDownFail) ProtoMessage() {} + +func (x *ColorPinoyLiveUserSitDownFail) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveUserSitDownFail.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveUserSitDownFail) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{19} +} + +func (x *ColorPinoyLiveUserSitDownFail) GetFailReaSon() string { + if x != nil { + return x.FailReaSon + } + return "" +} + +type ColorPinoyLiveBetAreaOdd struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetArea ColorPinoyLiveBetTypeJP `protobuf:"varint,1,opt,name=betArea,proto3,enum=pb.ColorPinoyLiveBetTypeJP" json:"betArea,omitempty"` // 投注区域 + Odd int64 `protobuf:"varint,4,opt,name=odd,proto3" json:"odd,omitempty"` // 实际中奖赔率 + ViewOdd int64 `protobuf:"varint,9,opt,name=viewOdd,proto3" json:"viewOdd,omitempty"` // 投注面板显示的赔率,比如单黄区域爆奖显示x10赔率,开出黄白红,则实际中奖赔率是基础赔率而不是爆奖赔率 + IsBigOdd bool `protobuf:"varint,5,opt,name=isBigOdd,proto3" json:"isBigOdd,omitempty"` // true:爆奖 + BigSingleColorOddPos ColorPinoyLiveBigBetAreaPos `protobuf:"varint,6,opt,name=bigSingleColorOddPos,proto3,enum=pb.ColorPinoyLiveBigBetAreaPos" json:"bigSingleColorOddPos,omitempty"` // 下注区域为单色区0-2时,该值表明是单色还是双色,三色不同的赔率 + IsWin bool `protobuf:"varint,7,opt,name=isWin,proto3" json:"isWin,omitempty"` // 该区域是否中奖 + IsJackpot bool `protobuf:"varint,8,opt,name=isJackpot,proto3" json:"isJackpot,omitempty"` // true:jackpot位置 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBetAreaOdd) Reset() { + *x = ColorPinoyLiveBetAreaOdd{} + mi := &file_colorgame_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBetAreaOdd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBetAreaOdd) ProtoMessage() {} + +func (x *ColorPinoyLiveBetAreaOdd) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBetAreaOdd.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBetAreaOdd) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{20} +} + +func (x *ColorPinoyLiveBetAreaOdd) GetBetArea() ColorPinoyLiveBetTypeJP { + if x != nil { + return x.BetArea + } + return ColorPinoyLiveBetTypeJP_CLJ_Yellow +} + +func (x *ColorPinoyLiveBetAreaOdd) GetOdd() int64 { + if x != nil { + return x.Odd + } + return 0 +} + +func (x *ColorPinoyLiveBetAreaOdd) GetViewOdd() int64 { + if x != nil { + return x.ViewOdd + } + return 0 +} + +func (x *ColorPinoyLiveBetAreaOdd) GetIsBigOdd() bool { + if x != nil { + return x.IsBigOdd + } + return false +} + +func (x *ColorPinoyLiveBetAreaOdd) GetBigSingleColorOddPos() ColorPinoyLiveBigBetAreaPos { + if x != nil { + return x.BigSingleColorOddPos + } + return ColorPinoyLiveBigBetAreaPos_BBA_Single_0 +} + +func (x *ColorPinoyLiveBetAreaOdd) GetIsWin() bool { + if x != nil { + return x.IsWin + } + return false +} + +func (x *ColorPinoyLiveBetAreaOdd) GetIsJackpot() bool { + if x != nil { + return x.IsJackpot + } + return false +} + +// 扑克消息 +type ColorPinoyLivePokerMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + WinBetArea []*ColorPinoyLiveBetAreaOdd `protobuf:"bytes,5,rep,name=winBetArea,proto3" json:"winBetArea,omitempty"` // 中奖区域 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLivePokerMsg) Reset() { + *x = ColorPinoyLivePokerMsg{} + mi := &file_colorgame_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLivePokerMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLivePokerMsg) ProtoMessage() {} + +func (x *ColorPinoyLivePokerMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLivePokerMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLivePokerMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{21} +} + +func (x *ColorPinoyLivePokerMsg) GetWinBetArea() []*ColorPinoyLiveBetAreaOdd { + if x != nil { + return x.WinBetArea + } + return nil +} + +type ColorPinoyLiveUserInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + NikeName string `protobuf:"bytes,1,opt,name=NikeName,proto3" json:"NikeName,omitempty"` //昵称 + UserGlod int64 `protobuf:"varint,2,opt,name=UserGlod,proto3" json:"UserGlod,omitempty"` //玩家金币 + BetGold int64 `protobuf:"varint,3,opt,name=BetGold,proto3" json:"BetGold,omitempty"` //近20局赢取的金币 + WinCount int32 `protobuf:"varint,4,opt,name=WinCount,proto3" json:"WinCount,omitempty"` //赢的次数 + Head string `protobuf:"bytes,5,opt,name=Head,proto3" json:"Head,omitempty"` // 头像 + UserID int64 `protobuf:"varint,6,opt,name=UserID,proto3" json:"UserID,omitempty"` //用户id + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveUserInfo) Reset() { + *x = ColorPinoyLiveUserInfo{} + mi := &file_colorgame_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveUserInfo) ProtoMessage() {} + +func (x *ColorPinoyLiveUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveUserInfo.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveUserInfo) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{22} +} + +func (x *ColorPinoyLiveUserInfo) GetNikeName() string { + if x != nil { + return x.NikeName + } + return "" +} + +func (x *ColorPinoyLiveUserInfo) GetUserGlod() int64 { + if x != nil { + return x.UserGlod + } + return 0 +} + +func (x *ColorPinoyLiveUserInfo) GetBetGold() int64 { + if x != nil { + return x.BetGold + } + return 0 +} + +func (x *ColorPinoyLiveUserInfo) GetWinCount() int32 { + if x != nil { + return x.WinCount + } + return 0 +} + +func (x *ColorPinoyLiveUserInfo) GetHead() string { + if x != nil { + return x.Head + } + return "" +} + +func (x *ColorPinoyLiveUserInfo) GetUserID() int64 { + if x != nil { + return x.UserID + } + return 0 +} + +// 用户列表 +type ColorPinoyLiveUserList struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserList []*ColorPinoyLiveUserInfo `protobuf:"bytes,1,rep,name=UserList,proto3" json:"UserList,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveUserList) Reset() { + *x = ColorPinoyLiveUserList{} + mi := &file_colorgame_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveUserList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveUserList) ProtoMessage() {} + +func (x *ColorPinoyLiveUserList) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveUserList.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveUserList) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{23} +} + +func (x *ColorPinoyLiveUserList) GetUserList() []*ColorPinoyLiveUserInfo { + if x != nil { + return x.UserList + } + return nil +} + +// 个人 结算消息 +type ColorPinoyLiveUserSettleMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + TotalWinBaseBet int64 `protobuf:"varint,1,opt,name=TotalWinBaseBet,proto3" json:"TotalWinBaseBet,omitempty"` //赢区的投注总和 + UserScore int64 `protobuf:"varint,2,opt,name=UserScore,proto3" json:"UserScore,omitempty"` //用户当前的分数 + TotalWin int64 `protobuf:"varint,3,opt,name=TotalWin,proto3" json:"TotalWin,omitempty"` //扣税以后总赢钱 + UserBets []int64 `protobuf:"varint,4,rep,packed,name=UserBets,proto3" json:"UserBets,omitempty"` //用户各区域下注 + TotalBets []int64 `protobuf:"varint,5,rep,packed,name=TotalBets,proto3" json:"TotalBets,omitempty"` //总各区域下注 + UserWins []int64 `protobuf:"varint,6,rep,packed,name=UserWins,proto3" json:"UserWins,omitempty"` //用户各区域赢钱 + UserRealWins []int64 `protobuf:"varint,7,rep,packed,name=UserRealWins,proto3" json:"UserRealWins,omitempty"` //用户各区域赢钱扣税后 + Tax int64 `protobuf:"varint,9,opt,name=Tax,proto3" json:"Tax,omitempty"` //税 + OddsWins []int64 `protobuf:"varint,10,rep,packed,name=oddsWins,proto3" json:"oddsWins,omitempty"` // // 老版 用户各区域的赢区的结算倍率 todo + UserBetsCount []int64 `protobuf:"varint,11,rep,packed,name=userBetsCount,proto3" json:"userBetsCount,omitempty"` // 用户各区域下注次数 + WinAreaOdd []*ColorPinoyLiveBetAreaOdd `protobuf:"bytes,12,rep,name=winAreaOdd,proto3" json:"winAreaOdd,omitempty"` // 中奖区域及中奖赔率 + JackpotWin int64 `protobuf:"varint,13,opt,name=jackpotWin,proto3" json:"jackpotWin,omitempty"` // jackpot奖励 + JackpotUserName []string `protobuf:"bytes,14,rep,name=jackpotUserName,proto3" json:"jackpotUserName,omitempty"` // 中jackpot 玩家名单 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveUserSettleMsg) Reset() { + *x = ColorPinoyLiveUserSettleMsg{} + mi := &file_colorgame_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveUserSettleMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveUserSettleMsg) ProtoMessage() {} + +func (x *ColorPinoyLiveUserSettleMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveUserSettleMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveUserSettleMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{24} +} + +func (x *ColorPinoyLiveUserSettleMsg) GetTotalWinBaseBet() int64 { + if x != nil { + return x.TotalWinBaseBet + } + return 0 +} + +func (x *ColorPinoyLiveUserSettleMsg) GetUserScore() int64 { + if x != nil { + return x.UserScore + } + return 0 +} + +func (x *ColorPinoyLiveUserSettleMsg) GetTotalWin() int64 { + if x != nil { + return x.TotalWin + } + return 0 +} + +func (x *ColorPinoyLiveUserSettleMsg) GetUserBets() []int64 { + if x != nil { + return x.UserBets + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetTotalBets() []int64 { + if x != nil { + return x.TotalBets + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetUserWins() []int64 { + if x != nil { + return x.UserWins + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetUserRealWins() []int64 { + if x != nil { + return x.UserRealWins + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetTax() int64 { + if x != nil { + return x.Tax + } + return 0 +} + +func (x *ColorPinoyLiveUserSettleMsg) GetOddsWins() []int64 { + if x != nil { + return x.OddsWins + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetUserBetsCount() []int64 { + if x != nil { + return x.UserBetsCount + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetWinAreaOdd() []*ColorPinoyLiveBetAreaOdd { + if x != nil { + return x.WinAreaOdd + } + return nil +} + +func (x *ColorPinoyLiveUserSettleMsg) GetJackpotWin() int64 { + if x != nil { + return x.JackpotWin + } + return 0 +} + +func (x *ColorPinoyLiveUserSettleMsg) GetJackpotUserName() []string { + if x != nil { + return x.JackpotUserName + } + return nil +} + +type ColorPinoyLiveGameBetAreaUserInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserID int64 `protobuf:"varint,1,opt,name=userID,proto3" json:"userID,omitempty"` + BetChips int64 `protobuf:"varint,2,opt,name=betChips,proto3" json:"betChips,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveGameBetAreaUserInfo) Reset() { + *x = ColorPinoyLiveGameBetAreaUserInfo{} + mi := &file_colorgame_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveGameBetAreaUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveGameBetAreaUserInfo) ProtoMessage() {} + +func (x *ColorPinoyLiveGameBetAreaUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveGameBetAreaUserInfo.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveGameBetAreaUserInfo) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{25} +} + +func (x *ColorPinoyLiveGameBetAreaUserInfo) GetUserID() int64 { + if x != nil { + return x.UserID + } + return 0 +} + +func (x *ColorPinoyLiveGameBetAreaUserInfo) GetBetChips() int64 { + if x != nil { + return x.BetChips + } + return 0 +} + +type ColorPinoyLiveGameBetAreaInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetType ColorPinoyLiveBetTypeJP `protobuf:"varint,1,opt,name=betType,proto3,enum=pb.ColorPinoyLiveBetTypeJP" json:"betType,omitempty"` // 下注区域 + BetChipsInfo []*ColorPinoyLiveGameBetAreaUserInfo `protobuf:"bytes,2,rep,name=betChipsInfo,proto3" json:"betChipsInfo,omitempty"` //该下注区的玩家下注情况 + IsWin int32 `protobuf:"varint,3,opt,name=isWin,proto3" json:"isWin,omitempty"` //这个区域是否中奖 + Odd []int64 `protobuf:"varint,4,rep,packed,name=odd,proto3" json:"odd,omitempty"` // 赔率 单色投注区域有三个赔率 其它投注区域只有一个赔率 + IsBigOdd bool `protobuf:"varint,5,opt,name=isBigOdd,proto3" json:"isBigOdd,omitempty"` // true:爆奖 + BigSingleColorOddPos ColorPinoyLiveBigBetAreaPos `protobuf:"varint,6,opt,name=bigSingleColorOddPos,proto3,enum=pb.ColorPinoyLiveBigBetAreaPos" json:"bigSingleColorOddPos,omitempty"` // 下注区域为单色区0-2时,该值表明是单色还是双色,三色不同的赔率 + IsJackpot bool `protobuf:"varint,7,opt,name=isJackpot,proto3" json:"isJackpot,omitempty"` // 该区域是否jackpot + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveGameBetAreaInfo) Reset() { + *x = ColorPinoyLiveGameBetAreaInfo{} + mi := &file_colorgame_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveGameBetAreaInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveGameBetAreaInfo) ProtoMessage() {} + +func (x *ColorPinoyLiveGameBetAreaInfo) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveGameBetAreaInfo.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveGameBetAreaInfo) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{26} +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetBetType() ColorPinoyLiveBetTypeJP { + if x != nil { + return x.BetType + } + return ColorPinoyLiveBetTypeJP_CLJ_Yellow +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetBetChipsInfo() []*ColorPinoyLiveGameBetAreaUserInfo { + if x != nil { + return x.BetChipsInfo + } + return nil +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetIsWin() int32 { + if x != nil { + return x.IsWin + } + return 0 +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetOdd() []int64 { + if x != nil { + return x.Odd + } + return nil +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetIsBigOdd() bool { + if x != nil { + return x.IsBigOdd + } + return false +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetBigSingleColorOddPos() ColorPinoyLiveBigBetAreaPos { + if x != nil { + return x.BigSingleColorOddPos + } + return ColorPinoyLiveBigBetAreaPos_BBA_Single_0 +} + +func (x *ColorPinoyLiveGameBetAreaInfo) GetIsJackpot() bool { + if x != nil { + return x.IsJackpot + } + return false +} + +type ColorPinoyLiveSceneUserInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserID int64 `protobuf:"varint,1,opt,name=UserID,proto3" json:"UserID,omitempty"` + SceneSeatID int32 `protobuf:"varint,2,opt,name=SceneSeatID,proto3" json:"SceneSeatID,omitempty"` + UserScore int64 `protobuf:"varint,3,opt,name=UserScore,proto3" json:"UserScore,omitempty"` //当前分数 + TotalWin int64 `protobuf:"varint,4,opt,name=TotalWin,proto3" json:"TotalWin,omitempty"` //扣税以后总赢钱 + JackpotWin int64 `protobuf:"varint,5,opt,name=jackpotWin,proto3" json:"jackpotWin,omitempty"` // jackpot赢钱 + NormalWin int64 `protobuf:"varint,6,opt,name=normalWin,proto3" json:"normalWin,omitempty"` // 非jackpot赢钱 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveSceneUserInfo) Reset() { + *x = ColorPinoyLiveSceneUserInfo{} + mi := &file_colorgame_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveSceneUserInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveSceneUserInfo) ProtoMessage() {} + +func (x *ColorPinoyLiveSceneUserInfo) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveSceneUserInfo.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveSceneUserInfo) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{27} +} + +func (x *ColorPinoyLiveSceneUserInfo) GetUserID() int64 { + if x != nil { + return x.UserID + } + return 0 +} + +func (x *ColorPinoyLiveSceneUserInfo) GetSceneSeatID() int32 { + if x != nil { + return x.SceneSeatID + } + return 0 +} + +func (x *ColorPinoyLiveSceneUserInfo) GetUserScore() int64 { + if x != nil { + return x.UserScore + } + return 0 +} + +func (x *ColorPinoyLiveSceneUserInfo) GetTotalWin() int64 { + if x != nil { + return x.TotalWin + } + return 0 +} + +func (x *ColorPinoyLiveSceneUserInfo) GetJackpotWin() int64 { + if x != nil { + return x.JackpotWin + } + return 0 +} + +func (x *ColorPinoyLiveSceneUserInfo) GetNormalWin() int64 { + if x != nil { + return x.NormalWin + } + return 0 +} + +// 场景上的玩家结算信息 +type ColorPinoyLiveSceneSettleMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetAreaInfo []*ColorPinoyLiveGameBetAreaInfo `protobuf:"bytes,1,rep,name=betAreaInfo,proto3" json:"betAreaInfo,omitempty"` // 下注区域信息 + // repeated SceneUserInfo UserList = 2; // 有座玩家下注信息 + NoChairTotalWin int64 `protobuf:"varint,2,opt,name=noChairTotalWin,proto3" json:"noChairTotalWin,omitempty"` + SysDealerAreaInfo int64 `protobuf:"varint,3,opt,name=sysDealerAreaInfo,proto3" json:"sysDealerAreaInfo,omitempty"` // 系统庄是否有赢 + SelfWinInfo *ColorPinoyLiveSceneUserInfo `protobuf:"bytes,4,opt,name=selfWinInfo,proto3" json:"selfWinInfo,omitempty"` // 自己的输赢 + LuckyDice ColorPinoyLiveDiceColorType `protobuf:"varint,5,opt,name=luckyDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"luckyDice,omitempty"` // 幸运骰子 + ThreeDice []ColorPinoyLiveDiceColorType `protobuf:"varint,6,rep,packed,name=threeDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"threeDice,omitempty"` // 3个普通骰子 + TrendGroup *ColorPinoyLiveTrendGroup `protobuf:"bytes,7,opt,name=trendGroup,proto3" json:"trendGroup,omitempty"` + LastTimeBet []*ColorPinoyLiveBetReqs `protobuf:"bytes,8,rep,name=lastTimeBet,proto3" json:"lastTimeBet,omitempty"` // 上局下注 + TrendGroupEx *ColorPinoyLiveTrend `protobuf:"bytes,9,opt,name=trendGroupEx,proto3" json:"trendGroupEx,omitempty"` + BigWinner []*ColorPinoyLiveBigWinner `protobuf:"bytes,10,rep,name=bigWinner,proto3" json:"bigWinner,omitempty"` // 大客数据 + Jackpot int64 `protobuf:"varint,11,opt,name=jackpot,proto3" json:"jackpot,omitempty"` // jackpot池 + JackpotUserName []string `protobuf:"bytes,12,rep,name=jackpotUserName,proto3" json:"jackpotUserName,omitempty"` // 中jackpot 玩家名单 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveSceneSettleMsg) Reset() { + *x = ColorPinoyLiveSceneSettleMsg{} + mi := &file_colorgame_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveSceneSettleMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveSceneSettleMsg) ProtoMessage() {} + +func (x *ColorPinoyLiveSceneSettleMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveSceneSettleMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveSceneSettleMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{28} +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetBetAreaInfo() []*ColorPinoyLiveGameBetAreaInfo { + if x != nil { + return x.BetAreaInfo + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetNoChairTotalWin() int64 { + if x != nil { + return x.NoChairTotalWin + } + return 0 +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetSysDealerAreaInfo() int64 { + if x != nil { + return x.SysDealerAreaInfo + } + return 0 +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetSelfWinInfo() *ColorPinoyLiveSceneUserInfo { + if x != nil { + return x.SelfWinInfo + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetLuckyDice() ColorPinoyLiveDiceColorType { + if x != nil { + return x.LuckyDice + } + return ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetThreeDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.ThreeDice + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetTrendGroup() *ColorPinoyLiveTrendGroup { + if x != nil { + return x.TrendGroup + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetLastTimeBet() []*ColorPinoyLiveBetReqs { + if x != nil { + return x.LastTimeBet + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetTrendGroupEx() *ColorPinoyLiveTrend { + if x != nil { + return x.TrendGroupEx + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetBigWinner() []*ColorPinoyLiveBigWinner { + if x != nil { + return x.BigWinner + } + return nil +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetJackpot() int64 { + if x != nil { + return x.Jackpot + } + return 0 +} + +func (x *ColorPinoyLiveSceneSettleMsg) GetJackpotUserName() []string { + if x != nil { + return x.JackpotUserName + } + return nil +} + +type ColorPinoyLiveKickOutUserMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + KickOutReason string `protobuf:"bytes,1,opt,name=KickOutReason,proto3" json:"KickOutReason,omitempty"` //踢出玩家发送原因 + Reason int32 `protobuf:"varint,2,opt,name=reason,proto3" json:"reason,omitempty"` //1没操作 2服务器维护 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveKickOutUserMsg) Reset() { + *x = ColorPinoyLiveKickOutUserMsg{} + mi := &file_colorgame_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveKickOutUserMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveKickOutUserMsg) ProtoMessage() {} + +func (x *ColorPinoyLiveKickOutUserMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveKickOutUserMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveKickOutUserMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{29} +} + +func (x *ColorPinoyLiveKickOutUserMsg) GetKickOutReason() string { + if x != nil { + return x.KickOutReason + } + return "" +} + +func (x *ColorPinoyLiveKickOutUserMsg) GetReason() int32 { + if x != nil { + return x.Reason + } + return 0 +} + +// 次消息一秒一次 +type ColorPinoyLiveUpdateRoomInfoMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + OnlineNum int64 `protobuf:"varint,1,opt,name=OnlineNum,proto3" json:"OnlineNum,omitempty"` //在线人数 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveUpdateRoomInfoMsg) Reset() { + *x = ColorPinoyLiveUpdateRoomInfoMsg{} + mi := &file_colorgame_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveUpdateRoomInfoMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveUpdateRoomInfoMsg) ProtoMessage() {} + +func (x *ColorPinoyLiveUpdateRoomInfoMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveUpdateRoomInfoMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveUpdateRoomInfoMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{30} +} + +func (x *ColorPinoyLiveUpdateRoomInfoMsg) GetOnlineNum() int64 { + if x != nil { + return x.OnlineNum + } + return 0 +} + +// 测试 +type ColorPinoyLivetempCardMsg struct { + state protoimpl.MessageState `protogen:"open.v1"` + LongPoker []byte `protobuf:"bytes,1,opt,name=LongPoker,proto3" json:"LongPoker,omitempty"` + HuPoker []byte `protobuf:"bytes,2,opt,name=HuPoker,proto3" json:"HuPoker,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLivetempCardMsg) Reset() { + *x = ColorPinoyLivetempCardMsg{} + mi := &file_colorgame_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLivetempCardMsg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLivetempCardMsg) ProtoMessage() {} + +func (x *ColorPinoyLivetempCardMsg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLivetempCardMsg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLivetempCardMsg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{31} +} + +func (x *ColorPinoyLivetempCardMsg) GetLongPoker() []byte { + if x != nil { + return x.LongPoker + } + return nil +} + +func (x *ColorPinoyLivetempCardMsg) GetHuPoker() []byte { + if x != nil { + return x.HuPoker + } + return nil +} + +// 押注成功时发送的消息 +type ColorPinoyLiveBetSuccessMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + SeatId int32 `protobuf:"varint,1,opt,name=SeatId,proto3" json:"SeatId,omitempty"` //座位号,场景中的座位号 + BetLevel int32 `protobuf:"varint,2,opt,name=BetLevel,proto3" json:"BetLevel,omitempty"` //下注的下标 + BetIndex int32 `protobuf:"varint,3,opt,name=BetIndex,proto3" json:"BetIndex,omitempty"` //下注的下标 + BetType ColorPinoyLiveBetTypeJP `protobuf:"varint,4,opt,name=BetType,proto3,enum=pb.ColorPinoyLiveBetTypeJP" json:"BetType,omitempty"` //下注区域 + UserBet int64 `protobuf:"varint,5,opt,name=UserBet,proto3" json:"UserBet,omitempty"` //该玩家本次下注 + UserBets int64 `protobuf:"varint,6,opt,name=UserBets,proto3" json:"UserBets,omitempty"` //该玩家各区域总下注 + TotalBets int64 `protobuf:"varint,7,opt,name=TotalBets,proto3" json:"TotalBets,omitempty"` //所有玩家总各区域下注 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveBetSuccessMessage) Reset() { + *x = ColorPinoyLiveBetSuccessMessage{} + mi := &file_colorgame_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveBetSuccessMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveBetSuccessMessage) ProtoMessage() {} + +func (x *ColorPinoyLiveBetSuccessMessage) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveBetSuccessMessage.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveBetSuccessMessage) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{32} +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetSeatId() int32 { + if x != nil { + return x.SeatId + } + return 0 +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetBetLevel() int32 { + if x != nil { + return x.BetLevel + } + return 0 +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetBetIndex() int32 { + if x != nil { + return x.BetIndex + } + return 0 +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetBetType() ColorPinoyLiveBetTypeJP { + if x != nil { + return x.BetType + } + return ColorPinoyLiveBetTypeJP_CLJ_Yellow +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetUserBet() int64 { + if x != nil { + return x.UserBet + } + return 0 +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetUserBets() int64 { + if x != nil { + return x.UserBets + } + return 0 +} + +func (x *ColorPinoyLiveBetSuccessMessage) GetTotalBets() int64 { + if x != nil { + return x.TotalBets + } + return 0 +} + +// 押注成功返回 +type ColorPinoyLiveS2CRepetBet struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetInfo []*ColorPinoyLiveBetSuccessMessage `protobuf:"bytes,1,rep,name=betInfo,proto3" json:"betInfo,omitempty"` + UserScore int64 `protobuf:"varint,2,opt,name=UserScore,proto3" json:"UserScore,omitempty"` //用户当前的分数 + Uid int64 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveS2CRepetBet) Reset() { + *x = ColorPinoyLiveS2CRepetBet{} + mi := &file_colorgame_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveS2CRepetBet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveS2CRepetBet) ProtoMessage() {} + +func (x *ColorPinoyLiveS2CRepetBet) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveS2CRepetBet.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveS2CRepetBet) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{33} +} + +func (x *ColorPinoyLiveS2CRepetBet) GetBetInfo() []*ColorPinoyLiveBetSuccessMessage { + if x != nil { + return x.BetInfo + } + return nil +} + +func (x *ColorPinoyLiveS2CRepetBet) GetUserScore() int64 { + if x != nil { + return x.UserScore + } + return 0 +} + +func (x *ColorPinoyLiveS2CRepetBet) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +type ColorPinoyLiveS2CNoChairRepetBet struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetInfo []*ColorPinoyLiveBetSuccessMessage `protobuf:"bytes,1,rep,name=betInfo,proto3" json:"betInfo,omitempty"` + UserBets []int64 `protobuf:"varint,2,rep,packed,name=UserBets,proto3" json:"UserBets,omitempty"` //用户各区域下注 + TotalBets []int64 `protobuf:"varint,3,rep,packed,name=TotalBets,proto3" json:"TotalBets,omitempty"` //总各区域下注 + UserScore int64 `protobuf:"varint,4,opt,name=UserScore,proto3" json:"UserScore,omitempty"` //用户当前的分数 + Uid int64 `protobuf:"varint,5,opt,name=uid,proto3" json:"uid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) Reset() { + *x = ColorPinoyLiveS2CNoChairRepetBet{} + mi := &file_colorgame_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveS2CNoChairRepetBet) ProtoMessage() {} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveS2CNoChairRepetBet.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveS2CNoChairRepetBet) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{34} +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) GetBetInfo() []*ColorPinoyLiveBetSuccessMessage { + if x != nil { + return x.BetInfo + } + return nil +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) GetUserBets() []int64 { + if x != nil { + return x.UserBets + } + return nil +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) GetTotalBets() []int64 { + if x != nil { + return x.TotalBets + } + return nil +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) GetUserScore() int64 { + if x != nil { + return x.UserScore + } + return 0 +} + +func (x *ColorPinoyLiveS2CNoChairRepetBet) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +// 押注翻倍 +type ColorPinoyLiveC2SBetDouble struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveC2SBetDouble) Reset() { + *x = ColorPinoyLiveC2SBetDouble{} + mi := &file_colorgame_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveC2SBetDouble) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveC2SBetDouble) ProtoMessage() {} + +func (x *ColorPinoyLiveC2SBetDouble) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveC2SBetDouble.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveC2SBetDouble) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{35} +} + +// 撤回 +type ColorPinoyLiveC2SUndoBet struct { + state protoimpl.MessageState `protogen:"open.v1"` + UndoType ColorPinoyLiveUndoType `protobuf:"varint,1,opt,name=undoType,proto3,enum=pb.ColorPinoyLiveUndoType" json:"undoType,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveC2SUndoBet) Reset() { + *x = ColorPinoyLiveC2SUndoBet{} + mi := &file_colorgame_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveC2SUndoBet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveC2SUndoBet) ProtoMessage() {} + +func (x *ColorPinoyLiveC2SUndoBet) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[36] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveC2SUndoBet.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveC2SUndoBet) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{36} +} + +func (x *ColorPinoyLiveC2SUndoBet) GetUndoType() ColorPinoyLiveUndoType { + if x != nil { + return x.UndoType + } + return ColorPinoyLiveUndoType_ColorPinoyLiveUndoVoid +} + +// 撤回返回 +type S2CUndoBet struct { + state protoimpl.MessageState `protogen:"open.v1"` + UndoType ColorPinoyLiveUndoType `protobuf:"varint,1,opt,name=undoType,proto3,enum=pb.ColorPinoyLiveUndoType" json:"undoType,omitempty"` + BetInfo []*ColorPinoyLiveBetSuccessMessage `protobuf:"bytes,2,rep,name=betInfo,proto3" json:"betInfo,omitempty"` + UserScore int64 `protobuf:"varint,3,opt,name=UserScore,proto3" json:"UserScore,omitempty"` //用户当前的分数 + Uid int64 `protobuf:"varint,4,opt,name=uid,proto3" json:"uid,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *S2CUndoBet) Reset() { + *x = S2CUndoBet{} + mi := &file_colorgame_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *S2CUndoBet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*S2CUndoBet) ProtoMessage() {} + +func (x *S2CUndoBet) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[37] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use S2CUndoBet.ProtoReflect.Descriptor instead. +func (*S2CUndoBet) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{37} +} + +func (x *S2CUndoBet) GetUndoType() ColorPinoyLiveUndoType { + if x != nil { + return x.UndoType + } + return ColorPinoyLiveUndoType_ColorPinoyLiveUndoVoid +} + +func (x *S2CUndoBet) GetBetInfo() []*ColorPinoyLiveBetSuccessMessage { + if x != nil { + return x.BetInfo + } + return nil +} + +func (x *S2CUndoBet) GetUserScore() int64 { + if x != nil { + return x.UserScore + } + return 0 +} + +func (x *S2CUndoBet) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +// 广播爆奖 +type ColorPinoyLiveNtfBigOddBetArea struct { + state protoimpl.MessageState `protogen:"open.v1"` + BetAreas []*ColorPinoyLiveGameBetAreaInfo `protobuf:"bytes,1,rep,name=betAreas,proto3" json:"betAreas,omitempty"` // 下注结束后,每个区域更新是否爆奖 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveNtfBigOddBetArea) Reset() { + *x = ColorPinoyLiveNtfBigOddBetArea{} + mi := &file_colorgame_proto_msgTypes[38] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveNtfBigOddBetArea) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveNtfBigOddBetArea) ProtoMessage() {} + +func (x *ColorPinoyLiveNtfBigOddBetArea) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[38] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveNtfBigOddBetArea.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveNtfBigOddBetArea) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{38} +} + +func (x *ColorPinoyLiveNtfBigOddBetArea) GetBetAreas() []*ColorPinoyLiveGameBetAreaInfo { + if x != nil { + return x.BetAreas + } + return nil +} + +type ColorPinoyLiveMainteNtf struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserInfo *ColorPinoyLiveUserInfo `protobuf:"bytes,1,opt,name=userInfo,proto3" json:"userInfo,omitempty"` + MaintMsg string `protobuf:"bytes,2,opt,name=maintMsg,proto3" json:"maintMsg,omitempty"` //维护消息 + ReturnGold int64 `protobuf:"varint,3,opt,name=returnGold,proto3" json:"returnGold,omitempty"` //返回金币 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveMainteNtf) Reset() { + *x = ColorPinoyLiveMainteNtf{} + mi := &file_colorgame_proto_msgTypes[39] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveMainteNtf) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveMainteNtf) ProtoMessage() {} + +func (x *ColorPinoyLiveMainteNtf) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[39] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveMainteNtf.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveMainteNtf) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{39} +} + +func (x *ColorPinoyLiveMainteNtf) GetUserInfo() *ColorPinoyLiveUserInfo { + if x != nil { + return x.UserInfo + } + return nil +} + +func (x *ColorPinoyLiveMainteNtf) GetMaintMsg() string { + if x != nil { + return x.MaintMsg + } + return "" +} + +func (x *ColorPinoyLiveMainteNtf) GetReturnGold() int64 { + if x != nil { + return x.ReturnGold + } + return 0 +} + +type ColorPinoyLiveS2CBetEndFailResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Players []*ColorPinoyLiveS2CRepetBet `protobuf:"bytes,2,rep,name=players,proto3" json:"players,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveS2CBetEndFailResult) Reset() { + *x = ColorPinoyLiveS2CBetEndFailResult{} + mi := &file_colorgame_proto_msgTypes[40] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveS2CBetEndFailResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveS2CBetEndFailResult) ProtoMessage() {} + +func (x *ColorPinoyLiveS2CBetEndFailResult) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[40] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveS2CBetEndFailResult.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveS2CBetEndFailResult) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{40} +} + +func (x *ColorPinoyLiveS2CBetEndFailResult) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ColorPinoyLiveS2CBetEndFailResult) GetPlayers() []*ColorPinoyLiveS2CRepetBet { + if x != nil { + return x.Players + } + return nil +} + +type ColorPinoyLiveApplyPropsReq struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserId int64 `protobuf:"varint,1,opt,name=userId,proto3" json:"userId,omitempty"` //使用者 uid + AcceptUserId int64 `protobuf:"varint,2,opt,name=acceptUserId,proto3" json:"acceptUserId,omitempty"` //接受者uid + PropsId string `protobuf:"bytes,3,opt,name=propsId,proto3" json:"propsId,omitempty"` //道具id + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveApplyPropsReq) Reset() { + *x = ColorPinoyLiveApplyPropsReq{} + mi := &file_colorgame_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveApplyPropsReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveApplyPropsReq) ProtoMessage() {} + +func (x *ColorPinoyLiveApplyPropsReq) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[41] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveApplyPropsReq.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveApplyPropsReq) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{41} +} + +func (x *ColorPinoyLiveApplyPropsReq) GetUserId() int64 { + if x != nil { + return x.UserId + } + return 0 +} + +func (x *ColorPinoyLiveApplyPropsReq) GetAcceptUserId() int64 { + if x != nil { + return x.AcceptUserId + } + return 0 +} + +func (x *ColorPinoyLiveApplyPropsReq) GetPropsId() string { + if x != nil { + return x.PropsId + } + return "" +} + +type ColorPinoyLivePlayerPropsResp struct { + state protoimpl.MessageState `protogen:"open.v1"` + ApplyUserId int64 `protobuf:"varint,1,opt,name=applyUserId,proto3" json:"applyUserId,omitempty"` //发送者 + AcceptUserId int64 `protobuf:"varint,2,opt,name=acceptUserId,proto3" json:"acceptUserId,omitempty"` //接受者 + PropsId string `protobuf:"bytes,3,opt,name=propsId,proto3" json:"propsId,omitempty"` //道具id + Chips int64 `protobuf:"varint,4,opt,name=chips,proto3" json:"chips,omitempty"` //发送者使用道具后金币 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLivePlayerPropsResp) Reset() { + *x = ColorPinoyLivePlayerPropsResp{} + mi := &file_colorgame_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLivePlayerPropsResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLivePlayerPropsResp) ProtoMessage() {} + +func (x *ColorPinoyLivePlayerPropsResp) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[42] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLivePlayerPropsResp.ProtoReflect.Descriptor instead. +func (*ColorPinoyLivePlayerPropsResp) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{42} +} + +func (x *ColorPinoyLivePlayerPropsResp) GetApplyUserId() int64 { + if x != nil { + return x.ApplyUserId + } + return 0 +} + +func (x *ColorPinoyLivePlayerPropsResp) GetAcceptUserId() int64 { + if x != nil { + return x.AcceptUserId + } + return 0 +} + +func (x *ColorPinoyLivePlayerPropsResp) GetPropsId() string { + if x != nil { + return x.PropsId + } + return "" +} + +func (x *ColorPinoyLivePlayerPropsResp) GetChips() int64 { + if x != nil { + return x.Chips + } + return 0 +} + +type ColorPinoyLiveLeaveResp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 0能离开 其他不能离开 + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveLeaveResp) Reset() { + *x = ColorPinoyLiveLeaveResp{} + mi := &file_colorgame_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveLeaveResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveLeaveResp) ProtoMessage() {} + +func (x *ColorPinoyLiveLeaveResp) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[43] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveLeaveResp.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveLeaveResp) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{43} +} + +func (x *ColorPinoyLiveLeaveResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ColorPinoyLiveLeaveResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +// 广播主播名字 +type ColorPinoyLiveDealerName struct { + state protoimpl.MessageState `protogen:"open.v1"` + DealerName []string `protobuf:"bytes,1,rep,name=dealerName,proto3" json:"dealerName,omitempty"` // 主播名字 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveDealerName) Reset() { + *x = ColorPinoyLiveDealerName{} + mi := &file_colorgame_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveDealerName) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveDealerName) ProtoMessage() {} + +func (x *ColorPinoyLiveDealerName) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[44] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveDealerName.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveDealerName) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{44} +} + +func (x *ColorPinoyLiveDealerName) GetDealerName() []string { + if x != nil { + return x.DealerName + } + return nil +} + +type ColorPinoyLivePlayerData struct { + state protoimpl.MessageState `protogen:"open.v1"` + Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` + TotalBets []int64 `protobuf:"varint,2,rep,packed,name=totalBets,proto3" json:"totalBets,omitempty"` // 各区域投注 + TotalBet int64 `protobuf:"varint,3,opt,name=totalBet,proto3" json:"totalBet,omitempty"` // 总投注 + Score int64 `protobuf:"varint,4,opt,name=score,proto3" json:"score,omitempty"` // 总分 + Profit int64 `protobuf:"varint,5,opt,name=profit,proto3" json:"profit,omitempty"` // 实际总盈利(需按照以小博大&破产逻辑计算并抽水) + Tax int64 `protobuf:"varint,6,opt,name=tax,proto3" json:"tax,omitempty"` // 抽水 + Balance int64 `protobuf:"varint,7,opt,name=balance,proto3" json:"balance,omitempty"` // 余额 + WaitTime int64 `protobuf:"varint,8,opt,name=wait_time,json=waitTime,proto3" json:"wait_time,omitempty"` // 等待开局时间 + PreBalance int64 `protobuf:"varint,9,opt,name=pre_balance,json=preBalance,proto3" json:"pre_balance,omitempty"` // 开局余额 + UserWins []int64 `protobuf:"varint,10,rep,packed,name=userWins,proto3" json:"userWins,omitempty"` // 用户各区域赢钱 + UserRealWins []int64 `protobuf:"varint,11,rep,packed,name=userRealWins,proto3" json:"userRealWins,omitempty"` // 用户各区域真实赢钱 + StartTime int64 `protobuf:"varint,12,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` + Nickname string `protobuf:"bytes,13,opt,name=nickname,proto3" json:"nickname,omitempty"` // 用户冗余数据,生产方不需要填入,由API查询写入 + Avatar string `protobuf:"bytes,14,opt,name=avatar,proto3" json:"avatar,omitempty"` // 用户冗余数据,生产方不需要填入,由API查询写入 + TransBet int64 `protobuf:"varint,15,opt,name=trans_bet,json=transBet,proto3" json:"trans_bet,omitempty"` // 流水投注 + TransWin int64 `protobuf:"varint,16,opt,name=trans_win,json=transWin,proto3" json:"trans_win,omitempty"` // 流水获利 + DevMode int32 `protobuf:"varint,17,opt,name=dev_mode,json=devMode,proto3" json:"dev_mode,omitempty"` // 用户属性 + Odds []int64 `protobuf:"varint,18,rep,packed,name=odds,proto3" json:"odds,omitempty"` // // 老版 投注区域倍率 todo + UserBetsCount []int64 `protobuf:"varint,19,rep,packed,name=userBetsCount,proto3" json:"userBetsCount,omitempty"` // 用户各区域下注次数 + IsDiscard int32 `protobuf:"varint,20,opt,name=isDiscard,proto3" json:"isDiscard,omitempty"` // 是否废弃 0正常 1废弃 + AreaOdds []*ColorPinoyLiveBetAreaOdd `protobuf:"bytes,21,rep,name=areaOdds,proto3" json:"areaOdds,omitempty"` // 投注区域倍率 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLivePlayerData) Reset() { + *x = ColorPinoyLivePlayerData{} + mi := &file_colorgame_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLivePlayerData) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLivePlayerData) ProtoMessage() {} + +func (x *ColorPinoyLivePlayerData) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[45] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLivePlayerData.ProtoReflect.Descriptor instead. +func (*ColorPinoyLivePlayerData) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{45} +} + +func (x *ColorPinoyLivePlayerData) GetUid() int64 { + if x != nil { + return x.Uid + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetTotalBets() []int64 { + if x != nil { + return x.TotalBets + } + return nil +} + +func (x *ColorPinoyLivePlayerData) GetTotalBet() int64 { + if x != nil { + return x.TotalBet + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetScore() int64 { + if x != nil { + return x.Score + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetProfit() int64 { + if x != nil { + return x.Profit + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetTax() int64 { + if x != nil { + return x.Tax + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetWaitTime() int64 { + if x != nil { + return x.WaitTime + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetPreBalance() int64 { + if x != nil { + return x.PreBalance + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetUserWins() []int64 { + if x != nil { + return x.UserWins + } + return nil +} + +func (x *ColorPinoyLivePlayerData) GetUserRealWins() []int64 { + if x != nil { + return x.UserRealWins + } + return nil +} + +func (x *ColorPinoyLivePlayerData) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetNickname() string { + if x != nil { + return x.Nickname + } + return "" +} + +func (x *ColorPinoyLivePlayerData) GetAvatar() string { + if x != nil { + return x.Avatar + } + return "" +} + +func (x *ColorPinoyLivePlayerData) GetTransBet() int64 { + if x != nil { + return x.TransBet + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetTransWin() int64 { + if x != nil { + return x.TransWin + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetDevMode() int32 { + if x != nil { + return x.DevMode + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetOdds() []int64 { + if x != nil { + return x.Odds + } + return nil +} + +func (x *ColorPinoyLivePlayerData) GetUserBetsCount() []int64 { + if x != nil { + return x.UserBetsCount + } + return nil +} + +func (x *ColorPinoyLivePlayerData) GetIsDiscard() int32 { + if x != nil { + return x.IsDiscard + } + return 0 +} + +func (x *ColorPinoyLivePlayerData) GetAreaOdds() []*ColorPinoyLiveBetAreaOdd { + if x != nil { + return x.AreaOdds + } + return nil +} + +type ColorPinoyLiveDetail struct { + state protoimpl.MessageState `protogen:"open.v1"` + WinDoubleColorMul []int64 `protobuf:"varint,1,rep,packed,name=winDoubleColorMul,proto3" json:"winDoubleColorMul,omitempty"` // // 老版 胜利双色奖励倍率 todo + WinSingleColorMul []int64 `protobuf:"varint,2,rep,packed,name=winSingleColorMul,proto3" json:"winSingleColorMul,omitempty"` // // 老版 胜利单色奖励倍率 todo + Bonus int64 `protobuf:"varint,3,opt,name=bonus,proto3" json:"bonus,omitempty"` // 幸运骰子加成 + ThreeDice []ColorPinoyLiveDiceColorType `protobuf:"varint,4,rep,packed,name=threeDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"threeDice,omitempty"` // 3个普通骰子 + LuckyDice ColorPinoyLiveDiceColorType `protobuf:"varint,5,opt,name=luckyDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"luckyDice,omitempty"` // // 老版 幸运骰子 todo + StartDice []ColorPinoyLiveDiceColorType `protobuf:"varint,6,rep,packed,name=startDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"startDice,omitempty"` // 初始位置摆放的骰子 + ResultImg []string `protobuf:"bytes,7,rep,name=resultImg,proto3" json:"resultImg,omitempty"` // 结果图片 + DealerName []string `protobuf:"bytes,8,rep,name=dealerName,proto3" json:"dealerName,omitempty"` // 主播名字 + BetAreaMul []*ColorPinoyLiveBetAreaOdd `protobuf:"bytes,9,rep,name=betAreaMul,proto3" json:"betAreaMul,omitempty"` // 新版各区域的赔率 + JackpotFunding int64 `protobuf:"varint,10,opt,name=jackpotFunding,proto3" json:"jackpotFunding,omitempty"` // 本局jackpot系统垫资多少,没有垫资为0 + JackpotX int64 `protobuf:"varint,11,opt,name=jackpotX,proto3" json:"jackpotX,omitempty"` // 赎回比例(反应系统盈亏) + JackpotY int64 `protobuf:"varint,12,opt,name=jackpotY,proto3" json:"jackpotY,omitempty"` // 追加进jackpot池子比例 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveDetail) Reset() { + *x = ColorPinoyLiveDetail{} + mi := &file_colorgame_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveDetail) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveDetail) ProtoMessage() {} + +func (x *ColorPinoyLiveDetail) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[46] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveDetail.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveDetail) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{46} +} + +func (x *ColorPinoyLiveDetail) GetWinDoubleColorMul() []int64 { + if x != nil { + return x.WinDoubleColorMul + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetWinSingleColorMul() []int64 { + if x != nil { + return x.WinSingleColorMul + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetBonus() int64 { + if x != nil { + return x.Bonus + } + return 0 +} + +func (x *ColorPinoyLiveDetail) GetThreeDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.ThreeDice + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetLuckyDice() ColorPinoyLiveDiceColorType { + if x != nil { + return x.LuckyDice + } + return ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +func (x *ColorPinoyLiveDetail) GetStartDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.StartDice + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetResultImg() []string { + if x != nil { + return x.ResultImg + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetDealerName() []string { + if x != nil { + return x.DealerName + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetBetAreaMul() []*ColorPinoyLiveBetAreaOdd { + if x != nil { + return x.BetAreaMul + } + return nil +} + +func (x *ColorPinoyLiveDetail) GetJackpotFunding() int64 { + if x != nil { + return x.JackpotFunding + } + return 0 +} + +func (x *ColorPinoyLiveDetail) GetJackpotX() int64 { + if x != nil { + return x.JackpotX + } + return 0 +} + +func (x *ColorPinoyLiveDetail) GetJackpotY() int64 { + if x != nil { + return x.JackpotY + } + return 0 +} + +// 对局详情 (游戏生产) +type ColorPinoyLiveEnd struct { + state protoimpl.MessageState `protogen:"open.v1"` + GameNo string `protobuf:"bytes,1,opt,name=game_no,json=gameNo,proto3" json:"game_no,omitempty"` // 编号 + StartTime int64 `protobuf:"varint,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // 开始时间 + EndTime int64 `protobuf:"varint,3,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // 结束时间 + Level int32 `protobuf:"varint,4,opt,name=level,proto3" json:"level,omitempty"` // 场次 + BaseBet int64 `protobuf:"varint,5,opt,name=base_bet,json=baseBet,proto3" json:"base_bet,omitempty"` // 底注 + PlayerData []*ColorPinoyLivePlayerData `protobuf:"bytes,6,rep,name=player_data,json=playerData,proto3" json:"player_data,omitempty"` // 玩家数据 + TaxRate int64 `protobuf:"varint,7,opt,name=tax_rate,json=taxRate,proto3" json:"tax_rate,omitempty"` // 抽水比例 + TotalBet int64 `protobuf:"varint,8,opt,name=totalBet,proto3" json:"totalBet,omitempty"` //投注总量 + TotalBets []int64 `protobuf:"varint,9,rep,packed,name=totalBets,proto3" json:"totalBets,omitempty"` //各区域投注总量 + RealSystemWin int64 `protobuf:"varint,10,opt,name=realSystemWin,proto3" json:"realSystemWin,omitempty"` //系统输赢 + RealSystemWins []int64 `protobuf:"varint,11,rep,packed,name=realSystemWins,proto3" json:"realSystemWins,omitempty"` //各区域系统输赢 + Tax int64 `protobuf:"varint,12,opt,name=tax,proto3" json:"tax,omitempty"` //抽水流水 + Wins []ColorPinoyLiveBetTypeJP `protobuf:"varint,13,rep,packed,name=wins,proto3,enum=pb.ColorPinoyLiveBetTypeJP" json:"wins,omitempty"` // 中奖区域 + OpToken string `protobuf:"bytes,14,opt,name=op_token,json=opToken,proto3" json:"op_token,omitempty"` // 平台 + Detail *ColorPinoyLiveDetail `protobuf:"bytes,15,opt,name=detail,proto3" json:"detail,omitempty"` // 数据详情 + IsDiscard int32 `protobuf:"varint,16,opt,name=isDiscard,proto3" json:"isDiscard,omitempty"` // 是否废弃 0正常 1废弃 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveEnd) Reset() { + *x = ColorPinoyLiveEnd{} + mi := &file_colorgame_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveEnd) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveEnd) ProtoMessage() {} + +func (x *ColorPinoyLiveEnd) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[47] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveEnd.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveEnd) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{47} +} + +func (x *ColorPinoyLiveEnd) GetGameNo() string { + if x != nil { + return x.GameNo + } + return "" +} + +func (x *ColorPinoyLiveEnd) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetEndTime() int64 { + if x != nil { + return x.EndTime + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetLevel() int32 { + if x != nil { + return x.Level + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetBaseBet() int64 { + if x != nil { + return x.BaseBet + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetPlayerData() []*ColorPinoyLivePlayerData { + if x != nil { + return x.PlayerData + } + return nil +} + +func (x *ColorPinoyLiveEnd) GetTaxRate() int64 { + if x != nil { + return x.TaxRate + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetTotalBet() int64 { + if x != nil { + return x.TotalBet + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetTotalBets() []int64 { + if x != nil { + return x.TotalBets + } + return nil +} + +func (x *ColorPinoyLiveEnd) GetRealSystemWin() int64 { + if x != nil { + return x.RealSystemWin + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetRealSystemWins() []int64 { + if x != nil { + return x.RealSystemWins + } + return nil +} + +func (x *ColorPinoyLiveEnd) GetTax() int64 { + if x != nil { + return x.Tax + } + return 0 +} + +func (x *ColorPinoyLiveEnd) GetWins() []ColorPinoyLiveBetTypeJP { + if x != nil { + return x.Wins + } + return nil +} + +func (x *ColorPinoyLiveEnd) GetOpToken() string { + if x != nil { + return x.OpToken + } + return "" +} + +func (x *ColorPinoyLiveEnd) GetDetail() *ColorPinoyLiveDetail { + if x != nil { + return x.Detail + } + return nil +} + +func (x *ColorPinoyLiveEnd) GetIsDiscard() int32 { + if x != nil { + return x.IsDiscard + } + return 0 +} + +// 通用返回 +type ColorPinoyLiveCommResp struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` + GameId int32 `protobuf:"varint,3,opt,name=gameId,proto3" json:"gameId,omitempty"` + GameStatus int32 `protobuf:"varint,4,opt,name=gameStatus,proto3" json:"gameStatus,omitempty"` // 当前游戏状态 + Countdown int64 `protobuf:"varint,5,opt,name=countdown,proto3" json:"countdown,omitempty"` // 进入下一个阶段的毫秒时间戳 + Countdown2 int64 `protobuf:"varint,6,opt,name=countdown2,proto3" json:"countdown2,omitempty"` // 进入下一个阶段的毫秒时间戳 + MaintainStatus int32 `protobuf:"varint,7,opt,name=maintainStatus,proto3" json:"maintainStatus,omitempty"` // 维护状态 0 正常 1 维护 + MaintainMsg string `protobuf:"bytes,8,opt,name=maintainMsg,proto3" json:"maintainMsg,omitempty"` //维护消息 + LuckyStar ColorPinoyLiveDiceColorType `protobuf:"varint,9,opt,name=luckyStar,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"luckyStar,omitempty"` // 幸运星 + DrawResult []ColorPinoyLiveDiceColorType `protobuf:"varint,10,rep,packed,name=drawResult,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"drawResult,omitempty"` // 开奖结果 + Times []int64 `protobuf:"varint,11,rep,packed,name=times,proto3" json:"times,omitempty"` + RankList *ColorPinoyLiveRankList `protobuf:"bytes,12,opt,name=rankList,proto3" json:"rankList,omitempty"` // 排行榜列表 + StartDice []ColorPinoyLiveDiceColorType `protobuf:"varint,13,rep,packed,name=startDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"startDice,omitempty"` // 初始位置摆放的骰子 + ResultImg []string `protobuf:"bytes,14,rep,name=resultImg,proto3" json:"resultImg,omitempty"` // 结果图片 + RandomNext bool `protobuf:"varint,15,opt,name=randomNext,proto3" json:"randomNext,omitempty"` // randomNext + GameNo string `protobuf:"bytes,16,opt,name=gameNo,proto3" json:"gameNo,omitempty"` // 对局编号 + DealerName []string `protobuf:"bytes,19,rep,name=dealerName,proto3" json:"dealerName,omitempty"` // 当前主播名字 + BetAreaMul []*ColorPinoyLiveGameBetAreaInfo `protobuf:"bytes,20,rep,name=betAreaMul,proto3" json:"betAreaMul,omitempty"` // 新版各区域的赔率 + Jackpot int64 `protobuf:"varint,30,opt,name=jackpot,proto3" json:"jackpot,omitempty"` // jackpot金额 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveCommResp) Reset() { + *x = ColorPinoyLiveCommResp{} + mi := &file_colorgame_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveCommResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveCommResp) ProtoMessage() {} + +func (x *ColorPinoyLiveCommResp) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[48] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveCommResp.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveCommResp) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{48} +} + +func (x *ColorPinoyLiveCommResp) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *ColorPinoyLiveCommResp) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *ColorPinoyLiveCommResp) GetGameId() int32 { + if x != nil { + return x.GameId + } + return 0 +} + +func (x *ColorPinoyLiveCommResp) GetGameStatus() int32 { + if x != nil { + return x.GameStatus + } + return 0 +} + +func (x *ColorPinoyLiveCommResp) GetCountdown() int64 { + if x != nil { + return x.Countdown + } + return 0 +} + +func (x *ColorPinoyLiveCommResp) GetCountdown2() int64 { + if x != nil { + return x.Countdown2 + } + return 0 +} + +func (x *ColorPinoyLiveCommResp) GetMaintainStatus() int32 { + if x != nil { + return x.MaintainStatus + } + return 0 +} + +func (x *ColorPinoyLiveCommResp) GetMaintainMsg() string { + if x != nil { + return x.MaintainMsg + } + return "" +} + +func (x *ColorPinoyLiveCommResp) GetLuckyStar() ColorPinoyLiveDiceColorType { + if x != nil { + return x.LuckyStar + } + return ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +func (x *ColorPinoyLiveCommResp) GetDrawResult() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.DrawResult + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetTimes() []int64 { + if x != nil { + return x.Times + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetRankList() *ColorPinoyLiveRankList { + if x != nil { + return x.RankList + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetStartDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.StartDice + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetResultImg() []string { + if x != nil { + return x.ResultImg + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetRandomNext() bool { + if x != nil { + return x.RandomNext + } + return false +} + +func (x *ColorPinoyLiveCommResp) GetGameNo() string { + if x != nil { + return x.GameNo + } + return "" +} + +func (x *ColorPinoyLiveCommResp) GetDealerName() []string { + if x != nil { + return x.DealerName + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetBetAreaMul() []*ColorPinoyLiveGameBetAreaInfo { + if x != nil { + return x.BetAreaMul + } + return nil +} + +func (x *ColorPinoyLiveCommResp) GetJackpot() int64 { + if x != nil { + return x.Jackpot + } + return 0 +} + +// GameGetStatus +type ColorPinoyLiveGetStatus struct { + state protoimpl.MessageState `protogen:"open.v1"` + GameId int32 `protobuf:"varint,1,opt,name=gameId,proto3" json:"gameId,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveGetStatus) Reset() { + *x = ColorPinoyLiveGetStatus{} + mi := &file_colorgame_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveGetStatus) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveGetStatus) ProtoMessage() {} + +func (x *ColorPinoyLiveGetStatus) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[49] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveGetStatus.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveGetStatus) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{49} +} + +func (x *ColorPinoyLiveGetStatus) GetGameId() int32 { + if x != nil { + return x.GameId + } + return 0 +} + +// 幸运星 +type ColorPinoyLiveLucky struct { + state protoimpl.MessageState `protogen:"open.v1"` + Color ColorPinoyLiveDiceColorType `protobuf:"varint,1,opt,name=Color,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"Color,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveLucky) Reset() { + *x = ColorPinoyLiveLucky{} + mi := &file_colorgame_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveLucky) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveLucky) ProtoMessage() {} + +func (x *ColorPinoyLiveLucky) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[50] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveLucky.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveLucky) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{50} +} + +func (x *ColorPinoyLiveLucky) GetColor() ColorPinoyLiveDiceColorType { + if x != nil { + return x.Color + } + return ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +// 游戏结果 +type ColorPinoyLiveResult struct { + state protoimpl.MessageState `protogen:"open.v1"` + Color []ColorPinoyLiveDiceColorType `protobuf:"varint,1,rep,packed,name=Color,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"Color,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveResult) Reset() { + *x = ColorPinoyLiveResult{} + mi := &file_colorgame_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveResult) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveResult) ProtoMessage() {} + +func (x *ColorPinoyLiveResult) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[51] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveResult.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveResult) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{51} +} + +func (x *ColorPinoyLiveResult) GetColor() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.Color + } + return nil +} + +// 初始位置摆放的骰子 +type ColorPinoyLiveStartDice struct { + state protoimpl.MessageState `protogen:"open.v1"` + StartDice []ColorPinoyLiveDiceColorType `protobuf:"varint,1,rep,packed,name=startDice,proto3,enum=pb.ColorPinoyLiveDiceColorType" json:"startDice,omitempty"` // 初始位置摆放的骰子 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveStartDice) Reset() { + *x = ColorPinoyLiveStartDice{} + mi := &file_colorgame_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveStartDice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveStartDice) ProtoMessage() {} + +func (x *ColorPinoyLiveStartDice) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[52] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveStartDice.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveStartDice) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{52} +} + +func (x *ColorPinoyLiveStartDice) GetStartDice() []ColorPinoyLiveDiceColorType { + if x != nil { + return x.StartDice + } + return nil +} + +// 结果图片 +type ColorPinoyLiveResultImg struct { + state protoimpl.MessageState `protogen:"open.v1"` + ResultImg []string `protobuf:"bytes,1,rep,name=resultImg,proto3" json:"resultImg,omitempty"` // 结果图片 + Stage int32 `protobuf:"varint,2,opt,name=stage,proto3" json:"stage,omitempty"` // 控制台使用 1: random 2: lottery + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveResultImg) Reset() { + *x = ColorPinoyLiveResultImg{} + mi := &file_colorgame_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveResultImg) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveResultImg) ProtoMessage() {} + +func (x *ColorPinoyLiveResultImg) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[53] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveResultImg.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveResultImg) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{53} +} + +func (x *ColorPinoyLiveResultImg) GetResultImg() []string { + if x != nil { + return x.ResultImg + } + return nil +} + +func (x *ColorPinoyLiveResultImg) GetStage() int32 { + if x != nil { + return x.Stage + } + return 0 +} + +// 维护状态设置 +type ColorPinoyLiveMaintain struct { + state protoimpl.MessageState `protogen:"open.v1"` + TargetStatus int32 `protobuf:"varint,1,opt,name=targetStatus,proto3" json:"targetStatus,omitempty"` // 维护状态 0 正常 1 维护 + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` //维护消息 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveMaintain) Reset() { + *x = ColorPinoyLiveMaintain{} + mi := &file_colorgame_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveMaintain) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveMaintain) ProtoMessage() {} + +func (x *ColorPinoyLiveMaintain) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[54] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveMaintain.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveMaintain) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{54} +} + +func (x *ColorPinoyLiveMaintain) GetTargetStatus() int32 { + if x != nil { + return x.TargetStatus + } + return 0 +} + +func (x *ColorPinoyLiveMaintain) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +// 排行榜列表 +type ColorPinoyLiveRankList struct { + state protoimpl.MessageState `protogen:"open.v1"` + PlayerData []*ColorPinoyLivePlayerData `protobuf:"bytes,1,rep,name=player_data,json=playerData,proto3" json:"player_data,omitempty"` // 玩家数据 + GameNo string `protobuf:"bytes,2,opt,name=game_no,json=gameNo,proto3" json:"game_no,omitempty"` // 编号 + StartTime int64 `protobuf:"varint,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` // 开始时间 + EndTime int64 `protobuf:"varint,4,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` // 结束时间 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveRankList) Reset() { + *x = ColorPinoyLiveRankList{} + mi := &file_colorgame_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveRankList) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveRankList) ProtoMessage() {} + +func (x *ColorPinoyLiveRankList) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[55] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveRankList.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveRankList) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{55} +} + +func (x *ColorPinoyLiveRankList) GetPlayerData() []*ColorPinoyLivePlayerData { + if x != nil { + return x.PlayerData + } + return nil +} + +func (x *ColorPinoyLiveRankList) GetGameNo() string { + if x != nil { + return x.GameNo + } + return "" +} + +func (x *ColorPinoyLiveRankList) GetStartTime() int64 { + if x != nil { + return x.StartTime + } + return 0 +} + +func (x *ColorPinoyLiveRankList) GetEndTime() int64 { + if x != nil { + return x.EndTime + } + return 0 +} + +// 设置主播名字 +type ColorPinoyLiveSetDealer struct { + state protoimpl.MessageState `protogen:"open.v1"` + DealerName []string `protobuf:"bytes,1,rep,name=dealerName,proto3" json:"dealerName,omitempty"` // 主播名字 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ColorPinoyLiveSetDealer) Reset() { + *x = ColorPinoyLiveSetDealer{} + mi := &file_colorgame_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ColorPinoyLiveSetDealer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ColorPinoyLiveSetDealer) ProtoMessage() {} + +func (x *ColorPinoyLiveSetDealer) ProtoReflect() protoreflect.Message { + mi := &file_colorgame_proto_msgTypes[56] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ColorPinoyLiveSetDealer.ProtoReflect.Descriptor instead. +func (*ColorPinoyLiveSetDealer) Descriptor() ([]byte, []int) { + return file_colorgame_proto_rawDescGZIP(), []int{56} +} + +func (x *ColorPinoyLiveSetDealer) GetDealerName() []string { + if x != nil { + return x.DealerName + } + return nil +} + var File_colorgame_proto protoreflect.FileDescriptor const file_colorgame_proto_rawDesc = "" + "\n" + - "\x0fcolorgame.proto\x12\x02pbB\x11Z\x0fcommon/proto/pbb\x06proto3" + "\x0fcolorgame.proto\x12\x02pb\"\x0f\n" + + "\rColorRoomInfo\"\x9b\x01\n" + + "\x1bColorPinoyLiveStatusMessage\x12\x16\n" + + "\x06Status\x18\x01 \x01(\x05R\x06Status\x12\x1e\n" + + "\n" + + "StatusTime\x18\x02 \x01(\x05R\n" + + "StatusTime\x12*\n" + + "\x10StatusRemainTime\x18\x03 \x01(\x05R\x10StatusRemainTime\x12\x18\n" + + "\ajackpot\x18\x04 \x01(\x03R\ajackpot\"\x96\x01\n" + + "\x1fColorPinoyLiveGameOpenThreeDice\x12\x16\n" + + "\x06Status\x18\x01 \x01(\x05R\x06Status\x125\n" + + "\x05color\x18\x02 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\x05color\x12$\n" + + "\raniRouteIndex\x18\x03 \x01(\x05R\raniRouteIndex\"\xa3\x01\n" + + "\x14ColorPinoyLiveBetReq\x125\n" + + "\aBetType\x18\x01 \x01(\x0e2\x1b.pb.ColorPinoyLiveBetTypeJPR\aBetType\x12\x1a\n" + + "\bBetLevel\x18\x02 \x01(\x05R\bBetLevel\x12\x1a\n" + + "\bBetIndex\x18\x03 \x01(\x05R\bBetIndex\x12\x1c\n" + + "\tBetAmount\x18\x04 \x01(\x03R\tBetAmount\"E\n" + + "\x15ColorPinoyLiveBetReqs\x12,\n" + + "\x04info\x18\x01 \x03(\v2\x18.pb.ColorPinoyLiveBetReqR\x04info\"=\n" + + "\x15ColorPinoyLiveBetResp\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" + + "\x03msg\x18\x02 \x01(\tR\x03msg\"\x86\x01\n" + + "\x16ColorPinoyLiveSeatUser\x12\x12\n" + + "\x04Nick\x18\x01 \x01(\tR\x04Nick\x12\x12\n" + + "\x04Head\x18\x02 \x01(\tR\x04Head\x12\x14\n" + + "\x05Score\x18\x03 \x01(\x03R\x05Score\x12\x16\n" + + "\x06SeatId\x18\x04 \x01(\x05R\x06SeatId\x12\x16\n" + + "\x06UserID\x18\x05 \x01(\x03R\x06UserID\"4\n" + + " ColorPinoyLiveS2COnlinePlayerNum\x12\x10\n" + + "\x03Num\x18\x01 \x01(\x03R\x03Num\"n\n" + + "\x1dColorPinoyLivePlayerBigWinner\x123\n" + + "\x06bigBet\x18\" \x03(\v2\x1b.pb.ColorPinoyLiveBigWinnerR\x06bigBet\x12\x18\n" + + "\ajackpot\x18\x01 \x01(\x03R\ajackpot\"\xb2\x01\n" + + "\x1aColorPinoyLiveSceneBetInfo\x12\"\n" + + "\fUserBetTotal\x18\x01 \x01(\x03R\fUserBetTotal\x12\x1c\n" + + "\tTotalBets\x18\x02 \x03(\x03R\tTotalBets\x12\x1a\n" + + "\bUserBets\x18\x03 \x03(\x03R\bUserBets\x126\n" + + "\bUserInfo\x18\x04 \x01(\v2\x1a.pb.ColorPinoyLiveUserInfoR\bUserInfo\".\n" + + "\x14ColorPinoyLiveBetArr\x12\x16\n" + + "\x06betArr\x18\x03 \x03(\x03R\x06betArr\"\xf5\x01\n" + + "\x1cColorPinoyLiveRoomBetRuleMsg\x12\"\n" + + "\fuserBetLimit\x18\x01 \x01(\x05R\fuserBetLimit\x12 \n" + + "\vbetMinLimit\x18\x02 \x01(\x03R\vbetMinLimit\x126\n" + + "\tbetLevels\x18\x03 \x03(\v2\x18.pb.ColorPinoyLiveBetArrR\tbetLevels\x12\x14\n" + + "\x05level\x18\x04 \x03(\x03R\x05level\x12A\n" + + "\x0emulRangeConfig\x18\x05 \x03(\v2\x19.pb.BetAreaMulRangeConfigR\x0emulRangeConfig\"\x98\x01\n" + + "\x18ColorPinoyLiveTrendGroup\x12=\n" + + "\tluckyDice\x18\x01 \x01(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tluckyDice\x12=\n" + + "\tthreeDice\x18\x02 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tthreeDice\"\x7f\n" + + "\x13ColorPinoyLiveTrend\x12D\n" + + "\x0elistTrendGroup\x18\x01 \x03(\v2\x1c.pb.ColorPinoyLiveTrendGroupR\x0elistTrendGroup\x12\"\n" + + "\fluckStarRate\x18\x02 \x03(\x05R\fluckStarRate\"t\n" + + "\fTRTCRoomArgs\x12\x14\n" + + "\x05appId\x18\x01 \x01(\x05R\x05appId\x12\x1c\n" + + "\tstrRoomId\x18\x02 \x01(\tR\tstrRoomId\x12\x16\n" + + "\x06userId\x18\x03 \x01(\tR\x06userId\x12\x18\n" + + "\auserSig\x18\x04 \x01(\tR\auserSig\"\x81\x01\n" + + "\x17ColorPinoyLiveBigWinner\x12\x1a\n" + + "\bnickName\x18\x05 \x01(\tR\bnickName\x12\x16\n" + + "\x06avatar\x18\x02 \x01(\tR\x06avatar\x12\x1a\n" + + "\bwinChips\x18\x01 \x01(\x03R\bwinChips\x12\x16\n" + + "\x06areaId\x18\x03 \x03(\x03R\x06areaId\"z\n" + + "\x15BetAreaMulRangeConfig\x121\n" + + "\x03pos\x18\x01 \x01(\x0e2\x1f.pb.ColorPinoyLiveBigBetAreaPosR\x03pos\x12\x16\n" + + "\x06minMul\x18\x02 \x01(\x03R\x06minMul\x12\x16\n" + + "\x06maxMul\x18\x03 \x01(\x03R\x06maxMul\"\x9a\b\n" + + "\fSceneMessage\x12\x16\n" + + "\x06roomID\x18\x01 \x01(\x05R\x06roomID\x12?\n" + + "\n" + + "gameStatus\x18\x02 \x01(\v2\x1f.pb.ColorPinoyLiveStatusMessageR\n" + + "gameStatus\x12\x1e\n" + + "\n" + + "statusTime\x18\x03 \x01(\x05R\n" + + "statusTime\x12\x1c\n" + + "\tonlineNum\x18\x04 \x01(\x05R\tonlineNum\x125\n" + + "\ttrendList\x18\x05 \x01(\v2\x17.pb.ColorPinoyLiveTrendR\ttrendList\x12=\n" + + "\tluckyDice\x18\x06 \x01(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tluckyDice\x12=\n" + + "\tthreeDice\x18\a \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tthreeDice\x12C\n" + + "\vbetAreaInfo\x18\b \x03(\v2!.pb.ColorPinoyLiveGameBetAreaInfoR\vbetAreaInfo\x12:\n" + + "\abetRule\x18\t \x01(\v2 .pb.ColorPinoyLiveRoomBetRuleMsgR\abetRule\x126\n" + + "\x16aniLuckyDiceRouteIndex\x18\n" + + " \x01(\x05R\x16aniLuckyDiceRouteIndex\x126\n" + + "\x16aniThreeDiceRouteIndex\x18\v \x01(\x05R\x16aniThreeDiceRouteIndex\x12\x1e\n" + + "\n" + + "onlineNums\x18\f \x01(\x05R\n" + + "onlineNums\x12;\n" + + "\vlastTimeBet\x18\r \x03(\v2\x19.pb.ColorPinoyLiveBetReqsR\vlastTimeBet\x128\n" + + "\brankList\x18\x0e \x03(\v2\x1c.pb.ColorPinoyLivePlayerDataR\brankList\x12\x14\n" + + "\x05bonus\x18\x0f \x01(\x05R\x05bonus\x12\x18\n" + + "\aartcUrl\x18\x10 \x01(\tR\aartcUrl\x124\n" + + "\ftrtcRoomArgs\x18\x11 \x01(\v2\x10.pb.TRTCRoomArgsR\ftrtcRoomArgs\x12\x18\n" + + "\abalance\x18\x12 \x01(\x03R\abalance\x129\n" + + "\tbigWinner\x18\x13 \x03(\v2\x1b.pb.ColorPinoyLiveBigWinnerR\tbigWinner\x12\x1e\n" + + "\n" + + "dealerName\x18\x14 \x03(\tR\n" + + "dealerName\x12\x18\n" + + "\ajackpot\x18\x15 \x01(\x03R\ajackpot\x12A\n" + + "\x0emulRangeConfig\x18\x16 \x03(\v2\x19.pb.BetAreaMulRangeConfigR\x0emulRangeConfig\"5\n" + + "\x19ColorPinoyLiveUserSitDown\x12\x18\n" + + "\aChairNo\x18\x01 \x01(\x05R\aChairNo\"?\n" + + "\x1dColorPinoyLiveUserSitDownFail\x12\x1e\n" + + "\n" + + "FailReaSon\x18\x01 \x01(\tR\n" + + "FailReaSon\"\xa2\x02\n" + + "\x18ColorPinoyLiveBetAreaOdd\x125\n" + + "\abetArea\x18\x01 \x01(\x0e2\x1b.pb.ColorPinoyLiveBetTypeJPR\abetArea\x12\x10\n" + + "\x03odd\x18\x04 \x01(\x03R\x03odd\x12\x18\n" + + "\aviewOdd\x18\t \x01(\x03R\aviewOdd\x12\x1a\n" + + "\bisBigOdd\x18\x05 \x01(\bR\bisBigOdd\x12S\n" + + "\x14bigSingleColorOddPos\x18\x06 \x01(\x0e2\x1f.pb.ColorPinoyLiveBigBetAreaPosR\x14bigSingleColorOddPos\x12\x14\n" + + "\x05isWin\x18\a \x01(\bR\x05isWin\x12\x1c\n" + + "\tisJackpot\x18\b \x01(\bR\tisJackpot\"V\n" + + "\x16ColorPinoyLivePokerMsg\x12<\n" + + "\n" + + "winBetArea\x18\x05 \x03(\v2\x1c.pb.ColorPinoyLiveBetAreaOddR\n" + + "winBetArea\"\xb2\x01\n" + + "\x16ColorPinoyLiveUserInfo\x12\x1a\n" + + "\bNikeName\x18\x01 \x01(\tR\bNikeName\x12\x1a\n" + + "\bUserGlod\x18\x02 \x01(\x03R\bUserGlod\x12\x18\n" + + "\aBetGold\x18\x03 \x01(\x03R\aBetGold\x12\x1a\n" + + "\bWinCount\x18\x04 \x01(\x05R\bWinCount\x12\x12\n" + + "\x04Head\x18\x05 \x01(\tR\x04Head\x12\x16\n" + + "\x06UserID\x18\x06 \x01(\x03R\x06UserID\"P\n" + + "\x16ColorPinoyLiveUserList\x126\n" + + "\bUserList\x18\x01 \x03(\v2\x1a.pb.ColorPinoyLiveUserInfoR\bUserList\"\xd7\x03\n" + + "\x1bColorPinoyLiveUserSettleMsg\x12(\n" + + "\x0fTotalWinBaseBet\x18\x01 \x01(\x03R\x0fTotalWinBaseBet\x12\x1c\n" + + "\tUserScore\x18\x02 \x01(\x03R\tUserScore\x12\x1a\n" + + "\bTotalWin\x18\x03 \x01(\x03R\bTotalWin\x12\x1a\n" + + "\bUserBets\x18\x04 \x03(\x03R\bUserBets\x12\x1c\n" + + "\tTotalBets\x18\x05 \x03(\x03R\tTotalBets\x12\x1a\n" + + "\bUserWins\x18\x06 \x03(\x03R\bUserWins\x12\"\n" + + "\fUserRealWins\x18\a \x03(\x03R\fUserRealWins\x12\x10\n" + + "\x03Tax\x18\t \x01(\x03R\x03Tax\x12\x1a\n" + + "\boddsWins\x18\n" + + " \x03(\x03R\boddsWins\x12$\n" + + "\ruserBetsCount\x18\v \x03(\x03R\ruserBetsCount\x12<\n" + + "\n" + + "winAreaOdd\x18\f \x03(\v2\x1c.pb.ColorPinoyLiveBetAreaOddR\n" + + "winAreaOdd\x12\x1e\n" + + "\n" + + "jackpotWin\x18\r \x01(\x03R\n" + + "jackpotWin\x12(\n" + + "\x0fjackpotUserName\x18\x0e \x03(\tR\x0fjackpotUserName\"W\n" + + "!ColorPinoyLiveGameBetAreaUserInfo\x12\x16\n" + + "\x06userID\x18\x01 \x01(\x03R\x06userID\x12\x1a\n" + + "\bbetChips\x18\x02 \x01(\x03R\bbetChips\"\xd8\x02\n" + + "\x1dColorPinoyLiveGameBetAreaInfo\x125\n" + + "\abetType\x18\x01 \x01(\x0e2\x1b.pb.ColorPinoyLiveBetTypeJPR\abetType\x12I\n" + + "\fbetChipsInfo\x18\x02 \x03(\v2%.pb.ColorPinoyLiveGameBetAreaUserInfoR\fbetChipsInfo\x12\x14\n" + + "\x05isWin\x18\x03 \x01(\x05R\x05isWin\x12\x10\n" + + "\x03odd\x18\x04 \x03(\x03R\x03odd\x12\x1a\n" + + "\bisBigOdd\x18\x05 \x01(\bR\bisBigOdd\x12S\n" + + "\x14bigSingleColorOddPos\x18\x06 \x01(\x0e2\x1f.pb.ColorPinoyLiveBigBetAreaPosR\x14bigSingleColorOddPos\x12\x1c\n" + + "\tisJackpot\x18\a \x01(\bR\tisJackpot\"\xcf\x01\n" + + "\x1bColorPinoyLiveSceneUserInfo\x12\x16\n" + + "\x06UserID\x18\x01 \x01(\x03R\x06UserID\x12 \n" + + "\vSceneSeatID\x18\x02 \x01(\x05R\vSceneSeatID\x12\x1c\n" + + "\tUserScore\x18\x03 \x01(\x03R\tUserScore\x12\x1a\n" + + "\bTotalWin\x18\x04 \x01(\x03R\bTotalWin\x12\x1e\n" + + "\n" + + "jackpotWin\x18\x05 \x01(\x03R\n" + + "jackpotWin\x12\x1c\n" + + "\tnormalWin\x18\x06 \x01(\x03R\tnormalWin\"\xb3\x05\n" + + "\x1cColorPinoyLiveSceneSettleMsg\x12C\n" + + "\vbetAreaInfo\x18\x01 \x03(\v2!.pb.ColorPinoyLiveGameBetAreaInfoR\vbetAreaInfo\x12(\n" + + "\x0fnoChairTotalWin\x18\x02 \x01(\x03R\x0fnoChairTotalWin\x12,\n" + + "\x11sysDealerAreaInfo\x18\x03 \x01(\x03R\x11sysDealerAreaInfo\x12A\n" + + "\vselfWinInfo\x18\x04 \x01(\v2\x1f.pb.ColorPinoyLiveSceneUserInfoR\vselfWinInfo\x12=\n" + + "\tluckyDice\x18\x05 \x01(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tluckyDice\x12=\n" + + "\tthreeDice\x18\x06 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tthreeDice\x12<\n" + + "\n" + + "trendGroup\x18\a \x01(\v2\x1c.pb.ColorPinoyLiveTrendGroupR\n" + + "trendGroup\x12;\n" + + "\vlastTimeBet\x18\b \x03(\v2\x19.pb.ColorPinoyLiveBetReqsR\vlastTimeBet\x12;\n" + + "\ftrendGroupEx\x18\t \x01(\v2\x17.pb.ColorPinoyLiveTrendR\ftrendGroupEx\x129\n" + + "\tbigWinner\x18\n" + + " \x03(\v2\x1b.pb.ColorPinoyLiveBigWinnerR\tbigWinner\x12\x18\n" + + "\ajackpot\x18\v \x01(\x03R\ajackpot\x12(\n" + + "\x0fjackpotUserName\x18\f \x03(\tR\x0fjackpotUserName\"\\\n" + + "\x1cColorPinoyLiveKickOutUserMsg\x12$\n" + + "\rKickOutReason\x18\x01 \x01(\tR\rKickOutReason\x12\x16\n" + + "\x06reason\x18\x02 \x01(\x05R\x06reason\"?\n" + + "\x1fColorPinoyLiveUpdateRoomInfoMsg\x12\x1c\n" + + "\tOnlineNum\x18\x01 \x01(\x03R\tOnlineNum\"S\n" + + "\x19ColorPinoyLivetempCardMsg\x12\x1c\n" + + "\tLongPoker\x18\x01 \x01(\fR\tLongPoker\x12\x18\n" + + "\aHuPoker\x18\x02 \x01(\fR\aHuPoker\"\xfc\x01\n" + + "\x1fColorPinoyLiveBetSuccessMessage\x12\x16\n" + + "\x06SeatId\x18\x01 \x01(\x05R\x06SeatId\x12\x1a\n" + + "\bBetLevel\x18\x02 \x01(\x05R\bBetLevel\x12\x1a\n" + + "\bBetIndex\x18\x03 \x01(\x05R\bBetIndex\x125\n" + + "\aBetType\x18\x04 \x01(\x0e2\x1b.pb.ColorPinoyLiveBetTypeJPR\aBetType\x12\x18\n" + + "\aUserBet\x18\x05 \x01(\x03R\aUserBet\x12\x1a\n" + + "\bUserBets\x18\x06 \x01(\x03R\bUserBets\x12\x1c\n" + + "\tTotalBets\x18\a \x01(\x03R\tTotalBets\"\x8a\x01\n" + + "\x19ColorPinoyLiveS2CRepetBet\x12=\n" + + "\abetInfo\x18\x01 \x03(\v2#.pb.ColorPinoyLiveBetSuccessMessageR\abetInfo\x12\x1c\n" + + "\tUserScore\x18\x02 \x01(\x03R\tUserScore\x12\x10\n" + + "\x03uid\x18\x03 \x01(\x03R\x03uid\"\xcb\x01\n" + + " ColorPinoyLiveS2CNoChairRepetBet\x12=\n" + + "\abetInfo\x18\x01 \x03(\v2#.pb.ColorPinoyLiveBetSuccessMessageR\abetInfo\x12\x1a\n" + + "\bUserBets\x18\x02 \x03(\x03R\bUserBets\x12\x1c\n" + + "\tTotalBets\x18\x03 \x03(\x03R\tTotalBets\x12\x1c\n" + + "\tUserScore\x18\x04 \x01(\x03R\tUserScore\x12\x10\n" + + "\x03uid\x18\x05 \x01(\x03R\x03uid\"\x1c\n" + + "\x1aColorPinoyLiveC2SBetDouble\"R\n" + + "\x18ColorPinoyLiveC2SUndoBet\x126\n" + + "\bundoType\x18\x01 \x01(\x0e2\x1a.pb.ColorPinoyLiveUndoTypeR\bundoType\"\xb3\x01\n" + + "\n" + + "S2CUndoBet\x126\n" + + "\bundoType\x18\x01 \x01(\x0e2\x1a.pb.ColorPinoyLiveUndoTypeR\bundoType\x12=\n" + + "\abetInfo\x18\x02 \x03(\v2#.pb.ColorPinoyLiveBetSuccessMessageR\abetInfo\x12\x1c\n" + + "\tUserScore\x18\x03 \x01(\x03R\tUserScore\x12\x10\n" + + "\x03uid\x18\x04 \x01(\x03R\x03uid\"_\n" + + "\x1eColorPinoyLiveNtfBigOddBetArea\x12=\n" + + "\bbetAreas\x18\x01 \x03(\v2!.pb.ColorPinoyLiveGameBetAreaInfoR\bbetAreas\"\x8d\x01\n" + + "\x17ColorPinoyLiveMainteNtf\x126\n" + + "\buserInfo\x18\x01 \x01(\v2\x1a.pb.ColorPinoyLiveUserInfoR\buserInfo\x12\x1a\n" + + "\bmaintMsg\x18\x02 \x01(\tR\bmaintMsg\x12\x1e\n" + + "\n" + + "returnGold\x18\x03 \x01(\x03R\n" + + "returnGold\"p\n" + + "!ColorPinoyLiveS2CBetEndFailResult\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x127\n" + + "\aplayers\x18\x02 \x03(\v2\x1d.pb.ColorPinoyLiveS2CRepetBetR\aplayers\"s\n" + + "\x1bColorPinoyLiveApplyPropsReq\x12\x16\n" + + "\x06userId\x18\x01 \x01(\x03R\x06userId\x12\"\n" + + "\facceptUserId\x18\x02 \x01(\x03R\facceptUserId\x12\x18\n" + + "\apropsId\x18\x03 \x01(\tR\apropsId\"\x95\x01\n" + + "\x1dColorPinoyLivePlayerPropsResp\x12 \n" + + "\vapplyUserId\x18\x01 \x01(\x03R\vapplyUserId\x12\"\n" + + "\facceptUserId\x18\x02 \x01(\x03R\facceptUserId\x12\x18\n" + + "\apropsId\x18\x03 \x01(\tR\apropsId\x12\x14\n" + + "\x05chips\x18\x04 \x01(\x03R\x05chips\"?\n" + + "\x17ColorPinoyLiveLeaveResp\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" + + "\x03msg\x18\x02 \x01(\tR\x03msg\":\n" + + "\x18ColorPinoyLiveDealerName\x12\x1e\n" + + "\n" + + "dealerName\x18\x01 \x03(\tR\n" + + "dealerName\"\xf8\x04\n" + + "\x18ColorPinoyLivePlayerData\x12\x10\n" + + "\x03uid\x18\x01 \x01(\x03R\x03uid\x12\x1c\n" + + "\ttotalBets\x18\x02 \x03(\x03R\ttotalBets\x12\x1a\n" + + "\btotalBet\x18\x03 \x01(\x03R\btotalBet\x12\x14\n" + + "\x05score\x18\x04 \x01(\x03R\x05score\x12\x16\n" + + "\x06profit\x18\x05 \x01(\x03R\x06profit\x12\x10\n" + + "\x03tax\x18\x06 \x01(\x03R\x03tax\x12\x18\n" + + "\abalance\x18\a \x01(\x03R\abalance\x12\x1b\n" + + "\twait_time\x18\b \x01(\x03R\bwaitTime\x12\x1f\n" + + "\vpre_balance\x18\t \x01(\x03R\n" + + "preBalance\x12\x1a\n" + + "\buserWins\x18\n" + + " \x03(\x03R\buserWins\x12\"\n" + + "\fuserRealWins\x18\v \x03(\x03R\fuserRealWins\x12\x1d\n" + + "\n" + + "start_time\x18\f \x01(\x03R\tstartTime\x12\x1a\n" + + "\bnickname\x18\r \x01(\tR\bnickname\x12\x16\n" + + "\x06avatar\x18\x0e \x01(\tR\x06avatar\x12\x1b\n" + + "\ttrans_bet\x18\x0f \x01(\x03R\btransBet\x12\x1b\n" + + "\ttrans_win\x18\x10 \x01(\x03R\btransWin\x12\x19\n" + + "\bdev_mode\x18\x11 \x01(\x05R\adevMode\x12\x12\n" + + "\x04odds\x18\x12 \x03(\x03R\x04odds\x12$\n" + + "\ruserBetsCount\x18\x13 \x03(\x03R\ruserBetsCount\x12\x1c\n" + + "\tisDiscard\x18\x14 \x01(\x05R\tisDiscard\x128\n" + + "\bareaOdds\x18\x15 \x03(\v2\x1c.pb.ColorPinoyLiveBetAreaOddR\bareaOdds\"\xa1\x04\n" + + "\x14ColorPinoyLiveDetail\x12,\n" + + "\x11winDoubleColorMul\x18\x01 \x03(\x03R\x11winDoubleColorMul\x12,\n" + + "\x11winSingleColorMul\x18\x02 \x03(\x03R\x11winSingleColorMul\x12\x14\n" + + "\x05bonus\x18\x03 \x01(\x03R\x05bonus\x12=\n" + + "\tthreeDice\x18\x04 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tthreeDice\x12=\n" + + "\tluckyDice\x18\x05 \x01(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tluckyDice\x12=\n" + + "\tstartDice\x18\x06 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tstartDice\x12\x1c\n" + + "\tresultImg\x18\a \x03(\tR\tresultImg\x12\x1e\n" + + "\n" + + "dealerName\x18\b \x03(\tR\n" + + "dealerName\x12<\n" + + "\n" + + "betAreaMul\x18\t \x03(\v2\x1c.pb.ColorPinoyLiveBetAreaOddR\n" + + "betAreaMul\x12&\n" + + "\x0ejackpotFunding\x18\n" + + " \x01(\x03R\x0ejackpotFunding\x12\x1a\n" + + "\bjackpotX\x18\v \x01(\x03R\bjackpotX\x12\x1a\n" + + "\bjackpotY\x18\f \x01(\x03R\bjackpotY\"\xa7\x04\n" + + "\x11ColorPinoyLiveEnd\x12\x17\n" + + "\agame_no\x18\x01 \x01(\tR\x06gameNo\x12\x1d\n" + + "\n" + + "start_time\x18\x02 \x01(\x03R\tstartTime\x12\x19\n" + + "\bend_time\x18\x03 \x01(\x03R\aendTime\x12\x14\n" + + "\x05level\x18\x04 \x01(\x05R\x05level\x12\x19\n" + + "\bbase_bet\x18\x05 \x01(\x03R\abaseBet\x12=\n" + + "\vplayer_data\x18\x06 \x03(\v2\x1c.pb.ColorPinoyLivePlayerDataR\n" + + "playerData\x12\x19\n" + + "\btax_rate\x18\a \x01(\x03R\ataxRate\x12\x1a\n" + + "\btotalBet\x18\b \x01(\x03R\btotalBet\x12\x1c\n" + + "\ttotalBets\x18\t \x03(\x03R\ttotalBets\x12$\n" + + "\rrealSystemWin\x18\n" + + " \x01(\x03R\rrealSystemWin\x12&\n" + + "\x0erealSystemWins\x18\v \x03(\x03R\x0erealSystemWins\x12\x10\n" + + "\x03tax\x18\f \x01(\x03R\x03tax\x12/\n" + + "\x04wins\x18\r \x03(\x0e2\x1b.pb.ColorPinoyLiveBetTypeJPR\x04wins\x12\x19\n" + + "\bop_token\x18\x0e \x01(\tR\aopToken\x120\n" + + "\x06detail\x18\x0f \x01(\v2\x18.pb.ColorPinoyLiveDetailR\x06detail\x12\x1c\n" + + "\tisDiscard\x18\x10 \x01(\x05R\tisDiscard\"\xde\x05\n" + + "\x16ColorPinoyLiveCommResp\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" + + "\x03msg\x18\x02 \x01(\tR\x03msg\x12\x16\n" + + "\x06gameId\x18\x03 \x01(\x05R\x06gameId\x12\x1e\n" + + "\n" + + "gameStatus\x18\x04 \x01(\x05R\n" + + "gameStatus\x12\x1c\n" + + "\tcountdown\x18\x05 \x01(\x03R\tcountdown\x12\x1e\n" + + "\n" + + "countdown2\x18\x06 \x01(\x03R\n" + + "countdown2\x12&\n" + + "\x0emaintainStatus\x18\a \x01(\x05R\x0emaintainStatus\x12 \n" + + "\vmaintainMsg\x18\b \x01(\tR\vmaintainMsg\x12=\n" + + "\tluckyStar\x18\t \x01(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tluckyStar\x12?\n" + + "\n" + + "drawResult\x18\n" + + " \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\n" + + "drawResult\x12\x14\n" + + "\x05times\x18\v \x03(\x03R\x05times\x126\n" + + "\brankList\x18\f \x01(\v2\x1a.pb.ColorPinoyLiveRankListR\brankList\x12=\n" + + "\tstartDice\x18\r \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tstartDice\x12\x1c\n" + + "\tresultImg\x18\x0e \x03(\tR\tresultImg\x12\x1e\n" + + "\n" + + "randomNext\x18\x0f \x01(\bR\n" + + "randomNext\x12\x16\n" + + "\x06gameNo\x18\x10 \x01(\tR\x06gameNo\x12\x1e\n" + + "\n" + + "dealerName\x18\x13 \x03(\tR\n" + + "dealerName\x12A\n" + + "\n" + + "betAreaMul\x18\x14 \x03(\v2!.pb.ColorPinoyLiveGameBetAreaInfoR\n" + + "betAreaMul\x12\x18\n" + + "\ajackpot\x18\x1e \x01(\x03R\ajackpot\"1\n" + + "\x17ColorPinoyLiveGetStatus\x12\x16\n" + + "\x06gameId\x18\x01 \x01(\x05R\x06gameId\"L\n" + + "\x13ColorPinoyLiveLucky\x125\n" + + "\x05Color\x18\x01 \x01(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\x05Color\"M\n" + + "\x14ColorPinoyLiveResult\x125\n" + + "\x05Color\x18\x01 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\x05Color\"X\n" + + "\x17ColorPinoyLiveStartDice\x12=\n" + + "\tstartDice\x18\x01 \x03(\x0e2\x1f.pb.ColorPinoyLiveDiceColorTypeR\tstartDice\"M\n" + + "\x17ColorPinoyLiveResultImg\x12\x1c\n" + + "\tresultImg\x18\x01 \x03(\tR\tresultImg\x12\x14\n" + + "\x05stage\x18\x02 \x01(\x05R\x05stage\"N\n" + + "\x16ColorPinoyLiveMaintain\x12\"\n" + + "\ftargetStatus\x18\x01 \x01(\x05R\ftargetStatus\x12\x10\n" + + "\x03msg\x18\x02 \x01(\tR\x03msg\"\xaa\x01\n" + + "\x16ColorPinoyLiveRankList\x12=\n" + + "\vplayer_data\x18\x01 \x03(\v2\x1c.pb.ColorPinoyLivePlayerDataR\n" + + "playerData\x12\x17\n" + + "\agame_no\x18\x02 \x01(\tR\x06gameNo\x12\x1d\n" + + "\n" + + "start_time\x18\x03 \x01(\x03R\tstartTime\x12\x19\n" + + "\bend_time\x18\x04 \x01(\x03R\aendTime\"9\n" + + "\x17ColorPinoyLiveSetDealer\x12\x1e\n" + + "\n" + + "dealerName\x18\x01 \x03(\tR\n" + + "dealerName*\xeb\x01\n" + + "\x1bColorPinoyLiveDiceColorType\x12\x1b\n" + + "\x17ColorPinoyLiveType_Void\x10\x00\x12\x1d\n" + + "\x19ColorPinoyLiveType_YELLOW\x10\x01\x12\x1c\n" + + "\x18ColorPinoyLiveType_WHITE\x10\x02\x12\x1b\n" + + "\x17ColorPinoyLiveType_PINK\x10\x03\x12\x1b\n" + + "\x17ColorPinoyLiveType_BLUE\x10\x04\x12\x1a\n" + + "\x16ColorPinoyLiveType_RED\x10\x05\x12\x1c\n" + + "\x18ColorPinoyLiveType_GREEN\x10\x06*\xec\x02\n" + + "\x17ColorPinoyLiveBetTypeJP\x12\x0e\n" + + "\n" + + "CLJ_Yellow\x10\x00\x12\r\n" + + "\tCLJ_White\x10\x01\x12\f\n" + + "\bCLJ_Pink\x10\x02\x12\f\n" + + "\bCLJ_Blue\x10\x03\x12\v\n" + + "\aCLJ_Red\x10\x04\x12\r\n" + + "\tCLJ_Green\x10\x05\x12\x15\n" + + "\x11CLJ_Double_Yellow\x10\x06\x12\x14\n" + + "\x10CLJ_Double_White\x10\a\x12\x13\n" + + "\x0fCLJ_Double_Pink\x10\b\x12\x13\n" + + "\x0fCLJ_Double_Blue\x10\t\x12\x12\n" + + "\x0eCLJ_Double_Red\x10\n" + + "\x12\x14\n" + + "\x10CLJ_Double_Green\x10\v\x12\x14\n" + + "\x10CLJ_Three_Yellow\x10\f\x12\x13\n" + + "\x0fCLJ_Three_White\x10\r\x12\x12\n" + + "\x0eCLJ_Three_Pink\x10\x0e\x12\x12\n" + + "\x0eCLJ_Three_Blue\x10\x0f\x12\x11\n" + + "\rCLJ_Three_Red\x10\x10\x12\x13\n" + + "\x0fCLJ_Three_Green\x10\x11*\x91\x02\n" + + "\x18ColorPinoyLiveGameStatus\x12\x1e\n" + + "\x1aColorPinoyLiveStartUnReady\x10\x00\x12\x1c\n" + + "\x18ColorPinoyLiveStartReady\x10\x01\x12\x1c\n" + + "\x18ColorPinoyLiveStartMovie\x10\x02\x12\x1b\n" + + "\x17ColorPinoyLiveBetStatus\x10\x03\x12\x1d\n" + + "\x19ColorPinoyLiveEndBetMovie\x10\x04\x12\x1f\n" + + "\x1bColorPinoyLiveOpenThreeDice\x10\x06\x12\x1e\n" + + "\x1aColorPinoyLiveSettleStatus\x10\a\x12\x1c\n" + + "\x18ColorPinoyLiveRankStatus\x10\b*\xe9\x01\n" + + "\x19ColorPinoyLiveLeaveReason\x12\"\n" + + "\x1eColorPinoyLiveLeaveReason_void\x10\x00\x12.\n" + + "*ColorPinoyLiveLeaveReason_PLAYER_QUIT_ROOM\x10\x02\x12(\n" + + "$ColorPinoyLiveLeaveReason_Maintaince\x10\x14\x12+\n" + + "'ColorPinoyLiveLeaveReason_Server_Update\x10\x15\x12!\n" + + "\x1dColorPinoyLiveLeaveReason_Ban\x10\x16*r\n" + + "\x1bColorPinoyLiveBigBetAreaPos\x12\x10\n" + + "\fBBA_Single_0\x10\x00\x12\x10\n" + + "\fBBA_Single_1\x10\x01\x12\x10\n" + + "\fBBA_Single_2\x10\x02\x12\x0e\n" + + "\n" + + "BBA_Double\x10\x03\x12\r\n" + + "\tBBA_Three\x10\x04*j\n" + + "\x16ColorPinoyLiveUndoType\x12\x1a\n" + + "\x16ColorPinoyLiveUndoVoid\x10\x00\x12\x19\n" + + "\x15ColorPinoyLiveUndoOne\x10\x01\x12\x19\n" + + "\x15ColorPinoyLiveUndoAll\x10\x02*\xd1\x04\n" + + "\x18ColorPinoyLiveProcessCmd\x12\x16\n" + + "\x12ColorPinoyLiveVoid\x10\x00\x12#\n" + + "\x1eColorPinoyLiveMSGGameGetStatus\x10\xac\x02\x12\x1b\n" + + "\x16ColorPinoyLiveMSGReady\x10\xad\x02\x12\x1d\n" + + "\x18ColorPinoyLiveMSGBetting\x10\xae\x02\x12\x1b\n" + + "\x16ColorPinoyLiveMSGLucky\x10\xaf\x02\x12\x1c\n" + + "\x17ColorPinoyLiveMSGResult\x10\xb0\x02\x12\x1c\n" + + "\x17ColorPinoyLiveMSGSettle\x10\xb1\x02\x12\x1a\n" + + "\x15ColorPinoyLiveMSGRank\x10\xb2\x02\x12 \n" + + "\x1bColorPinoyLiveMSGMMainteSet\x10\xb3\x02\x12\x1e\n" + + "\x19ColorPinoyLiveMSGMDiscard\x10\xb4\x02\x12\x1f\n" + + "\x1aColorPinoyLiveMSGMRankList\x10\xb5\x02\x12\x1d\n" + + "\x18ColorPinoyLiveMSGMEndBet\x10\xb6\x02\x12 \n" + + "\x1bColorPinoyLiveMSGMStartDice\x10\xb7\x02\x12 \n" + + "\x1bColorPinoyLiveMSGMResultImg\x10\xb8\x02\x12!\n" + + "\x1cColorPinoyLiveMSGMSyncNotify\x10\x90\x03\x12\x1b\n" + + "\x16ColorPinoyLiveMSGMChat\x10\x91\x03\x12 \n" + + "\x1bColorPinoyLiveMSGLiveConfig\x10\x92\x03\x12\x1f\n" + + "\x1aColorPinoyLiveMSGSetDealer\x10\x93\x03*8\n" + + "\x11ColorPinoyLiveCmd\x12#\n" + + "\x1fColorPinoyLiveCmdMSGMRandomNext\x10\x00*\xb9\x01\n" + + "\x1aColorPinoyLiveProcessError\x12\"\n" + + "\x1eColorPinoyLiveProcessErrorVoid\x10\x00\x12'\n" + + "#ColorPinoyLiveProcessErrorGameSatus\x10\x01\x12*\n" + + "&ColorPinoyLiveProcessErrorMainteStatus\x10\x02\x12\"\n" + + "\x1eColorPinoyLiveProcessErrorDice\x10\x03B\x11Z\x0fcommon/proto/pbb\x06proto3" -var file_colorgame_proto_goTypes = []any{} +var ( + file_colorgame_proto_rawDescOnce sync.Once + file_colorgame_proto_rawDescData []byte +) + +func file_colorgame_proto_rawDescGZIP() []byte { + file_colorgame_proto_rawDescOnce.Do(func() { + file_colorgame_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_colorgame_proto_rawDesc), len(file_colorgame_proto_rawDesc))) + }) + return file_colorgame_proto_rawDescData +} + +var file_colorgame_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_colorgame_proto_msgTypes = make([]protoimpl.MessageInfo, 57) +var file_colorgame_proto_goTypes = []any{ + (ColorPinoyLiveDiceColorType)(0), // 0: pb.ColorPinoyLiveDiceColorType + (ColorPinoyLiveBetTypeJP)(0), // 1: pb.ColorPinoyLiveBetTypeJP + (ColorPinoyLiveGameStatus)(0), // 2: pb.ColorPinoyLiveGameStatus + (ColorPinoyLiveLeaveReason)(0), // 3: pb.ColorPinoyLiveLeaveReason + (ColorPinoyLiveBigBetAreaPos)(0), // 4: pb.ColorPinoyLiveBigBetAreaPos + (ColorPinoyLiveUndoType)(0), // 5: pb.ColorPinoyLiveUndoType + (ColorPinoyLiveProcessCmd)(0), // 6: pb.ColorPinoyLiveProcessCmd + (ColorPinoyLiveCmd)(0), // 7: pb.ColorPinoyLiveCmd + (ColorPinoyLiveProcessError)(0), // 8: pb.ColorPinoyLiveProcessError + (*ColorRoomInfo)(nil), // 9: pb.ColorRoomInfo + (*ColorPinoyLiveStatusMessage)(nil), // 10: pb.ColorPinoyLiveStatusMessage + (*ColorPinoyLiveGameOpenThreeDice)(nil), // 11: pb.ColorPinoyLiveGameOpenThreeDice + (*ColorPinoyLiveBetReq)(nil), // 12: pb.ColorPinoyLiveBetReq + (*ColorPinoyLiveBetReqs)(nil), // 13: pb.ColorPinoyLiveBetReqs + (*ColorPinoyLiveBetResp)(nil), // 14: pb.ColorPinoyLiveBetResp + (*ColorPinoyLiveSeatUser)(nil), // 15: pb.ColorPinoyLiveSeatUser + (*ColorPinoyLiveS2COnlinePlayerNum)(nil), // 16: pb.ColorPinoyLiveS2COnlinePlayerNum + (*ColorPinoyLivePlayerBigWinner)(nil), // 17: pb.ColorPinoyLivePlayerBigWinner + (*ColorPinoyLiveSceneBetInfo)(nil), // 18: pb.ColorPinoyLiveSceneBetInfo + (*ColorPinoyLiveBetArr)(nil), // 19: pb.ColorPinoyLiveBetArr + (*ColorPinoyLiveRoomBetRuleMsg)(nil), // 20: pb.ColorPinoyLiveRoomBetRuleMsg + (*ColorPinoyLiveTrendGroup)(nil), // 21: pb.ColorPinoyLiveTrendGroup + (*ColorPinoyLiveTrend)(nil), // 22: pb.ColorPinoyLiveTrend + (*TRTCRoomArgs)(nil), // 23: pb.TRTCRoomArgs + (*ColorPinoyLiveBigWinner)(nil), // 24: pb.ColorPinoyLiveBigWinner + (*BetAreaMulRangeConfig)(nil), // 25: pb.BetAreaMulRangeConfig + (*SceneMessage)(nil), // 26: pb.SceneMessage + (*ColorPinoyLiveUserSitDown)(nil), // 27: pb.ColorPinoyLiveUserSitDown + (*ColorPinoyLiveUserSitDownFail)(nil), // 28: pb.ColorPinoyLiveUserSitDownFail + (*ColorPinoyLiveBetAreaOdd)(nil), // 29: pb.ColorPinoyLiveBetAreaOdd + (*ColorPinoyLivePokerMsg)(nil), // 30: pb.ColorPinoyLivePokerMsg + (*ColorPinoyLiveUserInfo)(nil), // 31: pb.ColorPinoyLiveUserInfo + (*ColorPinoyLiveUserList)(nil), // 32: pb.ColorPinoyLiveUserList + (*ColorPinoyLiveUserSettleMsg)(nil), // 33: pb.ColorPinoyLiveUserSettleMsg + (*ColorPinoyLiveGameBetAreaUserInfo)(nil), // 34: pb.ColorPinoyLiveGameBetAreaUserInfo + (*ColorPinoyLiveGameBetAreaInfo)(nil), // 35: pb.ColorPinoyLiveGameBetAreaInfo + (*ColorPinoyLiveSceneUserInfo)(nil), // 36: pb.ColorPinoyLiveSceneUserInfo + (*ColorPinoyLiveSceneSettleMsg)(nil), // 37: pb.ColorPinoyLiveSceneSettleMsg + (*ColorPinoyLiveKickOutUserMsg)(nil), // 38: pb.ColorPinoyLiveKickOutUserMsg + (*ColorPinoyLiveUpdateRoomInfoMsg)(nil), // 39: pb.ColorPinoyLiveUpdateRoomInfoMsg + (*ColorPinoyLivetempCardMsg)(nil), // 40: pb.ColorPinoyLivetempCardMsg + (*ColorPinoyLiveBetSuccessMessage)(nil), // 41: pb.ColorPinoyLiveBetSuccessMessage + (*ColorPinoyLiveS2CRepetBet)(nil), // 42: pb.ColorPinoyLiveS2CRepetBet + (*ColorPinoyLiveS2CNoChairRepetBet)(nil), // 43: pb.ColorPinoyLiveS2CNoChairRepetBet + (*ColorPinoyLiveC2SBetDouble)(nil), // 44: pb.ColorPinoyLiveC2SBetDouble + (*ColorPinoyLiveC2SUndoBet)(nil), // 45: pb.ColorPinoyLiveC2SUndoBet + (*S2CUndoBet)(nil), // 46: pb.S2CUndoBet + (*ColorPinoyLiveNtfBigOddBetArea)(nil), // 47: pb.ColorPinoyLiveNtfBigOddBetArea + (*ColorPinoyLiveMainteNtf)(nil), // 48: pb.ColorPinoyLiveMainteNtf + (*ColorPinoyLiveS2CBetEndFailResult)(nil), // 49: pb.ColorPinoyLiveS2CBetEndFailResult + (*ColorPinoyLiveApplyPropsReq)(nil), // 50: pb.ColorPinoyLiveApplyPropsReq + (*ColorPinoyLivePlayerPropsResp)(nil), // 51: pb.ColorPinoyLivePlayerPropsResp + (*ColorPinoyLiveLeaveResp)(nil), // 52: pb.ColorPinoyLiveLeaveResp + (*ColorPinoyLiveDealerName)(nil), // 53: pb.ColorPinoyLiveDealerName + (*ColorPinoyLivePlayerData)(nil), // 54: pb.ColorPinoyLivePlayerData + (*ColorPinoyLiveDetail)(nil), // 55: pb.ColorPinoyLiveDetail + (*ColorPinoyLiveEnd)(nil), // 56: pb.ColorPinoyLiveEnd + (*ColorPinoyLiveCommResp)(nil), // 57: pb.ColorPinoyLiveCommResp + (*ColorPinoyLiveGetStatus)(nil), // 58: pb.ColorPinoyLiveGetStatus + (*ColorPinoyLiveLucky)(nil), // 59: pb.ColorPinoyLiveLucky + (*ColorPinoyLiveResult)(nil), // 60: pb.ColorPinoyLiveResult + (*ColorPinoyLiveStartDice)(nil), // 61: pb.ColorPinoyLiveStartDice + (*ColorPinoyLiveResultImg)(nil), // 62: pb.ColorPinoyLiveResultImg + (*ColorPinoyLiveMaintain)(nil), // 63: pb.ColorPinoyLiveMaintain + (*ColorPinoyLiveRankList)(nil), // 64: pb.ColorPinoyLiveRankList + (*ColorPinoyLiveSetDealer)(nil), // 65: pb.ColorPinoyLiveSetDealer +} var file_colorgame_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 0, // 0: pb.ColorPinoyLiveGameOpenThreeDice.color:type_name -> pb.ColorPinoyLiveDiceColorType + 1, // 1: pb.ColorPinoyLiveBetReq.BetType:type_name -> pb.ColorPinoyLiveBetTypeJP + 12, // 2: pb.ColorPinoyLiveBetReqs.info:type_name -> pb.ColorPinoyLiveBetReq + 24, // 3: pb.ColorPinoyLivePlayerBigWinner.bigBet:type_name -> pb.ColorPinoyLiveBigWinner + 31, // 4: pb.ColorPinoyLiveSceneBetInfo.UserInfo:type_name -> pb.ColorPinoyLiveUserInfo + 19, // 5: pb.ColorPinoyLiveRoomBetRuleMsg.betLevels:type_name -> pb.ColorPinoyLiveBetArr + 25, // 6: pb.ColorPinoyLiveRoomBetRuleMsg.mulRangeConfig:type_name -> pb.BetAreaMulRangeConfig + 0, // 7: pb.ColorPinoyLiveTrendGroup.luckyDice:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 8: pb.ColorPinoyLiveTrendGroup.threeDice:type_name -> pb.ColorPinoyLiveDiceColorType + 21, // 9: pb.ColorPinoyLiveTrend.listTrendGroup:type_name -> pb.ColorPinoyLiveTrendGroup + 4, // 10: pb.BetAreaMulRangeConfig.pos:type_name -> pb.ColorPinoyLiveBigBetAreaPos + 10, // 11: pb.SceneMessage.gameStatus:type_name -> pb.ColorPinoyLiveStatusMessage + 22, // 12: pb.SceneMessage.trendList:type_name -> pb.ColorPinoyLiveTrend + 0, // 13: pb.SceneMessage.luckyDice:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 14: pb.SceneMessage.threeDice:type_name -> pb.ColorPinoyLiveDiceColorType + 35, // 15: pb.SceneMessage.betAreaInfo:type_name -> pb.ColorPinoyLiveGameBetAreaInfo + 20, // 16: pb.SceneMessage.betRule:type_name -> pb.ColorPinoyLiveRoomBetRuleMsg + 13, // 17: pb.SceneMessage.lastTimeBet:type_name -> pb.ColorPinoyLiveBetReqs + 54, // 18: pb.SceneMessage.rankList:type_name -> pb.ColorPinoyLivePlayerData + 23, // 19: pb.SceneMessage.trtcRoomArgs:type_name -> pb.TRTCRoomArgs + 24, // 20: pb.SceneMessage.bigWinner:type_name -> pb.ColorPinoyLiveBigWinner + 25, // 21: pb.SceneMessage.mulRangeConfig:type_name -> pb.BetAreaMulRangeConfig + 1, // 22: pb.ColorPinoyLiveBetAreaOdd.betArea:type_name -> pb.ColorPinoyLiveBetTypeJP + 4, // 23: pb.ColorPinoyLiveBetAreaOdd.bigSingleColorOddPos:type_name -> pb.ColorPinoyLiveBigBetAreaPos + 29, // 24: pb.ColorPinoyLivePokerMsg.winBetArea:type_name -> pb.ColorPinoyLiveBetAreaOdd + 31, // 25: pb.ColorPinoyLiveUserList.UserList:type_name -> pb.ColorPinoyLiveUserInfo + 29, // 26: pb.ColorPinoyLiveUserSettleMsg.winAreaOdd:type_name -> pb.ColorPinoyLiveBetAreaOdd + 1, // 27: pb.ColorPinoyLiveGameBetAreaInfo.betType:type_name -> pb.ColorPinoyLiveBetTypeJP + 34, // 28: pb.ColorPinoyLiveGameBetAreaInfo.betChipsInfo:type_name -> pb.ColorPinoyLiveGameBetAreaUserInfo + 4, // 29: pb.ColorPinoyLiveGameBetAreaInfo.bigSingleColorOddPos:type_name -> pb.ColorPinoyLiveBigBetAreaPos + 35, // 30: pb.ColorPinoyLiveSceneSettleMsg.betAreaInfo:type_name -> pb.ColorPinoyLiveGameBetAreaInfo + 36, // 31: pb.ColorPinoyLiveSceneSettleMsg.selfWinInfo:type_name -> pb.ColorPinoyLiveSceneUserInfo + 0, // 32: pb.ColorPinoyLiveSceneSettleMsg.luckyDice:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 33: pb.ColorPinoyLiveSceneSettleMsg.threeDice:type_name -> pb.ColorPinoyLiveDiceColorType + 21, // 34: pb.ColorPinoyLiveSceneSettleMsg.trendGroup:type_name -> pb.ColorPinoyLiveTrendGroup + 13, // 35: pb.ColorPinoyLiveSceneSettleMsg.lastTimeBet:type_name -> pb.ColorPinoyLiveBetReqs + 22, // 36: pb.ColorPinoyLiveSceneSettleMsg.trendGroupEx:type_name -> pb.ColorPinoyLiveTrend + 24, // 37: pb.ColorPinoyLiveSceneSettleMsg.bigWinner:type_name -> pb.ColorPinoyLiveBigWinner + 1, // 38: pb.ColorPinoyLiveBetSuccessMessage.BetType:type_name -> pb.ColorPinoyLiveBetTypeJP + 41, // 39: pb.ColorPinoyLiveS2CRepetBet.betInfo:type_name -> pb.ColorPinoyLiveBetSuccessMessage + 41, // 40: pb.ColorPinoyLiveS2CNoChairRepetBet.betInfo:type_name -> pb.ColorPinoyLiveBetSuccessMessage + 5, // 41: pb.ColorPinoyLiveC2SUndoBet.undoType:type_name -> pb.ColorPinoyLiveUndoType + 5, // 42: pb.S2CUndoBet.undoType:type_name -> pb.ColorPinoyLiveUndoType + 41, // 43: pb.S2CUndoBet.betInfo:type_name -> pb.ColorPinoyLiveBetSuccessMessage + 35, // 44: pb.ColorPinoyLiveNtfBigOddBetArea.betAreas:type_name -> pb.ColorPinoyLiveGameBetAreaInfo + 31, // 45: pb.ColorPinoyLiveMainteNtf.userInfo:type_name -> pb.ColorPinoyLiveUserInfo + 42, // 46: pb.ColorPinoyLiveS2CBetEndFailResult.players:type_name -> pb.ColorPinoyLiveS2CRepetBet + 29, // 47: pb.ColorPinoyLivePlayerData.areaOdds:type_name -> pb.ColorPinoyLiveBetAreaOdd + 0, // 48: pb.ColorPinoyLiveDetail.threeDice:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 49: pb.ColorPinoyLiveDetail.luckyDice:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 50: pb.ColorPinoyLiveDetail.startDice:type_name -> pb.ColorPinoyLiveDiceColorType + 29, // 51: pb.ColorPinoyLiveDetail.betAreaMul:type_name -> pb.ColorPinoyLiveBetAreaOdd + 54, // 52: pb.ColorPinoyLiveEnd.player_data:type_name -> pb.ColorPinoyLivePlayerData + 1, // 53: pb.ColorPinoyLiveEnd.wins:type_name -> pb.ColorPinoyLiveBetTypeJP + 55, // 54: pb.ColorPinoyLiveEnd.detail:type_name -> pb.ColorPinoyLiveDetail + 0, // 55: pb.ColorPinoyLiveCommResp.luckyStar:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 56: pb.ColorPinoyLiveCommResp.drawResult:type_name -> pb.ColorPinoyLiveDiceColorType + 64, // 57: pb.ColorPinoyLiveCommResp.rankList:type_name -> pb.ColorPinoyLiveRankList + 0, // 58: pb.ColorPinoyLiveCommResp.startDice:type_name -> pb.ColorPinoyLiveDiceColorType + 35, // 59: pb.ColorPinoyLiveCommResp.betAreaMul:type_name -> pb.ColorPinoyLiveGameBetAreaInfo + 0, // 60: pb.ColorPinoyLiveLucky.Color:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 61: pb.ColorPinoyLiveResult.Color:type_name -> pb.ColorPinoyLiveDiceColorType + 0, // 62: pb.ColorPinoyLiveStartDice.startDice:type_name -> pb.ColorPinoyLiveDiceColorType + 54, // 63: pb.ColorPinoyLiveRankList.player_data:type_name -> pb.ColorPinoyLivePlayerData + 64, // [64:64] is the sub-list for method output_type + 64, // [64:64] is the sub-list for method input_type + 64, // [64:64] is the sub-list for extension type_name + 64, // [64:64] is the sub-list for extension extendee + 0, // [0:64] is the sub-list for field type_name } func init() { file_colorgame_proto_init() } @@ -45,13 +5279,15 @@ func file_colorgame_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_colorgame_proto_rawDesc), len(file_colorgame_proto_rawDesc)), - NumEnums: 0, - NumMessages: 0, + NumEnums: 9, + NumMessages: 57, NumExtensions: 0, NumServices: 0, }, GoTypes: file_colorgame_proto_goTypes, DependencyIndexes: file_colorgame_proto_depIdxs, + EnumInfos: file_colorgame_proto_enumTypes, + MessageInfos: file_colorgame_proto_msgTypes, }.Build() File_colorgame_proto = out.File file_colorgame_proto_goTypes = nil diff --git a/common/proto/pb/msgId.pb.go b/common/proto/pb/msgId.pb.go index bf23e4a..1c09337 100644 --- a/common/proto/pb/msgId.pb.go +++ b/common/proto/pb/msgId.pb.go @@ -44,6 +44,40 @@ const ( MsgId_C2SMatchRoomId MsgId = 2200 // 匹配服 MsgId_S2CMatchRoomId MsgId = 2201 MsgId_NtfUserEnterRoomId MsgId = 2202 // 玩家进入房间 所有玩法共用此消息 + // color game 2300-2499 + MsgId_ColorPinoyLiveNoticeGameSync MsgId = 201 + MsgId_ColorPinoyLiveNoticeGameReady MsgId = 202 + MsgId_ColorPinoyLiveNoticeGameStart MsgId = 203 + MsgId_ColorPinoyLiveNoticeGameStartBet MsgId = 204 + MsgId_ColorPinoyLiveNoticeGameEndBet MsgId = 205 + MsgId_ColorPinoyLiveNoticeGameOpenLuckyDice MsgId = 206 + MsgId_ColorPinoyLiveNoticeGameOpenThreeDice MsgId = 207 + MsgId_ColorPinoyLiveNoticeGameUserSettle MsgId = 208 // 用户自己结算返回 + MsgId_ColorPinoyLiveNoticeGameSettle MsgId = 209 // 广播本局结算信息 + MsgId_ColorPinoyLiveNoticeGameSeatUserBet MsgId = 210 // 广播座位上的玩家下注信息 + MsgId_ColorPinoyLiveNoticeGameUserBet MsgId = 211 // 玩家下注成功返回 + MsgId_ColorPinoyLiveNoticeGameTrendInfo MsgId = 212 // 走势图 + MsgId_ColorPinoyLiveNoticePlayerLeaveNtf MsgId = 213 // 离开广播 + MsgId_ColorPinoyLiveNoticeOnlinePlayerNum MsgId = 214 // 在线玩家数量 + MsgId_ColorPinoyLiveNoticeUpdateRoomInfo MsgId = 215 // 更新房间信息 1秒一次 + MsgId_ColorPinoyLiveNoticeUndoBet MsgId = 216 // 撤销下注 + MsgId_ColorPinoyLiveNoticeBetFail MsgId = 217 // 下注失败 撤销下注失败 ... + MsgId_ColorPinoyLiveNoticeKickOutUser MsgId = 218 // 踢出玩家发送原因 + MsgId_ColorPinoyLiveNoticeRoomBetRuleMsg MsgId = 219 // 推送玩家下注规则 + MsgId_ColorPinoyLiveNoticePlayerUseProps MsgId = 220 // 推送玩家使用道具 + MsgId_ColorPinoyLiveNoticePlayerBetEndResultFailed MsgId = 221 // 推送玩家结束下注时扣钱失败 + MsgId_ColorPinoyLiveNoticeGameMainte MsgId = 222 // 推送游戏维护 ColorPinoyLiveMainteNtf + MsgId_ColorPinoyLiveNoticeDiscard MsgId = 223 // 推送废弃 ColorPinoyLiveMainteNtf + MsgId_ColorPinoyLiveNoticeRankList MsgId = 224 // 推送排行榜 ColorPinoyLiveRankList + MsgId_ColorPinoyLiveNoticeGameBigWinner MsgId = 225 // 大客投注信息 + MsgId_ColorPinoyLiveNoticeDealerName MsgId = 226 // 设置或清空主播名字 + MsgId_ColorPinoyLiveNoticeBigOddBetArea MsgId = 228 // 下注结束后更新区域爆奖信息 + MsgId_ColorPinoyLiveApplyBetChips MsgId = 101 // 下注信息 + MsgId_ColorPinoyLiveApplyGetTrend MsgId = 102 //获取走势图 + MsgId_ColorPinoyLiveApplyBetDouble MsgId = 104 //一键翻倍押注 + MsgId_ColorPinoyLiveApplyUndoBet MsgId = 105 //撤回押注 + MsgId_ColorPinoyLiveApplyLeave MsgId = 107 //申请离开 + MsgId_ColorPinoyLiveApplyBetAgain MsgId = 108 //申请重复下注 ) // Enum value maps for MsgId. @@ -62,21 +96,87 @@ var ( 2200: "C2SMatchRoomId", 2201: "S2CMatchRoomId", 2202: "NtfUserEnterRoomId", + 201: "ColorPinoyLiveNoticeGameSync", + 202: "ColorPinoyLiveNoticeGameReady", + 203: "ColorPinoyLiveNoticeGameStart", + 204: "ColorPinoyLiveNoticeGameStartBet", + 205: "ColorPinoyLiveNoticeGameEndBet", + 206: "ColorPinoyLiveNoticeGameOpenLuckyDice", + 207: "ColorPinoyLiveNoticeGameOpenThreeDice", + 208: "ColorPinoyLiveNoticeGameUserSettle", + 209: "ColorPinoyLiveNoticeGameSettle", + 210: "ColorPinoyLiveNoticeGameSeatUserBet", + 211: "ColorPinoyLiveNoticeGameUserBet", + 212: "ColorPinoyLiveNoticeGameTrendInfo", + 213: "ColorPinoyLiveNoticePlayerLeaveNtf", + 214: "ColorPinoyLiveNoticeOnlinePlayerNum", + 215: "ColorPinoyLiveNoticeUpdateRoomInfo", + 216: "ColorPinoyLiveNoticeUndoBet", + 217: "ColorPinoyLiveNoticeBetFail", + 218: "ColorPinoyLiveNoticeKickOutUser", + 219: "ColorPinoyLiveNoticeRoomBetRuleMsg", + 220: "ColorPinoyLiveNoticePlayerUseProps", + 221: "ColorPinoyLiveNoticePlayerBetEndResultFailed", + 222: "ColorPinoyLiveNoticeGameMainte", + 223: "ColorPinoyLiveNoticeDiscard", + 224: "ColorPinoyLiveNoticeRankList", + 225: "ColorPinoyLiveNoticeGameBigWinner", + 226: "ColorPinoyLiveNoticeDealerName", + 228: "ColorPinoyLiveNoticeBigOddBetArea", + 101: "ColorPinoyLiveApplyBetChips", + 102: "ColorPinoyLiveApplyGetTrend", + 104: "ColorPinoyLiveApplyBetDouble", + 105: "ColorPinoyLiveApplyUndoBet", + 107: "ColorPinoyLiveApplyLeave", + 108: "ColorPinoyLiveApplyBetAgain", } MsgId_value = map[string]int32{ - "MI_Unknown": 0, - "NtfMaintainId": 1000, - "C2SChatId": 2000, - "S2CChatId": 2001, - "C2SUserLoginId": 2100, - "S2CUserLoginId": 2101, - "NtfUserOnlineId": 2102, - "C2SUserLogoutId": 2104, - "S2CUserLogoutId": 2105, - "NtfUserOfflineId": 2106, - "C2SMatchRoomId": 2200, - "S2CMatchRoomId": 2201, - "NtfUserEnterRoomId": 2202, + "MI_Unknown": 0, + "NtfMaintainId": 1000, + "C2SChatId": 2000, + "S2CChatId": 2001, + "C2SUserLoginId": 2100, + "S2CUserLoginId": 2101, + "NtfUserOnlineId": 2102, + "C2SUserLogoutId": 2104, + "S2CUserLogoutId": 2105, + "NtfUserOfflineId": 2106, + "C2SMatchRoomId": 2200, + "S2CMatchRoomId": 2201, + "NtfUserEnterRoomId": 2202, + "ColorPinoyLiveNoticeGameSync": 201, + "ColorPinoyLiveNoticeGameReady": 202, + "ColorPinoyLiveNoticeGameStart": 203, + "ColorPinoyLiveNoticeGameStartBet": 204, + "ColorPinoyLiveNoticeGameEndBet": 205, + "ColorPinoyLiveNoticeGameOpenLuckyDice": 206, + "ColorPinoyLiveNoticeGameOpenThreeDice": 207, + "ColorPinoyLiveNoticeGameUserSettle": 208, + "ColorPinoyLiveNoticeGameSettle": 209, + "ColorPinoyLiveNoticeGameSeatUserBet": 210, + "ColorPinoyLiveNoticeGameUserBet": 211, + "ColorPinoyLiveNoticeGameTrendInfo": 212, + "ColorPinoyLiveNoticePlayerLeaveNtf": 213, + "ColorPinoyLiveNoticeOnlinePlayerNum": 214, + "ColorPinoyLiveNoticeUpdateRoomInfo": 215, + "ColorPinoyLiveNoticeUndoBet": 216, + "ColorPinoyLiveNoticeBetFail": 217, + "ColorPinoyLiveNoticeKickOutUser": 218, + "ColorPinoyLiveNoticeRoomBetRuleMsg": 219, + "ColorPinoyLiveNoticePlayerUseProps": 220, + "ColorPinoyLiveNoticePlayerBetEndResultFailed": 221, + "ColorPinoyLiveNoticeGameMainte": 222, + "ColorPinoyLiveNoticeDiscard": 223, + "ColorPinoyLiveNoticeRankList": 224, + "ColorPinoyLiveNoticeGameBigWinner": 225, + "ColorPinoyLiveNoticeDealerName": 226, + "ColorPinoyLiveNoticeBigOddBetArea": 228, + "ColorPinoyLiveApplyBetChips": 101, + "ColorPinoyLiveApplyGetTrend": 102, + "ColorPinoyLiveApplyBetDouble": 104, + "ColorPinoyLiveApplyUndoBet": 105, + "ColorPinoyLiveApplyLeave": 107, + "ColorPinoyLiveApplyBetAgain": 108, } ) @@ -111,7 +211,7 @@ var File_msgId_proto protoreflect.FileDescriptor const file_msgId_proto_rawDesc = "" + "\n" + - "\vmsgId.proto\x12\x02pb*\x91\x02\n" + + "\vmsgId.proto\x12\x02pb*\xf3\v\n" + "\x05MsgId\x12\x0e\n" + "\n" + "MI_Unknown\x10\x00\x12\x12\n" + @@ -126,7 +226,40 @@ const file_msgId_proto_rawDesc = "" + "\x10NtfUserOfflineId\x10\xba\x10\x12\x13\n" + "\x0eC2SMatchRoomId\x10\x98\x11\x12\x13\n" + "\x0eS2CMatchRoomId\x10\x99\x11\x12\x17\n" + - "\x12NtfUserEnterRoomId\x10\x9a\x11B\x11Z\x0fcommon/proto/pbb\x06proto3" + "\x12NtfUserEnterRoomId\x10\x9a\x11\x12!\n" + + "\x1cColorPinoyLiveNoticeGameSync\x10\xc9\x01\x12\"\n" + + "\x1dColorPinoyLiveNoticeGameReady\x10\xca\x01\x12\"\n" + + "\x1dColorPinoyLiveNoticeGameStart\x10\xcb\x01\x12%\n" + + " ColorPinoyLiveNoticeGameStartBet\x10\xcc\x01\x12#\n" + + "\x1eColorPinoyLiveNoticeGameEndBet\x10\xcd\x01\x12*\n" + + "%ColorPinoyLiveNoticeGameOpenLuckyDice\x10\xce\x01\x12*\n" + + "%ColorPinoyLiveNoticeGameOpenThreeDice\x10\xcf\x01\x12'\n" + + "\"ColorPinoyLiveNoticeGameUserSettle\x10\xd0\x01\x12#\n" + + "\x1eColorPinoyLiveNoticeGameSettle\x10\xd1\x01\x12(\n" + + "#ColorPinoyLiveNoticeGameSeatUserBet\x10\xd2\x01\x12$\n" + + "\x1fColorPinoyLiveNoticeGameUserBet\x10\xd3\x01\x12&\n" + + "!ColorPinoyLiveNoticeGameTrendInfo\x10\xd4\x01\x12'\n" + + "\"ColorPinoyLiveNoticePlayerLeaveNtf\x10\xd5\x01\x12(\n" + + "#ColorPinoyLiveNoticeOnlinePlayerNum\x10\xd6\x01\x12'\n" + + "\"ColorPinoyLiveNoticeUpdateRoomInfo\x10\xd7\x01\x12 \n" + + "\x1bColorPinoyLiveNoticeUndoBet\x10\xd8\x01\x12 \n" + + "\x1bColorPinoyLiveNoticeBetFail\x10\xd9\x01\x12$\n" + + "\x1fColorPinoyLiveNoticeKickOutUser\x10\xda\x01\x12'\n" + + "\"ColorPinoyLiveNoticeRoomBetRuleMsg\x10\xdb\x01\x12'\n" + + "\"ColorPinoyLiveNoticePlayerUseProps\x10\xdc\x01\x121\n" + + ",ColorPinoyLiveNoticePlayerBetEndResultFailed\x10\xdd\x01\x12#\n" + + "\x1eColorPinoyLiveNoticeGameMainte\x10\xde\x01\x12 \n" + + "\x1bColorPinoyLiveNoticeDiscard\x10\xdf\x01\x12!\n" + + "\x1cColorPinoyLiveNoticeRankList\x10\xe0\x01\x12&\n" + + "!ColorPinoyLiveNoticeGameBigWinner\x10\xe1\x01\x12#\n" + + "\x1eColorPinoyLiveNoticeDealerName\x10\xe2\x01\x12&\n" + + "!ColorPinoyLiveNoticeBigOddBetArea\x10\xe4\x01\x12\x1f\n" + + "\x1bColorPinoyLiveApplyBetChips\x10e\x12\x1f\n" + + "\x1bColorPinoyLiveApplyGetTrend\x10f\x12 \n" + + "\x1cColorPinoyLiveApplyBetDouble\x10h\x12\x1e\n" + + "\x1aColorPinoyLiveApplyUndoBet\x10i\x12\x1c\n" + + "\x18ColorPinoyLiveApplyLeave\x10k\x12\x1f\n" + + "\x1bColorPinoyLiveApplyBetAgain\x10lB\x11Z\x0fcommon/proto/pbb\x06proto3" var ( file_msgId_proto_rawDescOnce sync.Once diff --git a/server/colorgame/room/alive.go b/server/colorgame/room/alive.go new file mode 100644 index 0000000..04c8855 --- /dev/null +++ b/server/colorgame/room/alive.go @@ -0,0 +1,518 @@ +package room + +import ( + "encoding/json" + "game/common/proto/pb" + "github.com/fox/fox/log" +) + +// const ( +// LiveProcessInit = iota +// LiveProcessStart +// LiveProcessWait +// LiveProcessWaitDone +// LiveProcessFuncStart +// LiveProcessFuncDone +// ) +// +// var LiveProcessStatusName = map[int]string{ +// LiveProcessInit: "LiveProcessInit", +// LiveProcessStart: "LiveProcessStart", +// LiveProcessWait: "LiveProcessWait", +// LiveProcessWaitDone: "LiveProcessWaitDone", +// LiveProcessFuncStart: "LiveProcessFuncStart", +// LiveProcessFuncDone: "LiveProcessFuncDone", +// } + +type LiveMgr struct { + // LiveWg *sync.WaitGroup + // Count int // 当前数量 + // Mu *sync.Mutex + MaintenanceStatus int32 // 维护状态 0 正常 1 维护 + // ProcessStatus int // 进程状态 + Restting bool // 重置状态 + MainteMsg string + DiscardMsg string + DiscardStatus int + DiscardRestting bool // 重置状态 + RankList *pb.ColorPinoyLiveRankList + HasMainte bool +} + +func NewLiveMgr() *LiveMgr { + return &LiveMgr{ + // LiveWg: new(sync.WaitGroup), + // Mu: new(sync.Mutex), + RankList: new(pb.ColorPinoyLiveRankList), + } +} + +func (lm *LiveMgr) Reset() { + lm.Restting = false + lm.DiscardRestting = false + lm.DiscardStatus = 0 +} + +// func (lm *LiveMgr) IsAdd() bool { +// lm.Mu.Lock() +// defer lm.Mu.Unlock() +// return lm.Count > 0 +// } +// +// func (lm *LiveMgr) Add() { +// log.Debug("LiveMgr add") +// lm.Mu.Lock() +// defer lm.Mu.Unlock() +// lm.LiveWg.Add(1) +// lm.Count++ +// } +// +// func (lm *LiveMgr) Done() { +// log.Debug("LiveMgr Done") +// lm.Mu.Lock() +// defer lm.Mu.Unlock() +// if lm.Count == 0 { +// return +// } +// lm.LiveWg.Done() +// lm.Count-- +// } +// +// func (lm *LiveMgr) Wait() { +// log.Debug("LiveMgr Wait") +// lm.LiveWg.Wait() +// } + +func (lm *LiveMgr) NeedMaintenance() bool { + return !lm.HasMainte && (lm.MaintenanceStatus == 1 || lm.DiscardStatus == 1) +} + +func (rm *ColorRoom) LiveDelayUpdate() error { + event := &events.ServCmdKafka{ + ServCmd: common.ServCmd_sc_live_delay_update, + } + data := &common.ServLiveDelayUpdate{ + GameId: gconfig.GConfig.GRoomConfig.GameId, + MainteStatus: rm.LiveMgr.MaintenanceStatus, + MainteMsg: rm.LiveMgr.MainteMsg, + } + event.Data, _ = proto.Marshal(data) + err := gconfig.Produce(context.Background(), define.TopicSysServerCmd, event) + if err != nil { + log.Error(rm.Log("fail to Produce Event(%+v), err: %v", event, err)) + return err + } + return nil +} + +func (rm *ColorRoom) NotifyLiveDelayUpdate() { + if !gconfig.DelayUpdateServer { + return + } + if rm.LiveDelayUpdate() != nil { + return + } + gconfig.DelayUpdateServer = false +} + +func (rm *ColorRoom) ServerMaintenanceKickPlayer() { + rm.Traverse(func(u *model.User) bool { + kMsg := new(pb.ColorPinoyLiveKickOutUserMsg) + kMsg.Reason = int32(pb.ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_Server_Update) + u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeKickOutUser), kMsg) + rm.KickOutUser(u) + return true + }) +} + +func (rm *ColorRoom) SyncServerMaintenance(st int32, ss string) { + _ = st + _ = ss + rm.LoadDealerNames() + // 可能即将变为 normal + if gconfig.GConfig.GServConfig.Status != define.GameStatusNoraml { + rm.LiveMgr.MaintenanceStatus = 0 + rm.LiveMgr.MainteMsg = "" + return + } + ssv := redisf.RSC.LiveMainteGet(gconfig.GConfig.GDataConfig.VersionMode, gconfig.GConfig.GRoomConfig.GameId) + resp := new(pb.ColorPinoyLiveCommResp) + _ = json.Unmarshal([]byte(ssv), resp) + rm.LiveMgr.MaintenanceStatus = resp.MaintainStatus + rm.LiveMgr.MainteMsg = resp.MaintainMsg + +} + +func (rm *ColorRoom) OnLiveGameMessage(subCmd int32, buffer []byte) ([]byte, error) { + // log.Debug("收到后台消息:", subCmd) + var result proto.Message + _, err := rm.Table.RunAndWait(func() any { + switch subCmd { + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGGameGetStatus): + result = rm.LiveGetGameStatus(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGReady): + result = rm.LiveGameReady(buffer) // 点击finish + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGBetting): + result = rm.LiveGameBetting(buffer) // 点击start + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMStartDice): + result = rm.LiveGameStartDice(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMResultImg): + result = rm.LiveGameResultImg(buffer) + // case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGLucky): + // result = rm.LiveGameLucky(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGResult): + result = rm.LiveGameResult(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMMainteSet): + result = rm.LiveGameMainte(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMDiscard): + result = rm.LiveGameDiscard(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGMRankList): + result = rm.LiveGameRankList(buffer) + case int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGSetDealer): + result = rm.LiveGameSetDealerName(buffer) + default: + log.Error(rm.Log("no protocol")) + return nil + } + return result + }) + if err == nil && result != nil { + b, _ := proto.Marshal(result) + canLog := true + if subCmd == int32(pb.ColorPinoyLiveProcessCmd_ColorPinoyLiveMSGGameGetStatus) { + if rd := rand.RandInt(0, 100); rd < 90 { + canLog = false + } + } + if canLog { + j, _ := json.Marshal(result) + log.Debug(rm.Log("返回后台消息 subCmd:%d, msg:%s", subCmd, string(j))) + } + return b, nil + } + return nil, err +} + +func (rm *ColorRoom) getStatus() (int32, int64) { + switch rm.Status { + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveStartUnReady: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Readymove) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveStartReady: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Startmove) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveStartMovie: + return int32(pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Startbet) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Startbet) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Endmove) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveOpenThreeDice: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.OpenThreeDice) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Endpay) + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveRankStatus: + return int32(rm.Status), rm.StatusTime + int64(rm.RoomCfg.TimeConf.Rank) + default: + return int32(rm.Status), rm.StatusTime + } +} + +func (rm *ColorRoom) LiveStatus() *pb.ColorPinoyLiveCommResp { + resp := &pb.ColorPinoyLiveCommResp{ + GameId: gconfig.GConfig.GRoomConfig.GameId, + MaintainStatus: rm.LiveMgr.MaintenanceStatus, + MaintainMsg: rm.LiveMgr.MainteMsg, + Times: rm.RoomCfg.TimeConf.Get(), + GameNo: rm.Table.GetGameRoundId(), + DealerName: rm.dealerName, + Jackpot: rm.jackpotMgr.GetJackpotCopy(), + } + resp.GameStatus, resp.Countdown = rm.getStatus() + resp.BetAreaMul = rm.betEndBetAreasOdds + for _, dice := range rm.StartDices { + resp.StartDice = append(resp.StartDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + resp.ResultImg = rm.ResultImgs + switch rm.Status { + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveOpenThreeDice: + resp.LuckyStar = pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)) + for _, dice := range rm.NormalDices { + resp.DrawResult = append(resp.DrawResult, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + case pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus, pb.ColorPinoyLiveGameStatus_ColorPinoyLiveRankStatus: + resp.LuckyStar = pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)) + for _, dice := range rm.NormalDices { + resp.DrawResult = append(resp.DrawResult, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + resp.RankList = rm.LiveMgr.RankList + default: + } + // 结束下注后,后台可看到更新爆奖后的投注面板 + if rm.Status > pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus { + resp.BetAreaMul = rm.betEndBetAreasOdds + } + return resp +} + +func (rm *ColorRoom) LiveGetGameStatus(buffer []byte) proto.Message { + _ = buffer + return rm.LiveStatus() +} + +func (rm *ColorRoom) LiveGameReady(buffer []byte) proto.Message { + _ = buffer + log.Debug(rm.Log("LiveGameReady")) + // rm.MutexStatus.Lock() + // defer rm.MutexStatus.Unlock() + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + if rm.Status != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveRankStatus { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus) + return resp + } + rm.Ready() + resp.GameStatus, resp.Countdown = rm.getStatus() + return resp +} + +func (rm *ColorRoom) LiveGameBetting(buffer []byte) proto.Message { + _ = buffer + log.Debug(rm.Log("LiveGameBetting")) + // rm.MutexStatus.Lock() + // defer rm.MutexStatus.Unlock() + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + if rm.Status != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveStartReady { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus) + return resp + } + + rm.StartBet() + return resp +} + +func (rm *ColorRoom) LiveGameStartDice(buffer []byte) proto.Message { + log.Debug(rm.Log("LiveGameStartDice")) + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + if rm.Status != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus) + return resp + } + req := new(pb.ColorPinoyLiveStartDice) + _ = proto.Unmarshal(buffer, req) + if len(req.GetStartDice()) != 3 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorDice) + return resp + } + for i := 0; i < len(req.GetStartDice()); i++ { + rm.StartDices[i] = byte(req.GetStartDice()[i]) + } + log.Debug(rm.Log("req:", req.GetStartDice(), ",StartDice:", rm.StartDices)) + resp.StartDice = make([]pb.ColorPinoyLiveDiceColorType, 0) + for _, dice := range rm.StartDices { + resp.StartDice = append(resp.StartDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + resp.ResultImg = rm.ResultImgs + return resp +} + +func (rm *ColorRoom) LiveGameResultImg(buffer []byte) proto.Message { + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + req := new(pb.ColorPinoyLiveResultImg) + _ = proto.Unmarshal(buffer, req) + rm.ResultImgs = append(rm.ResultImgs, req.GetResultImg()...) + log.Debug(rm.Log("req:", req.GetResultImg(), ",ResultImg:", rm.ResultImgs)) + resp.StartDice = make([]pb.ColorPinoyLiveDiceColorType, 0) + for _, dice := range rm.StartDices { + resp.StartDice = append(resp.StartDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + resp.ResultImg = rm.ResultImgs + return resp +} + +func (rm *ColorRoom) LiveGameResult(buffer []byte) proto.Message { + // rm.MutexStatus.Lock() + // defer rm.MutexStatus.Unlock() + log.Debug(rm.Log("LiveGameResult")) + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + log.Debug(rm.Log("LiveGameResult status:%v ", rm.Status)) + if rm.Status != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus) + return resp + } + req := new(pb.ColorPinoyLiveResult) + _ = proto.Unmarshal(buffer, req) + if len(req.GetColor()) != 3 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorDice) + return resp + } else { + for i := 0; i < len(req.GetColor()); i++ { + if !model.IsLogic(int32(req.GetColor()[i])) { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorDice) + return resp + } + rm.NormalDices[i] = byte(req.GetColor()[i]) + } + } + log.Debug(rm.Log("LiveGameResult req:%v NormalDices:%v", req.GetColor(), rm.NormalDices)) + + rm.Table.Run(rm.openThreeDice) + return resp +} + +func (rm *ColorRoom) LiveGameMainte(buffer []byte) proto.Message { + req := new(pb.ColorPinoyLiveMaintain) + _ = proto.Unmarshal(buffer, req) + b, _ := json.Marshal(req) + log.Debug(rm.Log("LiveGameMainte:%v", string(b))) + resp := rm.LiveStatus() + if rm.LiveMgr.Restting { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + resp.Msg = "Restting" + return resp + } + if req.TargetStatus == rm.LiveMgr.MaintenanceStatus { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + if rm.GetGameStatus() == pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus) + resp.Msg = "SettleStatus" + return resp + } + defer func() { + _ = pushGate.NotifyConfigUpdated(msg.ConfigUpdateType_ConfigUpdateTypeLiveConfig) + rm.SetLiveGameStatus() + }() + if req.TargetStatus == 0 { + rm.LiveMgr.MaintenanceStatus = 0 + rm.LiveMgr.MainteMsg = "" + rm.LiveMgr.HasMainte = false + } else { + rm.LiveMgr.MaintenanceStatus = req.TargetStatus + rm.LiveMgr.MainteMsg = req.GetMsg() + rm.LiveMainteCnt() + } + resp.MaintainStatus = rm.LiveMgr.MaintenanceStatus + resp.MaintainMsg = rm.LiveMgr.MainteMsg + resp.GameStatus, resp.Countdown = rm.getStatus() + br, _ := json.Marshal(resp) + redisf.RSC.LiveMainteSet(gconfig.GConfig.GDataConfig.VersionMode, gconfig.GConfig.GRoomConfig.GameId, string(br)) + redisf.RSC.LiveMainteLobbySet(gconfig.GConfig.GDataConfig.VersionMode, gconfig.GConfig.GRoomConfig.GameId, rm.LiveMgr.MaintenanceStatus, rm.LiveMgr.MainteMsg) + return resp +} + +func (rm *ColorRoom) LiveMainteCnt() { + rm.LiveMainte() +} + +func (rm *ColorRoom) LiveMainte() { + if rm.LiveMgr.MaintenanceStatus == 1 { + rm.LiveMgr.HasMainte = true + rm.LiveMgr.Restting = true + } + if rm.LiveMgr.DiscardStatus == 1 { + rm.LiveMgr.DiscardRestting = true + } + rm.GameDiscard() + // rm.LiveMgr.SetProcessStatus(LiveProcessInit) + if rm.LiveMgr.MaintenanceStatus == 1 { + rm.LiveMgr.Restting = false + } + if rm.LiveMgr.DiscardStatus == 1 { + rm.LiveMgr.DiscardRestting = false + rm.LiveMgr.DiscardStatus = 0 + } +} + +func (rm *ColorRoom) LiveGameDiscard(_ []byte) proto.Message { + log.Debug(rm.Log("LiveGameDiscard")) + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + log.Error(rm.Log("rm.LiveMgr.MaintenanceStatus")) + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + if rm.LiveMgr.DiscardRestting { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + resp.Msg = "DiscardRestting" + return resp + } + // if rm.GetGameStatus() == pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus { + // resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorGameSatus) + // resp.Msg = "SettleStatus" + // return resp + // } + rm.LiveMgr.DiscardStatus = 1 + rm.LiveMgr.DiscardMsg = "" + rm.LiveMainteCnt() + resp.GameStatus, resp.Countdown = rm.getStatus() + return resp +} +func (rm *ColorRoom) LiveGameRankList(buffer []byte) proto.Message { + _ = buffer + return rm.LiveMgr.RankList +} + +func (rm *ColorRoom) LiveGameSetDealerName(buffer []byte) proto.Message { + resp := rm.LiveStatus() + if rm.LiveMgr.MaintenanceStatus == 1 { + resp.Code = int32(pb.ColorPinoyLiveProcessError_ColorPinoyLiveProcessErrorMainteStatus) + return resp + } + req := new(pb.ColorPinoyLiveSetDealer) + _ = proto.Unmarshal(buffer, req) + rm.UpdateDealerName(req.DealerName) + log.Debug(rm.Log("set dealer:", req.DealerName)) + resp.DealerName = rm.dealerName + return resp +} + +// 长度0 维护, 长度1 设置状态 , 长度2 设置排行榜 +func (rm *ColorRoom) SetLiveGameStatus(pushRank ...int) { + lScene := &lws.CPLScene{ + Status: int32(rm.Status), + RankList: nil, + MaintainStatus: rm.LiveMgr.MaintenanceStatus, + } + if rm.LiveMgr.RankList != nil && + (rm.Status == pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus || rm.Status == pb.ColorPinoyLiveGameStatus_ColorPinoyLiveRankStatus) { + lScene.RankList = &lws.CPLRankList{ + PlayerData: nil, + GameNo: rm.LiveMgr.RankList.GameNo, + } + for _, dd := range rm.LiveMgr.RankList.PlayerData { + lScene.RankList.PlayerData = append(lScene.RankList.PlayerData, &lws.CPLPlayerData{ + Uid: dd.Uid, + Profit: dd.Profit, + Nickname: dd.Nickname, + Avatar: dd.Avatar, + }) + } + } + if len(pushRank) == 0 { + live.PushScene(lScene) + } else if len(pushRank) == 1 { + live.PushStatus(&lws.CPLStatus{Status: lScene.Status}) + } else if len(pushRank) == 2 { + live.PushColorRank(lScene.RankList) + } + go redisf.RSC.SetLiveGameStatus(lScene, gconfig.GConfig.GRoomConfig.GameId, gconfig.GConfig.GDataConfig.VersionMode) +} diff --git a/server/colorgame/room/c2s.go b/server/colorgame/room/c2s.go new file mode 100644 index 0000000..65c51e9 --- /dev/null +++ b/server/colorgame/room/c2s.go @@ -0,0 +1,225 @@ +package room + +import ( + "game/common/proto/pb" + "github.com/fox/fox/ipb" + "github.com/fox/fox/log" +) + +func (rm *ColorRoom) checkEnterRoom(user *ColorPlayer, iMsg *ipb.InternalMsg, req *pb.C2SMatchRoom) { + + return +} + +func (rm *ColorRoom) OnEnterRoom(user *ColorPlayer, iMsg *ipb.InternalMsg, req *pb.C2SMatchRoom) { + + return +} + +func (rm *ColorRoom) ApplyLeave(buffer []byte, user inter.UserInetr) { + _ = buffer + resp := new(pb.ColorPinoyLiveLeaveResp) + u := rm.GetPlayer(user.GetId()) + if u == nil { + rm.Table.KickOut(user) + return + } + // 有下注时不让玩家离开 + if u.TotalBet != 0 { + resp.Code = 1 + _ = user.SendMsg(int32(pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyLeave), resp) + return + } + rm.KickOutUser(u) + _ = user.SendMsg(int32(pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyLeave), resp) + return +} + +func (rm *ColorRoom) checkNoBet() bool { + return rm.GetGameStatus() != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus || + rm.LiveMgr.MaintenanceStatus == 1 || + rm.LiveMgr.DiscardRestting +} + +func (rm *ColorRoom) Bet(buffer []byte, user inter.UserInetr) { + u := rm.getUser(user) + u.MutexBet.Lock() + defer u.MutexBet.Unlock() + if rm.checkNoBet() { + log.Error(rm.Log("game bet status err:%v", rm.GetGameStatus())) + model.SendBetFailMessageInetr(model.StatusError, user) + return + } + // 用户下注 + BetPb := &pb.ColorPinoyLiveBetReqs{} + err := proto.Unmarshal(buffer, BetPb) + if err != nil { + log.Error(rm.Log("proto.Unmarshal err:%v", err)) + model.SendBetFailMessageInetr(model.DataErr, user) + return + } + log.Debug(rm.Log("Bet pb = ", BetPb)) + var bets []*pb.ColorPinoyLiveBetReq + + for _, bet := range BetPb.Info { + req := &pb.ColorPinoyLiveBetReq{ + BetType: bet.BetType, + BetLevel: bet.BetLevel, + BetIndex: bet.BetIndex, + BetAmount: bet.BetAmount, + } + bets = append(bets, req) + } + + // log.Debug("Bet bets =", bets) + rm.CheckAndBet(u, bets) +} + +func (rm *ColorRoom) UserSitDown(buffer []byte, user inter.UserInetr) { + us := &pb.ColorPinoyLiveUserSitDown{} + _ = proto.Unmarshal(buffer, us) + // u, ok := rm.AllUserList[user.GetId()] + u := rm.GetPlayer(user.GetId()) + if u != nil { + if rm.SceneInfo.SitScene(u, int(us.ChairNo)) { + u.SceneChairId = int(us.ChairNo) + rm.Traverse(func(v *model.User) bool { + // rm.SendSceneMsg(v) + return true + }) + } + } +} + +func (rm *ColorRoom) SendUserListInfo(user inter.UserInetr) { + msg := new(pb.ColorPinoyLiveUserList) + for _, u := range rm.OnlineUserList { + userinfo := new(pb.ColorPinoyLiveUserInfo) + userinfo.NikeName = u.UserInetr.GetNike() + userinfo.UserGlod = u.Balance + userinfo.Head = u.UserInetr.GetHead() + userinfo.UserID = u.UserID + msg.UserList = append(msg.UserList, userinfo) + } + // log.Debug("SendUserListInfo", msg) + _ = user.SendMsg(int32(pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyGetUserListInfo), msg) +} + +func (rm *ColorRoom) SendTrend(u inter.UserInetr) { + // log.Debug("发送走势图") + msg := new(pb.ColorPinoyLiveTrend) + msg.ListTrendGroup = rm.GameTrend.ListTrendGroup + msg.LuckStarRate = rm.GetGameTrend() + _ = u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameTrendInfo), msg) +} + +func (rm *ColorRoom) OnUserStanUp(user *model.User) { + rm.SceneInfo.UserStandUp(user.UserInetr) + user.Mn.Lock() + user.SceneChairId = 0 + user.Mn.Unlock() + if rm.GetGameStatus() < pb.ColorPinoyLiveGameStatus_ColorPinoyLiveOpenThreeDice { + rm.SelectUserListBalanceTopSitDownChair() + } else { + // rm.Traverse(func(v *model.User) bool { + // rm.SendSceneMsg(v) + // return true + // }) + } +} + +func (rm *ColorRoom) AgainBet(user inter.UserInetr) { + u := rm.getUser(user) + u.MutexBet.Lock() + defer u.MutexBet.Unlock() + if rm.checkNoBet() { + log.Error(rm.Log("game bet status err ", rm.GetGameStatus())) + model.SendBetFailMessageInetr(model.StatusError, user) + return + } + // u := rm.getUser(user) + var bets []*pb.ColorPinoyLiveBetReq + if u.TempLastTimeBet != nil { + for _, bet := range u.TempLastTimeBet { + bets = append(bets, bet...) + } + } + rm.CheckAndBet(u, bets) +} + +func (rm *ColorRoom) BetDouble(user inter.UserInetr) { + u := rm.getUser(user) + u.MutexBet.Lock() + defer u.MutexBet.Unlock() + if rm.checkNoBet() { + log.Error(rm.Log("game bet status err ", rm.GetGameStatus())) + model.SendBetFailMessageInetr(model.StatusError, user) + return + } + // u := rm.getUser(user) + var bets []*pb.ColorPinoyLiveBetReq + if u.LastTimeBet != nil { + for _, bet := range u.LastTimeBet { + bets = append(bets, bet...) + } + // log.Debug("BetDouble 上次下注:", u.LastTimeBet, "bets:", bets) + } + if len(bets) > 1000 { + log.Error(rm.Log("game bet status err ", rm.GetGameStatus())) + model.SendBetFailMessageInetr(12, user) + return + } + + rm.CheckAndBet(u, bets) +} + +func (rm *ColorRoom) OnUndoBet(buffer []byte, user inter.UserInetr) { + u := rm.getUser(user) + u.MutexBet.Lock() + defer u.MutexBet.Unlock() + if rm.checkNoBet() { + log.Error(rm.Log("game bet status err:%v", rm.GetGameStatus())) + model.SendBetFailMessageInetr(model.StatusError, user) + return + } + reqInfo := &pb.ColorPinoyLiveC2SUndoBet{} + err := proto.Unmarshal(buffer, reqInfo) + if err != nil { + log.Error(rm.Log("proto.Unmarshal err:%v", err)) + model.SendBetFailMessageInetr(model.DataErr, user) + return + } + rm.UndoBet(u, reqInfo.UndoType) +} + +// ApplyUseProps todo +func (rm *ColorRoom) ApplyUseProps(buffer []byte, userInter inter.UserInetr) { + applyInfo := new(pb.ColorPinoyLiveApplyPropsReq) + err := proto.Unmarshal(buffer, applyInfo) + user := rm.getUser(userInter) + if err != nil { + log.Error(rm.Log("proto.Unmarshal err:%v", err)) + model.SendBetFailMessage(model.DataErr, user) + return + } + AcceptUser := rm.GetPlayer(applyInfo.AcceptUserId) + if AcceptUser == nil { + log.Error(rm.Log("AcceptUser is null")) + model.SendBetFailMessage(model.UserNull, user) + return + } + _, err = user.GetPropsReal(rm.RoomCfg.Prop, rm.Table, rm.RoomCfg) + if err != nil { + log.Error(rm.Log("GetPropsReal err", err)) + model.SendBetFailMessage(model.ScoreLess, user) + return + } + leftCoins := user.Balance + propsResp := &pb.ColorPinoyLivePlayerPropsResp{ + ApplyUserId: user.UserID, + AcceptUserId: AcceptUser.UserID, + PropsId: applyInfo.PropsId, + Chips: leftCoins, + } + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticePlayerUseProps), propsResp) +} diff --git a/server/colorgame/room/colorRoom.go b/server/colorgame/room/colorRoom.go index 130028c..f4d765b 100644 --- a/server/colorgame/room/colorRoom.go +++ b/server/colorgame/room/colorRoom.go @@ -1,15 +1,68 @@ package room import ( + "fmt" "game/common/baseroom" "game/common/proto/pb" "github.com/fox/fox/log" "github.com/fox/fox/processor" "github.com/fox/fox/service" + "sync" + "time" ) type ColorRoom struct { *baseroom.BaseRoom[ColorSeat] + + //--------------------------------- + Status pb.ColorPinoyLiveGameStatus // 房间状态1 表示 + StatusTime int64 // 切换状态时的时间戳 + + LuckyDice byte // 幸运骰子 1个 + NormalDices []byte // 普通骰子 3个 + StartDices []byte // 初始位置摆放的骰子 3个 + ResultImgs []string // 结果图片 + + // DefaultLuckyDice byte // 幸运骰子 1个 每局开始 放在拉杆上的骰子 + // DefaultNormalDices []byte // 普通骰子 3个 每局开始 放在拉杆上的骰子 + + TotalBets [config.BET_TYPE_NUM]int64 // 各区域的下注统计 + TotalBet int64 // 下注统计 + SceneInfo model.SceneInfo // 下注的玩家列表 + GamePoker *model.GameDice // 管理一副牌 + TimerJob *clock.Job // job + RobotCreateJob *clock.Job // job + RobotDeleteJob *clock.Job // job + // LuckyBetType int32 // 幸运区域 + // LuckyMul int32 // 幸运倍率 + // RobotTimerJob *clock.Job // 机器人job + // LastMasterBetType int32 // 最近一次神算子下注的类型 + GameTrend *pb.ColorPinoyLiveTrend // 走势图 + OnlineUserList []*model.User // 所有的玩家列表 用于排序 + PokerMsg *pb.ColorPinoyLivePokerMsg // 扑克消息 + RoomCfg *config.RoomConfig // 房间配置 + Cfg *config.ColorPinoyLiveConfig // 房间配置 + startAt int64 + endAt int64 + MutexData *sync.RWMutex + MutexStatus *sync.RWMutex + MutexUserList *sync.RWMutex + ServerStatus int32 + wd *sync.WaitGroup + TrendRedisKey string + _aniLuckyDiceRouteIndex int32 // 幸运骰子动画路径 + _aniThreeDiceRouteIndex int32 // 3个骰子动画路径 + BigWinner []*pb.ColorPinoyLiveBigWinner + LiveMgr *LiveMgr + dealerName []string // 主播名字 + betEndBetAreasOdds []*pb.ColorPinoyLiveGameBetAreaInfo // 下注结束后,每个区域更新是否爆奖 + afterBetAreaOdds []*pb.ColorPinoyLiveBetAreaOdd // 开奖后,更新每个区域的赔率(主要是单色投注区开奖后,三个赔率变为1个赔率) + jackpotMgr *jackpot.JackPotMgr + jackpotFunding int64 // 本局垫资 + jackpotX int64 // 赎回比例 + jackpotY int64 // 追加进 + costJackpot int64 // 本局发下去的jackpot奖励,回滚用 + jackpotUser map[int64]int64 // 本局中jackpot的玩家,用于kafka发送消息 } func newColorRoom(id, roomType int, srv service.IService) (baseroom.IRoom, pb.ErrCode) { @@ -45,3 +98,408 @@ func (rm *ColorRoom) AddGold(user *ColorPlayer, add int64) (int64, bool) { user.costGold += add return user.Gold - user.costGold, false } + +// --------------------------------------------------------------------------------------------------- + +const ( + BigWinnerCount = 6 + GameName = "ColorPinoyLive" +) + +func (rm *ColorRoom) SetGameStatus(status pb.ColorPinoyLiveGameStatus) { + rm.Status = status + rm.StatusTime = time.Now().UnixMilli() + log.Debug("设置房间状态:", status) + rm.SetLiveGameStatus([]int{1}...) +} +func (rm *ColorRoom) GetGameStatus() pb.ColorPinoyLiveGameStatus { + return rm.Status +} +func (rm *ColorRoom) UserOffline(user inter.UserInetr) { + _ = user +} + +// 客户端显示赔率范围 +func (rm *ColorRoom) MulRangeConfig() []*pb.BetAreaMulRangeConfig { + var mulRangeCfg []*pb.BetAreaMulRangeConfig + for pos, mul := range rm.Cfg.WinSingleColorMul { + if len(mul) > 0 { + mulRangeCfg = append(mulRangeCfg, &pb.BetAreaMulRangeConfig{ + Pos: pb.ColorPinoyLiveBigBetAreaPos(pos), + MinMul: mul[0].Mul, + MaxMul: mul[len(mul)-1].Mul, + }) + } + } + if len(rm.Cfg.WinDoubleColorMul) > 0 { + mul := rm.Cfg.WinDoubleColorMul + mulRangeCfg = append(mulRangeCfg, &pb.BetAreaMulRangeConfig{ + Pos: pb.ColorPinoyLiveBigBetAreaPos_BBA_Double, + MinMul: mul[0].Mul, + MaxMul: mul[0].Mul, + }) + } + if len(rm.Cfg.WinThreeColorMul) > 0 { + mul := rm.Cfg.WinThreeColorMul + mulRangeCfg = append(mulRangeCfg, &pb.BetAreaMulRangeConfig{ + Pos: pb.ColorPinoyLiveBigBetAreaPos_BBA_Three, + MinMul: mul[0].Mul, + MaxMul: mul[0].Mul, + }) + } + if len(mulRangeCfg) != len(pb.ColorPinoyLiveBigBetAreaPos_name) { + log.Error(rm.Log(("配置错误"))) + return nil + } + for pos, v := range mulRangeCfg { + log.Debug(rm.Log("pos:%v 赔率区间:%v-%v", pos, v.MinMul, v.MaxMul)) + } + return mulRangeCfg +} + +func (rm *ColorRoom) InitBigOddsBetAreas() { + if len(rm.betEndBetAreasOdds) == 0 { + rm.betEndBetAreasOdds = make([]*pb.ColorPinoyLiveGameBetAreaInfo, 0, len(pb.ColorPinoyLiveBetTypeJP_name)) + } + rm.betEndBetAreasOdds = rm.betEndBetAreasOdds[0:0] + for betType := 0; betType < config.BET_TYPE_NUM; betType++ { + rm.betEndBetAreasOdds = append(rm.betEndBetAreasOdds, &pb.ColorPinoyLiveGameBetAreaInfo{ + BetType: pb.ColorPinoyLiveBetTypeJP(betType), + BetChipsInfo: nil, + IsWin: 0, + Odd: nil, + IsBigOdd: false, + BigSingleColorOddPos: 0, + }) + } + for pos, betArea := range rm.betEndBetAreasOdds { + betArea.IsBigOdd = false + index := pos / int(pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_GREEN) + if index == 0 { + betArea.BigSingleColorOddPos = pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_0 + var mulRangeW []*MulRangeW + begin := 0 + for _, mul := range rm.Cfg.WinSingleColorMul[0] { + mulRangeW = append(mulRangeW, &MulRangeW{MulRate: mul, ColorPos: pb.ColorPinoyLiveBigBetAreaPos(pos), MinW: begin, MaxW: begin + mul.Rate}) + begin += mul.Rate + } + rdv := rand.RandInt(mulRangeW[0].MinW, mulRangeW[len(mulRangeW)-1].MaxW) + singleMul := rm.Cfg.WinSingleColorMul[0][0].Mul + for _, mul := range mulRangeW { + if rdv < mul.MinW || rdv >= mul.MaxW { + continue + } + singleMul = mul.Mul + break + } + log.Debug(rm.Log("单色区域基础权重区间:[%v,%v],随机数:%v 基础赔率:%v", mulRangeW[0].MinW, mulRangeW[len(mulRangeW)-1].MaxW, rdv, singleMul)) + betArea.Odd = append(betArea.Odd, singleMul) + betArea.Odd = append(betArea.Odd, rm.Cfg.WinSingleColorMul[1][0].Mul) + betArea.Odd = append(betArea.Odd, rm.Cfg.WinSingleColorMul[2][0].Mul) + } else if index == 1 { + betArea.BigSingleColorOddPos = pb.ColorPinoyLiveBigBetAreaPos_BBA_Double + betArea.Odd = append(betArea.Odd, rm.Cfg.WinDoubleColorMul[0].Mul) + } else { + betArea.BigSingleColorOddPos = pb.ColorPinoyLiveBigBetAreaPos_BBA_Three + betArea.Odd = append(betArea.Odd, rm.Cfg.WinThreeColorMul[0].Mul) + } + } + for _, betArea := range rm.betEndBetAreasOdds { + log.Debug(rm.Log("初始化投注区域:%v 倍率:%v 是否爆奖:%v 是否jackpot:%v", betArea.BetType, betArea.Odd, betArea.IsBigOdd, betArea.IsJackpot)) + } +} + +func (rm *ColorRoom) Log(format string, args ...any) string { + s := fmt.Sprintf(format, args...) + head := fmt.Sprintf("gameno:%v ", rm.Table.GetGameRoundId()) + return head + s +} + +func (rm *ColorRoom) LogEx(user *model.User, format string, args ...any) string { + s := fmt.Sprintf(format, args...) + head := fmt.Sprintf("gameno:%v user:%v", rm.Table.GetGameRoundId(), user.UserID) + return head + s +} + +func (rm *ColorRoom) InitTableFrameSink(table inter.TableInter) inter.LiveRoomInter { + room := new(ColorPinoyLiveGame) + room.Table = table + room.OnlineUserList = make([]*model.User, 0) + room.SceneInfo.Init() + room.PokerMsg = new(pb.ColorPinoyLivePokerMsg) + // room.PokerMsg.LongPoker = make([]int32, 1) + // room.PokerMsg.HuPoker = make([]int32, 1) + room.MutexData = new(sync.RWMutex) + room.MutexStatus = new(sync.RWMutex) + room.MutexUserList = new(sync.RWMutex) + room.GamePoker = new(model.GameDice) + room.wd = new(sync.WaitGroup) + room.GamePoker.InitPoker() + room.NormalDices = make([]byte, 3) + // room.DefaultNormalDices = make([]byte, 3) + room.GameTrend = new(pb.ColorPinoyLiveTrend) + room.GameTrend.ListTrendGroup = []*pb.ColorPinoyLiveTrendGroup{} + room.GameRoundStart() + room.InitWinTrend() + room.LiveMgr = NewLiveMgr() + room.InitBigOddsBetAreas() + room.jackpotMgr = jackpot.NewJackPotMgr() + // room.jackpotMgr.Load(room.RoomCfg.ColorPinoyLiveConfig.InitJackpot) + + table.BindGame(room) + return room +} +func (rm *ColorRoom) ResetConfigPrivate() bool { + rm.RoomCfg = config.ResetConfigPrivate() + rm.Cfg = &rm.RoomCfg.ColorPinoyLiveConfig + return true +} +func (rm *ColorRoom) GetPlayer(userid int64) *model.User { + user, ok := rm.AllUserList.Load(userid) + if !ok { + return nil + } + player, ok := user.(*model.User) + if !ok { + return nil + } + return player +} +func (rm *ColorRoom) AddPlayer(player *model.User) { + rm.AllUserList.Store(player.UserInetr.GetId(), player) + rm.MutexUserList.Lock() + rm.OnlineUserList = append(rm.OnlineUserList, player) + rm.MutexUserList.Unlock() +} + +type TraverseFunc func(v *model.User) bool + +func (rm *ColorRoom) Traverse(f TraverseFunc) { + function := func(key, value interface{}) bool { + if value != nil { + us, ok := value.(*model.User) + if !ok { + log.Warn("user is not *UserInetr") + } else { + return f(us) + } + } + return true + } + rm.AllUserList.Range(function) +} +func (rm *ColorRoom) TraverseRobotNum(num int, f TraverseFunc) { + curNum := 0 + function := func(key, value interface{}) bool { + if value != nil { + us, ok := value.(*model.User) + if !ok { + log.Warn("user is not *UserInetr") + } else if us.IsRobot { + curNum++ + f(us) + } + } + if num > 0 && curNum == num { + return false + } + return true + } + rm.AllUserList.Range(function) +} + +func (rm *ColorRoom) DeletePlayer(uid int64) { + p := rm.GetPlayer(uid) + if p != nil { + rm.AllUserList.Delete(uid) + rm.DeleteExitUserFromOnlineUserListSlice(p) + } +} +func (rm *ColorRoom) getUserLen() int64 { + len1 := int64(0) + rm.Traverse(func(v *model.User) bool { + len1++ + return true + }) + return len1 +} +func (rm *ColorRoom) getUserAndRobotLen() (userNum, robotNum int64) { + rm.Traverse(func(v *model.User) bool { + if v.IsRobot { + robotNum++ + } else { + userNum++ + } + return true + }) + return +} + +func (rm *ColorRoom) UserReady(user inter.UserInetr) bool { + _ = user + return true +} + +// 用户坐下 +func (rm *ColorRoom) OnActionUserSitDown(user inter.UserInetr, chairId int, config string) int { + _ = chairId + _ = config + u := rm.getUser(user) + // log.Debug("玩家坐下...OnActionUserSitDown:", u, chairId, config) + go rm.SceneUserSitDown(u) + return 1 // business.OnActionUserSitDownHandler() +} + +func (rm *ColorRoom) UserExit(user inter.UserInetr) bool { + u := rm.getUser(user) + // 有下注时不让玩家离开 + if u.TotalBet != 0 { + return false + } + rm.KickOutUser(u) + return true +} +func (rm *ColorRoom) LeaveGame(user inter.UserInetr) bool { + u := rm.getUser(user) + if u.TotalBet != 0 { + // msg := new(pb.KickOutUserMsg) + // msg.KickOutReason = "游戏中不能退出!" + // u.SendMsg(int32(pb.SendToClientMessageType_NoticeExitRet), msg) + return false + } + + rm.KickOutUser(u) + return true +} + +// 游戏消息 +func (rm *ColorRoom) OnGameMessage(subCmd int32, buffer []byte, user inter.UserInetr) { + // log.Debug("收到客户端消息:", subCmd) + switch pb.ColorPinoyLiveReceiveFromClientMessageType(subCmd) { + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyRefresh: + rm.GameSync(user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyBetChips: + monitor.GoSafe(rm.Bet, buffer, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyGetUserListInfo: + monitor.GoSafe(rm.SendUserListInfo, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyGetTrend: + monitor.GoSafe(rm.SendTrend, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyBetAgain: + // go rm.AgainBet(user) + monitor.GoSafe(rm.AgainBet, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyBetDouble: + monitor.GoSafe(rm.BetDouble, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyUndoBet: + monitor.GoSafe(rm.OnUndoBet, buffer, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyUseProps: + monitor.GoSafe(rm.ApplyUseProps, buffer, user) + case pb.ColorPinoyLiveReceiveFromClientMessageType_ColorPinoyLiveApplyLeave: + monitor.GoSafe(rm.ApplyLeave, buffer, user) + } +} + +func (rm *ColorRoom) initDefaultDiceGameRoundReady() { + // rm.DefaultLuckyDice = rm.GamePoker.ShuffleDices(1)[0] + // + // rm.DefaultNormalDices[0] = rm.GamePoker.ShuffleDices(1)[0] + // rm.DefaultNormalDices[1] = rm.GamePoker.ShuffleDices(1)[0] + // rm.DefaultNormalDices[2] = rm.GamePoker.ShuffleDices(1)[0] +} + +// 开lucky dice +func (rm *ColorRoom) OpenLuckyDice() { + + dealDice := rm.GetPairDice(1, 0, 1) + + if dealDice == nil || len(dealDice) < 1 { + rm.LuckyDice = rm.GamePoker.ShuffleDices(1)[0] + } else { + deck := model.GetInitialDeck() + rm.LuckyDice = deck[dealDice[0]-1] + } +} + +// 开3个普通 dice +func (rm *ColorRoom) OpenThreeDice() { + + dealDice := rm.GetPairDice(3, 1, 4) + if dealDice == nil || len(dealDice) < 3 { + rm.NormalDices[0] = rm.GamePoker.ShuffleDices(1)[0] + rm.NormalDices[1] = rm.GamePoker.ShuffleDices(1)[0] + rm.NormalDices[2] = rm.GamePoker.ShuffleDices(1)[0] + } else { + deck := model.GetInitialDeck() + rm.NormalDices[0] = deck[dealDice[0]-1] + rm.NormalDices[1] = deck[dealDice[1]-1] + rm.NormalDices[2] = deck[dealDice[2]-1] + } +} + +func (rm *ColorRoom) getUser(user inter.UserInetr) *model.User { + // u, ok := rm.AllUserList[user.GetId()] + u := rm.GetPlayer(user.GetId()) + if u == nil { + u = new(model.User) + u.UserID = user.GetId() + u.UserInetr = user + u.Balance = user.GetScore() + u.Carry = user.GetCarry() + u.Time = time.Now().UnixNano() / 1e6 + u.UserInetr = user + rm.AddPlayer(u) + u.ResetUserData() + } + + return u +} + +func (rm *ColorRoom) getRobotUser(user inter.UserInetr) *model.User { + // u, ok := rm.AllUserList[user.GetId()] + u := rm.GetPlayer(user.GetId()) + if u == nil { + u = new(model.User) + u.UserID = user.GetId() + u.UserInetr = user + u.Balance = user.GetScore() + u.Carry = user.GetCarry() + u.Time = time.Now().UnixNano() / 1e6 + u.UserInetr = user + u.IsRobot = true + rm.AddPlayer(u) + u.ResetUserData() + } + + return u +} + +// 游戏开始入口..... +func (rm *ColorRoom) GameStart() bool { + if rm.GetGameStatus() == 0 { + rm.Ready() + rm.SyncServerMaintenance(0, "") + _ = rm.LiveDelayUpdate() + // 防止卡房间 + rm.Table.AddTimerRepeat(60, 0, func() { + if rm.LiveMgr.MaintenanceStatus == 1 { + rm.Table.EndGame() + } + }) + } else if rm.TimerJob != nil { + } + + return true +} + +func (rm *ColorRoom) GameRoundStart() { + rm.RoomCfg = config.ResetConfig() + rm.Cfg = &rm.RoomCfg.ColorPinoyLiveConfig + rm.ServerStatus = gconfig.GConfig.GServConfig.Status +} + +func (rm *ColorRoom) ResetTable() { + rm.SetGameStatus(0) +} + +// 关闭桌子 +func (rm *ColorRoom) CloseTable() { +} diff --git a/server/colorgame/room/helper.go b/server/colorgame/room/helper.go new file mode 100644 index 0000000..aeb08b1 --- /dev/null +++ b/server/colorgame/room/helper.go @@ -0,0 +1,1179 @@ +package room + +import ( + "encoding/json" + "fmt" + "game/common/proto/pb" + "github.com/fox/fox/ipb" + "github.com/fox/fox/log" + "sort" + "sync" + "time" +) + +func (rm *ColorRoom) SceneUserSitDown(user *model.User) { + _ = user + rm.SendOnlinePlayerNum() +} + +// CheckAndBet 检查并下注 +func (rm *ColorRoom) CheckAndBet(user *model.User, bets []*pb.ColorPinoyLiveBetReq) { + if len(bets) == 0 { + log.Error(rm.Log("玩家(%d) bets data err :%v ", bets)) + model.SendBetFailMessage(model.DataErr, user) + return + } + + betInfos := [config.BET_TYPE_NUM]int64{} + betCountInfos := [config.BET_TYPE_NUM]int64{} + totalBetAmount := int64(0) + oneBetMessage := &pb.ColorPinoyLiveS2CRepetBet{} + oneBetMessage.Uid = user.UserID + oneBetMessage.BetInfo = []*pb.ColorPinoyLiveBetSuccessMessage{} + + if rm.GetGameStatus() != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus { + log.Error(rm.Log("玩家(%d) UndoBet data err GetGameStatus:%v,LastTimeBet:%v ", user.UserID, rm.GetGameStatus(), user.LastTimeBet)) + model.SendBetFailMessage(model.StatusError, user) + return + } + + for _, bet := range bets { + // 判断下注下标和下注区域下标是否超出列表 + if _, ok := pb.ColorPinoyLiveBetTypeJP_name[int32(bet.BetType)]; !ok || + bet.BetLevel < 0 || bet.BetLevel >= int32(len(rm.RoomCfg.ColorPinoyLiveConfig.BetList)) || + bet.BetIndex < 0 || bet.BetIndex >= int32(len(rm.RoomCfg.ColorPinoyLiveConfig.BetList[bet.BetLevel])) { + log.Error(rm.Log("玩家(%d) bets data err BetLevel:%d BetIndex:%d ", bet.BetLevel, bet.BetIndex)) + model.SendBetFailMessage(model.DataErr, user) + return + } + // 下注总金额 + betAmountCount := rm.RoomCfg.ColorPinoyLiveConfig.BetList[bet.BetLevel][bet.BetIndex] + bet.BetAmount = betAmountCount + + if betAmountCount > user.Balance-totalBetAmount { + log.Debug(rm.Log("用户余额为:%v 总押注%d 押注%d", user.Balance, totalBetAmount, betAmountCount)) + model.SendBetFailMessage(model.ScoreLess, user) + return + } else { + totalBetAmount += betAmountCount + betInfos[bet.BetType%config.BET_TYPE_NUM] += betAmountCount + betCountInfos[bet.BetType%config.BET_TYPE_NUM] += 1 + } + } + + if totalBetAmount <= 0 || totalBetAmount+user.TotalBet > rm.RoomCfg.ColorPinoyLiveConfig.TotalBetLimit { + log.Error(rm.Log("DataErr totalBetAmount:%d err ", totalBetAmount)) + model.SendBetFailMessage(model.PlayerEarTopScore, user) + return + } + log.Debug(rm.LogEx(user, "下注区域最大金额:%v", rm.Cfg.AreaBetLimit)) + for i, num := range betInfos { + // 投注大于下注区域限制 + if (user.TotalBets[i] + num) > rm.Cfg.AreaBetLimit { + // log.Debug("PlayerEarTopScore totalBetAmount:%d err ", totalBetAmount) + model.SendBetFailMessage(model.PlayerEarTopScore, user) + return + } + } + + user.AddBalance(-totalBetAmount) + + if user.LastTimeBet == nil { + user.LastTimeBet = make([][]*pb.ColorPinoyLiveBetReq, 0) + } + user.LastTimeBet = append(user.LastTimeBet, bets) + user.TotalBet += totalBetAmount + // log.Debug("上次下注:", user.LastTimeBet) + rm.MutexData.Lock() + for i, num := range betInfos { + if num > 0 { + user.TotalBets[i] += num + rm.TotalBets[i] += num + + SendSuccessMessage := new(pb.ColorPinoyLiveBetSuccessMessage) + SendSuccessMessage.BetType = pb.ColorPinoyLiveBetTypeJP(i) + SendSuccessMessage.UserBet = num + SendSuccessMessage.UserBets = user.TotalBets[i] + num + SendSuccessMessage.TotalBets = rm.TotalBets[i] + num + oneBetMessage.BetInfo = append(oneBetMessage.BetInfo, SendSuccessMessage) + } + } + // 统计个区域投注次数 + // user.TotalBetsCount = make([]int64, config.BET_TYPE_NUM) + for i, count := range betCountInfos { + if count > 0 { + user.TotalBetsCount[i] += count + } + } + user.AllBet += totalBetAmount + user.NoBetCount = 0 + oneBetMessage.UserScore = user.Balance + // oneBetMessage.UserBets = user.TotalBets[:] + + rm.TotalBet += totalBetAmount + rm.MutexData.Unlock() + + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameSeatUserBet), oneBetMessage) + live.PushColorBet(&lws.CPLBet{ + Uid: user.UserID, + Nickname: user.UserInetr.GetNike(), + Bet: totalBetAmount, + Avatar: user.UserInetr.GetHead(), + }) +} + +func (rm *ColorRoom) UndoBet(user *model.User, undoType pb.ColorPinoyLiveUndoType) { + + betInfos := [config.BET_TYPE_NUM]int64{} + betCountInfos := [config.BET_TYPE_NUM]int64{} + totalBetAmount := int64(0) + undoBetMessage := &pb.S2CUndoBet{} + undoBetMessage.Uid = user.UserID + undoBetMessage.BetInfo = []*pb.ColorPinoyLiveBetSuccessMessage{} + undoBetMessage.UndoType = undoType + + if rm.GetGameStatus() != pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus { + log.Error(rm.Log("玩家(%d) UndoBet data err GetGameStatus:%v,LastTimeBet:%v ", user.UserID, rm.GetGameStatus(), user.LastTimeBet)) + model.SendBetFailMessage(model.StatusError, user) + return + } + if len(user.LastTimeBet) == 0 { + log.Error(rm.Log("玩家(%d) LastTimeBet null err:%v ", user.UserID, user.LastTimeBet)) + model.SendBetFailMessage(model.LastBetNull, user) + return + } + var bets []*pb.ColorPinoyLiveBetReq + if undoType == pb.ColorPinoyLiveUndoType_ColorPinoyLiveUndoOne { + bets = user.LastTimeBet[len(user.LastTimeBet)-1] + } else if undoType == pb.ColorPinoyLiveUndoType_ColorPinoyLiveUndoAll { + for _, bet := range user.LastTimeBet { + bets = append(bets, bet...) + } + } else { + log.Error(rm.Log("玩家(%d) undoType err %v,", user.UserID, undoType)) + model.SendBetFailMessage(model.DataErr, user) + return + } + if len(bets) == 0 { + log.Error(rm.Log("玩家(%d) bets err %v,", user.UserID, bets)) + model.SendBetFailMessage(model.LastBetNull, user) + return + } + for _, bet := range bets { + // 判断下注下标和下注区域下标是否超出列表 + if _, ok := pb.ColorPinoyLiveBetTypeJP_name[int32(bet.BetType)]; !ok { + log.Error(rm.Log("玩家(%d) bet err %v,", bet)) + model.SendBetFailMessage(model.DataErr, user) + return + } + totalBetAmount += bet.BetAmount + betInfos[bet.BetType%config.BET_TYPE_NUM] += bet.BetAmount + betCountInfos[bet.BetType%config.BET_TYPE_NUM] += 1 + } + + if totalBetAmount > 0 { + user.AddBalance(totalBetAmount) + } + + if user.LastTimeBet != nil && len(user.LastTimeBet) > 0 { + if undoType == pb.ColorPinoyLiveUndoType_ColorPinoyLiveUndoOne { + user.LastTimeBet = user.LastTimeBet[:len(user.LastTimeBet)-1] + } else { + user.LastTimeBet = nil + } + } + + rm.MutexData.Lock() + for i, num := range betInfos { + user.TotalBets[i] -= num + rm.TotalBets[i] -= num + } + // 统计个区域投注次数 + for i, count := range betCountInfos { + if count > 0 { + user.TotalBetsCount[i] -= count + } + if user.TotalBetsCount[i] < 0 { + user.TotalBetsCount[i] = 0 + } + } + rm.TotalBet -= totalBetAmount + + user.TotalBet -= totalBetAmount + user.AllBet -= totalBetAmount + user.NoBetCount = 0 + + for i, num := range betInfos { + + SendSuccessMessage := new(pb.ColorPinoyLiveBetSuccessMessage) + SendSuccessMessage.SeatId = int32(user.SceneChairId) + SendSuccessMessage.BetType = pb.ColorPinoyLiveBetTypeJP(i) + SendSuccessMessage.UserBet = num + SendSuccessMessage.UserBets = user.TotalBets[i] + SendSuccessMessage.TotalBets = rm.TotalBets[i] + + undoBetMessage.BetInfo = append(undoBetMessage.BetInfo, SendSuccessMessage) + } + rm.MutexData.Unlock() + // 玩家当前分数 + undoBetMessage.UserScore = user.Balance + + // log.Debug("undoBetMessage %v", undoBetMessage) + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeUndoBet), undoBetMessage) + +} +func (rm *ColorRoom) KickOutUser(u *model.User) { + // delete(rm.AllUserList, k) + rm.DeletePlayer(u.UserID) + if u.SceneChairId != 0 { + rm.OnUserStanUp(u) + } + role := "机器人" + // rm.DeleteExitUserFromOnlineUserListSlice(u) + if !u.IsRobot { + rm.Table.KickOut(u.UserInetr) + role = "玩家" + } + log.Debug(rm.Log("删除(%s)(%d) 金额:%d 输赢:%d", role, u.UserID, u.Balance, u.Balance-u.UserInetr.GetScore())) + rm.SendOnlinePlayerNum() +} +func (rm *ColorRoom) TransInoutGameBet(user *model.User, bet int64) error { + if config.CHIPS_DEBUG { + user.Balance -= bet + return nil + } + user.Mn.Lock() + defer user.Mn.Unlock() + transferInOutResp, err := rm.Table.TransInoutGameCarryAdd(user.UserInetr, rm.Table.GetLevel(), bet, "") + if err != nil { + return err + } + user.Balance = transferInOutResp.Balance + user.Carry = transferInOutResp.Carry + user.UserInetr.SetPreserve(transferInOutResp.Preserve) + // time.Sleep(10 * time.Second) + return nil +} +func (rm *ColorRoom) TransInoutGameEnd(user *model.User, bet int64, amountWin int64, tax int64) (int64, error) { + if config.CHIPS_DEBUG || user.IsRobot { + user.Balance += amountWin + return amountWin, nil + } + transferInOutResp, err := rm.Table.TransInoutGameEnd(user.UserInetr, rm.Table.GetLevel(), bet+tax, amountWin+tax, "") + if err != nil { + return 0, err + } + user.Balance = transferInOutResp.GetBalance() + if transferInOutResp.GetRealTransfer() == 0 { + return 0, errors.New("error") + } + user.TransBet += bet + user.TransWin += amountWin + // time.Sleep(10 * time.Second) + return transferInOutResp.RealTransfer, nil +} + +func (rm *ColorRoom) ResetUserBet(user *model.User) { + rm.MutexData.Lock() + for i, bet := range user.TotalBets { + rm.TotalBets[i] -= bet + // rm.BetNumber[i] -= user.BetNumber[i] + } + rm.TotalBet -= user.TotalBet + rm.MutexData.Unlock() + user.TotalBet = 0 + user.TotalBets = [config.BET_TYPE_NUM]int64{} + // user.BetNumber = [config.BET_TYPE_NUM]int64{} + +} + +func (rm *ColorRoom) StartTransInoutBet() { + wg := new(sync.WaitGroup) + var failUser []*model.User + failMutx := &sync.Mutex{} + rm.Traverse(func(u *model.User) bool { + wg.Add(1) + go func(user *model.User) { + defer wg.Done() + user.Mn.Lock() + defer user.Mn.Unlock() + if user.TotalBet > 0 { + _, err := rm.TransInoutGameEnd(user, user.TotalBet, 0, 0) + if err != nil { + func() { + failMutx.Lock() + defer failMutx.Unlock() + failUser = append(failUser, user) + }() + } + } + }(u) + return true + }) + wg.Wait() + // 异步扣款完成后,处理部分扣款失败回滚操作 + if len(failUser) > 0 { + pbMsg := &pb.ColorPinoyLiveS2CBetEndFailResult{ + Code: 1, + } + for _, user := range failUser { + rm.ResetUserBet(user) + player := &pb.ColorPinoyLiveS2CRepetBet{} + player.UserScore = user.Balance + player.Uid = user.UserID + + var bets []*pb.ColorPinoyLiveBetReq + for _, bet := range user.LastTimeBet { + bets = append(bets, bet...) + } + for _, bet := range bets { + // 判断下注下标和下注区域下标是否超出列表 + if _, ok := pb.ColorPinoyLiveBetTypeJP_name[int32(bet.BetType)]; !ok { + log.Error(rm.Log("玩家(%d) bet err %v,", bet)) + model.SendBetFailMessage(model.DataErr, user) + return + } + SendSuccessMessage := new(pb.ColorPinoyLiveBetSuccessMessage) + SendSuccessMessage.BetIndex = bet.BetIndex + SendSuccessMessage.BetLevel = bet.BetLevel + SendSuccessMessage.BetType = bet.BetType + SendSuccessMessage.SeatId = int32(user.SceneChairId) + SendSuccessMessage.UserBet = bet.BetAmount + SendSuccessMessage.TotalBets = rm.TotalBets[bet.BetType] + + player.BetInfo = append(player.BetInfo, SendSuccessMessage) + } + pbMsg.Players = append(pbMsg.Players, player) + } + // log.Debug("玩家停止下注后 扣钱失败: %v", pbMsg) + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticePlayerBetEndResultFailed), pbMsg) + } + // 大客投注 + var allWinner []*pb.ColorPinoyLiveBigWinner + rm.Traverse(func(user *model.User) bool { + if user.TotalBet > 0 { + allWinner = append(allWinner, &pb.ColorPinoyLiveBigWinner{NickName: user.UserInetr.GetNike(), Avatar: user.UserInetr.GetHead(), WinChips: user.TotalBet, AreaId: user.TotalBets[:]}) + } + return true + }) + rm.updateBigWinner(allWinner) + bigMsg := &pb.ColorPinoyLivePlayerBigWinner{BigBet: allWinner, Jackpot: rm.jackpotMgr.GetJackpot()} + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameBigWinner), bigMsg) + + rm.TimerJob, _ = rm.Table.AddTimer(time.Duration(rm.RoomCfg.TimeConf.Endmove), func() { + rm.NotifyBigBetAreaMul() + }) + allUserTotalBet := int64(0) // 所有玩家投注未中奖的总金额,用于计算jackpot池 + rm.Traverse(func(user *model.User) bool { + if user.TotalBet < 1 { + return true + } + allUserTotalBet += user.TotalBet + return true + }) + log.Debug(rm.Log("本局总投注金额为:%v 赎回比例:%v 追加比例:%v 满额追加比例:%v", allUserTotalBet, rm.Cfg.JpXRate, rm.Cfg.JpYRate, rm.Cfg.JpXYRate)) + rm.jackpotX, rm.jackpotY = rm.jackpotMgr.AddJp(allUserTotalBet, int64(rm.Cfg.JpXRate), int64(rm.Cfg.JpYRate), int64(rm.Cfg.JpXYRate)) + if rm.jackpotX > 0 || rm.jackpotY > 0 { + rm.kafkaJackpotUserRepaid(rm.jackpotX, rm.jackpotY) + } +} + +// 计算 下注区域中奖得分,返回是否有jp奖,jp奖位置,中奖人数 +func (rm *ColorRoom) CalculateJackpotScore() (pb.ColorPinoyLiveBetTypeJP, map[int64]int64) { + jackpotArea := pb.ColorPinoyLiveBetTypeJP(-1) + for _, winArea := range rm.PokerMsg.WinBetArea { + if !winArea.IsJackpot || !winArea.IsWin { + continue + } + color := getColorByBetArea(winArea.BetArea) + colorCount := getColorCount(rm.NormalDices, color) + if colorCount != 3 { + continue + } + jackpotArea = winArea.BetArea + rm.Traverse(func(user *model.User) bool { + if user.TotalBets[winArea.BetArea] <= 0 { + return true + } + rm.jackpotMgr.AddJpUser(user.UserID, user.TotalBets[winArea.BetArea]) + return true + }) + } + rm.jackpotUser, rm.costJackpot = rm.jackpotMgr.WinJackpot() + if rm.costJackpot > 0 { + rm.kafkaHitJackpot(rm.costJackpot, rm.jackpotUser) + } + log.Debug(rm.Log("本局是否中jackpot奖:%v, 玩家一起分走jackpot:%v, 当前jackpot值:%v", rm.costJackpot > 0, rm.costJackpot, rm.jackpotMgr.GetJackpot())) + return jackpotArea, rm.jackpotUser +} + +// 计算 所有玩家的下注区域中奖得分 +func (rm *ColorRoom) CalculateAllUserScore() { + // 赢钱会清空jackpot池 + jpArea, userJackPot := rm.CalculateJackpotScore() + var jackpotUserName []string + rm.Traverse(func(user *model.User) bool { + msg := new(pb.ColorPinoyLiveUserSettleMsg) + msg.WinAreaOdd = rm.PokerMsg.WinBetArea + msg.UserBets = rm.CopyArr(user.TotalBets) + msg.UserRealWins = make([]int64, config.BET_TYPE_NUM) + msg.UserWins = make([]int64, config.BET_TYPE_NUM) + + if user.TotalBet > 0 { + // 算分 + jpScore := userJackPot[user.UserID] + rm.CalculateScore(user, jpArea, jpScore, msg) + if jpScore > 0 { + jackpotUserName = append(jackpotUserName, user.UserInetr.GetNike()) + rm.BroadHitJackpot(user, jpScore) + } + } + // 统计玩家信息 + if msg.TotalWin > user.TotalBet { + user.UserCount(true, msg.TotalWin) + } else { + user.UserCount(false, 0) + } + user.Balance += msg.TotalWin + msg.UserScore = user.Balance + user.SettleMsg = msg + return true + }) + rm.Traverse(func(user *model.User) bool { + user.SettleMsg.JackpotUserName = jackpotUserName + return true + }) +} + +// 计算 下注区域中奖得分 +func (rm *ColorRoom) CalculateScore(user *model.User, jpArea pb.ColorPinoyLiveBetTypeJP, jpScore int64, msg *pb.ColorPinoyLiveUserSettleMsg) { + for _, winArea := range msg.WinAreaOdd { + if msg.UserBets[winArea.BetArea] <= 0 { + continue + } + if jpArea != winArea.BetArea { + odds := winArea.Odd + // 奖金计算公式 Payouts =( Odds * Bet ) * ( 1 + Bonus) + Bet odds 是倍率 Bonus是猜中幸运骰子 的加成 + // 本区域赢未扣税 倍率是百分值所以计算时要除以100 + win2 := (odds * msg.UserBets[winArea.BetArea]) / 100 + // 本区域赢扣税 + Gold := win2 * (100 - rm.RoomCfg.Rate) / 100 + // 算税() + msg.Tax += win2 - Gold + // 加回投注本金 + Gold += msg.UserBets[winArea.BetArea] + msg.TotalWin += Gold + // 统计赢区的下注总额 + msg.TotalWinBaseBet += msg.UserBets[winArea.BetArea] + + msg.UserWins[winArea.BetArea] += win2 + msg.UserRealWins[winArea.BetArea] += Gold + log.Debug(rm.LogEx(user, "算分 odds:%v 投注区:%v win2:%v Gold:%v", odds, winArea.BetArea, win2, Gold)) + } else { + win2 := jpScore + // 本区域赢扣税 + Gold := jpScore * (100 - rm.RoomCfg.Rate) / 100 + // 算税() + msg.Tax += win2 - Gold + // 加回投注本金 + Gold += msg.UserBets[winArea.BetArea] + msg.TotalWin += Gold + // 统计赢区的下注总额 + msg.TotalWinBaseBet += msg.UserBets[winArea.BetArea] + + msg.UserWins[winArea.BetArea] += win2 + msg.UserRealWins[winArea.BetArea] += Gold + msg.JackpotWin = Gold + log.Debug(rm.LogEx(user, "算分 jackpot 投注区:%v win2:%v Gold:%v", winArea.BetArea, win2, Gold)) + } + } + +} + +type areaWin struct { + areaId int64 + win int64 +} + +// 更新大赢家 +func (rm *ColorRoom) updateBigWinner(allWinner []*pb.ColorPinoyLiveBigWinner) { + // log.Debug(fmt.Sprintf("allWinner:%+v", allWinner)) + rm.BigWinner = rm.BigWinner[:0] + sort.Slice(allWinner, func(i, j int) bool { + return allWinner[i].WinChips > allWinner[j].WinChips + }) + if len(allWinner) > BigWinnerCount { + allWinner = allWinner[:BigWinnerCount] + } + for _, winner := range allWinner { + var areaWins []*areaWin + for areaId, win := range winner.AreaId { + if win > 0 { + areaWins = append(areaWins, &areaWin{areaId: int64(areaId), win: win}) + } + } + sort.Slice(areaWins, func(i, j int) bool { + return areaWins[i].win > areaWins[j].win + }) + if len(areaWins) > BigWinnerCount { + areaWins = areaWins[:BigWinnerCount] + } + winner.AreaId = make([]int64, 0, BigWinnerCount) + for _, area := range areaWins { + winner.AreaId = append(winner.AreaId, area.areaId) + } + } + rm.BigWinner = allWinner +} + +// 和平台做结算 +func (rm *ColorRoom) SetUserSettleMsg() { + var allWinner []*pb.ColorPinoyLiveBigWinner + rm.CalculateAllUserScore() + wg := new(sync.WaitGroup) + rm.Traverse(func(uu *model.User) bool { + wg.Add(1) + go func(u *model.User) { + defer wg.Done() + if u.TotalBet > 0 { + // 和平台做赢钱结算 + // if msg.TotalWin > 0 { + _, err := rm.TransInoutGameEnd(u, 0, u.SettleMsg.TotalWin, u.SettleMsg.Tax) + if err != nil { + log.Error(rm.Log(err.Error())) + // model.SendBetFailMessage(model.BalanceError, u) + } + // } + } + }(uu) + return true + }) + wg.Wait() + // 异步加钱完成后再执行后续的结算操作 + rm.Traverse(func(u *model.User) bool { + msg := u.SettleMsg + if msg == nil || msg.TotalWin < 1 { + return true + } + winner := &pb.ColorPinoyLiveBigWinner{ + NickName: u.UserInetr.GetNike(), + Avatar: u.UserInetr.GetHead(), + WinChips: msg.TotalWin, + AreaId: msg.UserRealWins, + } + allWinner = append(allWinner, winner) + log.Debug(rm.LogEx(u, "赢钱:%v", winner.WinChips)) + return true + }) + rm.updateBigWinner(allWinner) + + rm.SetGameTrend() + rm.sendSettleMsg2Client() + // log.Debug(time.Now().Unix() - rm.endAt) + rm.Table.EndGame() + rm.NotifyLiveDelayUpdate() // 通知延迟更新服务器配置,切换维护状态 + rm.TimerJob, _ = rm.Table.AddTimer(time.Duration(rm.RoomCfg.TimeConf.Endpay), func() { + rm.Rank() + }) +} + +func (rm *ColorRoom) CountUser(u *model.User) { + u.Icon = 0 + // rm.OnlineUserList = append(rm.OnlineUserList, u) +} +func (rm *ColorRoom) ResetData(all bool) { + rm.TotalBets = [config.BET_TYPE_NUM]int64{} + rm.TotalBet = 0 + rm.LuckyDice = 0 + rm.NormalDices = make([]byte, 3) + rm.StartDices = make([]byte, 3) + rm.ResultImgs = make([]string, 0) + rm.InitBigOddsBetAreas() + + if all { + rm.LiveMgr.Reset() + rm.Traverse(func(u *model.User) bool { + u.ResetUserData() + u.RetrunGold = 0 + return true + }) + } +} +func (rm *ColorRoom) GetPairDice(count int, startIndex int, endIndex int) []byte { + if gconfig.GConfig.IsProd() { + return nil + } + // PokerCard 表示一张扑克牌 + type Dice struct { + Color int // 花色 + Point int // 点数 + } + type PairDice struct { + Cards []Dice + } + key := fmt.Sprintf("preset-cards:0:color:%d", rm.Table.GetId()) + log.Debug(rm.Log("获取配牌配置 key:", key)) + str := redisf.RSC.GetPairCard(key) + if str == "" { + return nil + } + pairCard := new(PairDice) + err := json.Unmarshal([]byte(str), pairCard) + if err != nil { + log.Debug(rm.Log("getPairCard:%v", err)) + return nil + } + if len(pairCard.Cards) < 2 { + log.Error(rm.Log("getPairCard ", pairCard)) + return nil + } + log.Debug(rm.Log("getPairCard pairCard:%v", pairCard)) + var res []byte + for index, card := range pairCard.Cards { + if index >= startIndex && index < endIndex { + res = append(res, byte(card.Point)) + if (len(res)) == count { + break + } + } + } + return res +} + +func (rm *ColorRoom) GetGameTrend() (luckyRates []int32) { + // var mapLuckyRate = map[pb.ColorPinoyLiveDiceColorType]int32{} + // for _, trend := range rm.GameTrend.ListTrendGroup { + // mapLuckyRate[trend.LuckyDice]++ + // } + // for i := pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_YELLOW; i <= pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_GREEN; i++ { + // luckyRates = append(luckyRates, 0) + // } + // if len(mapLuckyRate) > 0 { + // for k, v := range mapLuckyRate { + // // log.Debug(fmt.Sprintf("颜色:%v 数量:%v 总数量:%v 配置:%v", k, v, len(rm.GameTrend.ListTrendGroup), config.WinTrendNum)) + // if int(k-1) < len(luckyRates) { + // luckyRates[k-1] = v * 10000 / int32(len(rm.GameTrend.ListTrendGroup)) + // } + // } + // } + + return luckyRates + +} + +func (rm *ColorRoom) SetGameTrend() { + + trendGroup := new(pb.ColorPinoyLiveTrendGroup) + trendGroup.LuckyDice = pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)) + for _, dice := range rm.NormalDices { + trendGroup.ThreeDice = append(trendGroup.ThreeDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + + rm.GameTrend.ListTrendGroup = append(rm.GameTrend.ListTrendGroup, trendGroup) + + // log.Debug("走势图 rm.GameTrend.ListTrendGroup: ", rm.GameTrend.ListTrendGroup) + winlen := len(rm.GameTrend.ListTrendGroup) + if winlen > config.WinTrendNum { + rm.GameTrend.ListTrendGroup = rm.GameTrend.ListTrendGroup[(winlen - config.WinTrendNum):] + } + + if rm.ServerStatus == define.GameStatusNoraml { + str, err := json.Marshal(rm.GameTrend.ListTrendGroup) + if err != nil { + return + } + redisf.RSC.SetColorGameTrend(rm.TrendRedisKey, str) + // log.Debug("SetGameTrend 保存走势图到redis :", str) + + } +} + +// 获取投注区域的颜色 +func getColorByBetArea(area pb.ColorPinoyLiveBetTypeJP) pb.ColorPinoyLiveDiceColorType { + switch area { + case pb.ColorPinoyLiveBetTypeJP_CLJ_Yellow, pb.ColorPinoyLiveBetTypeJP_CLJ_Double_Yellow, pb.ColorPinoyLiveBetTypeJP_CLJ_Three_Yellow: + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_YELLOW + case pb.ColorPinoyLiveBetTypeJP_CLJ_White, pb.ColorPinoyLiveBetTypeJP_CLJ_Double_White, pb.ColorPinoyLiveBetTypeJP_CLJ_Three_White: + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_WHITE + case pb.ColorPinoyLiveBetTypeJP_CLJ_Pink, pb.ColorPinoyLiveBetTypeJP_CLJ_Double_Pink, pb.ColorPinoyLiveBetTypeJP_CLJ_Three_Pink: + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_PINK + case pb.ColorPinoyLiveBetTypeJP_CLJ_Blue, pb.ColorPinoyLiveBetTypeJP_CLJ_Double_Blue, pb.ColorPinoyLiveBetTypeJP_CLJ_Three_Blue: + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_BLUE + case pb.ColorPinoyLiveBetTypeJP_CLJ_Red, pb.ColorPinoyLiveBetTypeJP_CLJ_Double_Red, pb.ColorPinoyLiveBetTypeJP_CLJ_Three_Red: + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_RED + case pb.ColorPinoyLiveBetTypeJP_CLJ_Green, pb.ColorPinoyLiveBetTypeJP_CLJ_Double_Green, pb.ColorPinoyLiveBetTypeJP_CLJ_Three_Green: + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_GREEN + } + return pb.ColorPinoyLiveDiceColorType_ColorPinoyLiveType_Void +} + +func getColorCount(result []byte, color pb.ColorPinoyLiveDiceColorType) int { + count := 0 + for _, c := range result { + if model.GetColor(c) == int32(color) { + count++ + } + } + return count +} + +func stringDices(result []byte) string { + s := "" + for _, c := range result { + s += fmt.Sprintf("%v", pb.ColorPinoyLiveDiceColorType(model.GetColor(c))) + } + return s +} + +// 检查投掷结果是否匹配某个下注区域 +func isWinningArea(result []byte, area pb.ColorPinoyLiveBetTypeJP) (win bool, bigPos pb.ColorPinoyLiveBigBetAreaPos, colorCount int) { + color := getColorByBetArea(area) + colorCount = getColorCount(result, color) + if colorCount == 0 { + return false, 0, colorCount + } + // 单色投注区,查看开出几个该颜色 + if area < pb.ColorPinoyLiveBetTypeJP_CLJ_Double_Yellow { + if colorCount == 1 { + return true, pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_0, colorCount + } else if colorCount == 2 { + return true, pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_1, colorCount + } else { + return true, pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_2, colorCount + } + } else if area < pb.ColorPinoyLiveBetTypeJP_CLJ_Three_Yellow { + if colorCount > 1 { + return true, pb.ColorPinoyLiveBigBetAreaPos_BBA_Double, colorCount + } + } else { + if colorCount > 2 { + return true, pb.ColorPinoyLiveBigBetAreaPos_BBA_Three, colorCount + } + } + return false, 0, colorCount +} + +// 计算开奖结果 +func (rm *ColorRoom) CompareDiceResult() { + var wins []*pb.ColorPinoyLiveBetAreaOdd + // // 存储中奖区域 + result := rm.NormalDices + log.Debug(rm.Log("开奖结果:%v", stringDices(result))) + rm.afterBetAreaOdds = rm.afterBetAreaOdds[0:0] + // 检查所有下注区域是否中奖 + for pos, area := range rm.betEndBetAreasOdds { + betAreaOdd := &pb.ColorPinoyLiveBetAreaOdd{ + BetArea: area.BetType, + Odd: area.Odd[0], + ViewOdd: 0, + IsBigOdd: area.IsBigOdd, + BigSingleColorOddPos: area.BigSingleColorOddPos, + IsWin: false, + IsJackpot: area.IsJackpot, + } + if pos/6 == 0 { + // 第一行投注区域,赔率是多个赔率中的一个 + betAreaOdd.Odd = area.Odd[area.BigSingleColorOddPos] + } else { + betAreaOdd.Odd = area.Odd[0] + } + betAreaOdd.ViewOdd = betAreaOdd.Odd + // 更新实际赔率 + isWin, winOddPos, colorCount := isWinningArea(result, area.BetType) + betAreaOdd.IsWin = isWin + if betAreaOdd.IsWin { + if betAreaOdd.IsJackpot && colorCount == 3 { + betAreaOdd.Odd = 0 + } else { + if winOddPos == pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_0 { + betAreaOdd.Odd = area.Odd[0] + } else if winOddPos == pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_1 { + betAreaOdd.Odd = area.Odd[1] + } else if winOddPos == pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_2 { + betAreaOdd.Odd = area.Odd[2] + } + // 爆奖需要修正 + if betAreaOdd.IsBigOdd && winOddPos > betAreaOdd.BigSingleColorOddPos { + betAreaOdd.Odd = area.Odd[area.BigSingleColorOddPos] + } + } + wins = append(wins, betAreaOdd) + } + + // 修正牌局记录倍率 + tmpAreaOdd := &pb.ColorPinoyLiveBetAreaOdd{ + BetArea: betAreaOdd.BetArea, + Odd: betAreaOdd.Odd, + ViewOdd: betAreaOdd.ViewOdd, + IsBigOdd: betAreaOdd.IsBigOdd, + BigSingleColorOddPos: betAreaOdd.BigSingleColorOddPos, + IsWin: betAreaOdd.IsWin, + IsJackpot: betAreaOdd.IsJackpot, + } + if !tmpAreaOdd.IsWin && pos/6 == 0 && + (betAreaOdd.BigSingleColorOddPos == pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_1 || + betAreaOdd.BigSingleColorOddPos == pb.ColorPinoyLiveBigBetAreaPos_BBA_Single_2) { + tmpAreaOdd.Odd = area.Odd[0] + if !tmpAreaOdd.IsBigOdd { + tmpAreaOdd.ViewOdd = tmpAreaOdd.Odd + } + } + if !tmpAreaOdd.IsWin && pos/6 == 1 && tmpAreaOdd.IsBigOdd { + tmpAreaOdd.Odd = rm.RoomCfg.ColorPinoyLiveConfig.WinDoubleColorMul[0].Mul + } + if !tmpAreaOdd.IsWin && pos/6 == 2 && tmpAreaOdd.IsBigOdd { + tmpAreaOdd.Odd = rm.RoomCfg.ColorPinoyLiveConfig.WinThreeColorMul[0].Mul + } + + rm.afterBetAreaOdds = append(rm.afterBetAreaOdds, tmpAreaOdd) + log.Debug(rm.Log("开奖,区域:%v 是否中奖:%v 实际赔率:%v 显示赔率:%v 是否爆奖:%v 爆奖位置:%v", betAreaOdd.BetArea, betAreaOdd.IsWin, betAreaOdd.Odd, + betAreaOdd.ViewOdd, betAreaOdd.IsBigOdd, betAreaOdd.BigSingleColorOddPos)) + } + rm.PokerMsg.WinBetArea = wins +} + +// 检查用户是否被踢掉 +func (rm *ColorRoom) checkUserBet() { + kickMsg, isKick := redisf.RSC.IsGameMaintenance(gconfig.GConfig.GRoomConfig.ChannelId, gconfig.GConfig.GServConfig.GameId) + rm.Traverse(func(u *model.User) bool { + u.NoBetCount++ + if isKick { + msg := new(pb.ColorPinoyLiveKickOutUserMsg) + // msg.KickOutReason = fmt.Sprintf("you did not bet %d games", rm.RoomCfg.LongHuConfig.NoBetCountMax) + msg.Reason = int32(pb.ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_Maintaince) + msg.KickOutReason = kickMsg + u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeKickOutUser), msg) + u.NoBetCount = 0 + rm.KickOutUser(u) + return true + } + if rm.ServerStatus != define.GameStatusNoraml || u.UserInetr.NeedKickout() { + msg := new(pb.ColorPinoyLiveKickOutUserMsg) + // msg.KickOutReason = fmt.Sprintf("game server maintenance ") + msg.Reason = int32(pb.ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_PLAYER_QUIT_ROOM) + u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeKickOutUser), msg) + rm.KickOutUser(u) + return true + } + if redisf.RSC.IsUserLiveBan(u.UserInetr.GetOpToken(), int64(gconfig.GConfig.GRoomConfig.GameId), u.UserID) { + msg := new(pb.ColorPinoyLiveKickOutUserMsg) + msg.Reason = int32(pb.ColorPinoyLiveLeaveReason_ColorPinoyLiveLeaveReason_Ban) + u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeKickOutUser), msg) + rm.KickOutUser(u) + return true + } + // if u.NoBetCount >= (rm.RoomCfg.ColorPinoyLiveConfig.NoBetCountMax + 1) { + // msg := new(pb.ColorPinoyLiveKickOutUserMsg) + // // msg.KickOutReason = fmt.Sprintf("you did not bet %d games", rm.RoomCfg.LongHuConfig.NoBetCountMax) + // msg.Reason = 1 + // u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeKickOutUser), msg) + // // 踢掉用户 + // u.NoBetCount = 0 + // rm.KickOutUser(u) + // return true + // } + + return true + }) +} + +// 初始走势图 +func (rm *ColorRoom) InitWinTrend() { + rm.TrendRedisKey = fmt.Sprintf("pb.:%d:%d:trend", gconfig.GConfig.GDataConfig.VersionMode, rm.RoomCfg.Level) + if rm.ServerStatus == define.GameStatusNoraml { + winTrend := redisf.RSC.GetColorGameTrend(rm.TrendRedisKey) + if winTrend != "" { + rm.GameTrend = new(pb.ColorPinoyLiveTrend) + rm.GameTrend.ListTrendGroup = []*pb.ColorPinoyLiveTrendGroup{} + err := json.Unmarshal([]byte(winTrend), &rm.GameTrend.ListTrendGroup) + winlen := len(rm.GameTrend.ListTrendGroup) + // log.Debug("初始化走势图1:", len(rm.GameTrend.ListTrendGroup)) + if winlen > config.WinTrendNum { + rm.GameTrend.ListTrendGroup = rm.GameTrend.ListTrendGroup[(winlen - config.WinTrendNum):] + // log.Debug("初始化走势图2:", len(rm.GameTrend.ListTrendGroup)) + } + // log.Debug("初始化走势图:", rm.GameTrend.ListTrendGroup) + if err != nil { + log.Error(rm.Log("初始化走势图:%v", err)) + } + } + + } + +} + +func (rm *ColorRoom) DeleteExitUserFromOnlineUserListSlice(user *model.User) { + rm.MutexUserList.Lock() + defer rm.MutexUserList.Unlock() + for k, v := range rm.OnlineUserList { + if user == v { + rm.OnlineUserList = append(rm.OnlineUserList[:k], rm.OnlineUserList[k+1:]...) + break + } + } +} + +func (rm *ColorRoom) SelectUserListBalanceTopSitDownChair() { + rm.MutexUserList.Lock() + rm.SceneInfo.ClearSceneChairId() + rm.SceneInfo.Init() + index := len(rm.OnlineUserList) + if index >= config.SEAT_NUM { + index = config.SEAT_NUM + } + cou := model.Usercount{} + cou = rm.OnlineUserList + sort.Sort(cou) + for i := 0; i < index; i++ { + u := rm.OnlineUserList[i] + ChairId := i + 1 + if rm.SceneInfo.SitScene(u, ChairId) { + u.SceneChairId = ChairId + } + } + rm.MutexUserList.Unlock() + +} + +func (rm *ColorRoom) CopyArr(arr [config.BET_TYPE_NUM]int64) []int64 { + slice := make([]int64, len(arr)) + copy(slice, arr[:]) + return slice +} + +func (rm *ColorRoom) GameDiscard() { + rm.TimerJob.Cancel() + rm.GameUserDiscard() + // rm.TimerJob, _ = rm.Table.AddTimer(1000, func() { + // rm.LiveCnt(rm.Ready, false, true, []bool{true}...) + // }) + rm.ResetData(false) + rm.Traverse(func(user *model.User) bool { + if rm.LiveMgr.MaintenanceStatus == 1 { + rm.sendUserMainte(user, int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameMainte)) + } + if rm.LiveMgr.DiscardStatus == 1 { + rm.sendUserMainte(user, int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeDiscard)) + } + return true + }) + rm.Ready() +} + +func (rm *ColorRoom) sendUserMainte(user *model.User, cmd int32) { + userinfo := new(pb.ColorPinoyLiveUserInfo) + userinfo.NikeName = user.UserInetr.GetNike() + userinfo.UserGlod = user.Balance + userinfo.Head = user.UserInetr.GetHead() + userinfo.UserID = user.UserID + _ = user.UserInetr.SendMsg(cmd, &pb.ColorPinoyLiveMainteNtf{ + UserInfo: userinfo, + MaintMsg: rm.LiveMgr.MainteMsg, + ReturnGold: user.RetrunGold, + }) +} + +func (rm *ColorRoom) GameUserDiscard() { + rm.MutexStatus.RLock() + defer rm.MutexStatus.RUnlock() + log.Debug(rm.Log("流局,状态:%v,分出去的jackpot:%v", rm.GetGameStatus(), rm.costJackpot)) + // 回退 + if rm.GetGameStatus() >= pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie && rm.GetGameStatus() < pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus { + rm.jackpotMgr.RollBackJpXAndJpY(0, 0, rm.jackpotX, rm.jackpotY) + rm.kafkaBackJackpot(0, rm.jackpotX, rm.jackpotY, rm.jackpotUser) + } else if rm.GetGameStatus() >= pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus { + rm.jackpotMgr.RollBackJpXAndJpY(rm.costJackpot, rm.jackpotFunding, rm.jackpotX, rm.jackpotY) + rm.kafkaBackJackpot(rm.costJackpot, rm.jackpotX, rm.jackpotY, rm.jackpotUser) + } + + var betCount int64 + GameTotalBets := make([]int64, config.BET_TYPE_NUM) + var PlayerData []*pb.ColorPinoyLivePlayerData + copyBetAreaMul := rm.copyBetAreaOdds() + wg := new(sync.WaitGroup) + playerDataMu := new(sync.Mutex) + rm.Traverse(func(v *model.User) bool { + wg.Add(1) + monitor.GoSafe(func(u *model.User) { + defer wg.Done() + u.RetrunGold = u.TotalBet + msg := new(pb.ColorPinoyLiveUserSettleMsg) + msg.UserBets = rm.CopyArr(u.TotalBets) + msg.UserRealWins = make([]int64, config.BET_TYPE_NUM) + msg.UserWins = make([]int64, config.BET_TYPE_NUM) + msg.WinAreaOdd = rm.PokerMsg.WinBetArea + msg.UserScore = u.Balance + u.SettleMsg = msg + // 写入数据库统计信息 + if u.TotalBet > 0 { + for i, bet := range u.TotalBets { + betCount += bet + GameTotalBets[i] += bet + } + // 玩家下注区域统计 + u.SettleMsg.UserBetsCount = make([]int64, config.BET_TYPE_NUM) + for i, count := range u.TotalBetsCount { + u.SettleMsg.UserBetsCount[i] = count + } + if rm.GetGameStatus() < pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie { + u.AddBalance(u.TotalBet) + } else if rm.GetGameStatus() < pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus { + _, err := rm.TransInoutGameEnd(u, u.TransWin, u.TransBet, 0) + if err != nil { + log.Error(rm.Log("discard error:%v, game_no:%s, uid:%d, TransWin:%d, TransBet:%d", err, rm.Table.GetGameRoundId(), u.UserID, u.TransWin, u.TransBet)) + } + } else { + if rm.LiveMgr.DiscardStatus == 1 { + _, err := rm.TransInoutGameEnd(u, u.TransWin, u.TransBet, 0) + if err != nil { + log.Error(rm.Log("discard error:%v, game_no:%s, uid:%d, TransWin:%d, TransBet:%d", err, rm.Table.GetGameRoundId(), u.UserID, u.TransWin, u.TransBet)) + } + } else { + return + } + } + func() { + playerDataMu.Lock() + defer playerDataMu.Unlock() + PlayerData = append(PlayerData, &pb.ColorPinoyLivePlayerData{ + Uid: u.UserID, + TotalBets: u.SettleMsg.UserBets, // 玩家各个区域的总下注额 + TotalBet: u.TotalBet, + Profit: u.SettleMsg.TotalWin, + Tax: u.SettleMsg.Tax, + Balance: u.Balance, + PreBalance: u.PreBalance, + UserWins: u.SettleMsg.UserWins, // 玩家赢取的下注区域总下注额 + UserRealWins: u.SettleMsg.UserRealWins, // 玩家赢取的下注区域总下注额 扣税后 + AreaOdds: copyBetAreaMul, // 投注区域倍率 + StartTime: u.StartAt, + TransBet: u.TransBet, + TransWin: u.TransWin, + DevMode: u.UserInetr.GetDevMode(), + UserBetsCount: u.SettleMsg.UserBetsCount, + IsDiscard: 1, + }) + }() + } + u.ResetUserData() + }, v) + return true + }) + wg.Wait() + // 发布事件 + if PlayerData == nil || len(PlayerData) == 0 { + return + } + // 开奖结果 + gameDetail := &pb.ColorPinoyLiveDetail{DealerName: rm.dealerName, ResultImg: rm.ResultImgs} + gameDetail.BetAreaMul = copyBetAreaMul + gameRecordData := &pb.ColorPinoyLiveEnd{ + GameNo: fmt.Sprintf("%d|%d|%d", gconfig.GConfig.GRoomConfig.GameId, rm.Table.GetId(), time.Now().UnixMilli()), + StartTime: rm.startAt, + EndTime: rm.endAt, + Level: gconfig.GConfig.GRoomConfig.Level, + BaseBet: rm.RoomCfg.BaseBet, + PlayerData: PlayerData, + TaxRate: rm.RoomCfg.Rate, + TotalBet: betCount, + TotalBets: GameTotalBets[:], + OpToken: gconfig.GConfig.GServConfig.ChannelId, + Detail: gameDetail, + IsDiscard: 1, + } + log.Debug("GameUserDiscard") + go func() { + err := gconfig.Produce(context.Background(), define.TopicColoLiveGameGameEnd, gameRecordData) + if err != nil { + log.Error(rm.Log("[%s] fail to Produce TongitsGameEndEvent(%+v), err: %v", gameRecordData.GameNo, gameRecordData, err)) + } + }() +} + +func (rm *ColorRoom) LoadDealerNames() { + ssv := redisf.RSC.DealerNameGet(gconfig.GConfig.GDataConfig.VersionMode, gconfig.GConfig.GRoomConfig.GameId, GameName) + var dealerNames []string + _ = json.Unmarshal([]byte(ssv), &dealerNames) + rm.dealerName = dealerNames + log.Debug(rm.Log("dealerNames:%v", rm.dealerName)) +} + +// 发送垫资kafka +func (rm *ColorRoom) kafkaJackpotFunding(funding int64) { + msg := &events.JackpotEvent{ + EventType: events.JackpotEvent_et_funding, + GameId: rm.RoomCfg.GameId, + Time: time.Now().UnixMilli(), + Funding: &events.JackpotEvent_Funding{Funding: funding}, + GameNo: rm.Table.GetGameRoundId(), + } + go func() { + err := gconfig.Produce(context.Background(), define.TopicJackpot, msg) + if err != nil { + log.Error(rm.Log("kafka JackpotEvent_et_funding err: %v", err)) + } + }() + log.Debug(rm.Log("kafka 垫资:%v", funding)) +} + +// 发送赎回及追加kafka +func (rm *ColorRoom) kafkaJackpotUserRepaid(jpx, jpy int64) { + msg := &events.JackpotEvent{ + EventType: events.JackpotEvent_et_user_repaid, + GameId: rm.RoomCfg.GameId, + Time: time.Now().UnixMilli(), + UserRepaid: &events.JackpotEvent_UserRepaid{JackpotX: jpx, JackpotY: jpy}, + GameNo: rm.Table.GetGameRoundId(), + } + go func() { + err := gconfig.Produce(context.Background(), define.TopicJackpot, msg) + if err != nil { + log.Error(rm.Log("kafka JackpotEvent_et_user_repaid err: %v", err)) + } + }() + log.Debug(rm.Log("kafka 赎回jpx:%v 追加jpy:%v", jpx, jpy)) +} + +// 中jackpot分奖 +func (rm *ColorRoom) kafkaHitJackpot(jackpot int64, userJp map[int64]int64) { + msg := &events.JackpotEvent{ + EventType: events.JackpotEvent_et_hit_jackpot, + GameId: rm.RoomCfg.GameId, + Time: time.Now().UnixMilli(), + HitJackpot: &events.JackpotEvent_HitJackpot{SumJackpot: jackpot, UserJackpot: userJp}, + GameNo: rm.Table.GetGameRoundId(), + } + go func() { + err := gconfig.Produce(context.Background(), define.TopicJackpot, msg) + if err != nil { + log.Error(rm.Log("kafka JackpotEvent_HitJackpot err: %v", err)) + } + }() + log.Debug(rm.Log("kafka 中jackpot:%v", jackpot)) +} + +func (rm *ColorRoom) kafkaBackJackpot(jackpot, jpx, jpy int64, userJp map[int64]int64) { + userJp2 := make(map[int64]int64) + for k, v := range userJp { + userJp2[k] = -v + } + msg := &events.JackpotEvent{ + EventType: events.JackpotEvent_et_game_discard, + GameId: rm.RoomCfg.GameId, + Time: time.Now().UnixMilli(), + GameDiscard: &events.JackpotEvent_GameDiscard{ + Jackpot: -jackpot, + JackpotX: -jpx, + JackpotY: -jpy, + UserJackpot: userJp2, + }, + GameNo: rm.Table.GetGameRoundId(), + } + go func() { + err := gconfig.Produce(context.Background(), define.TopicJackpot, msg) + if err != nil { + log.Error(rm.Log("kafka JackpotEvent_HitJackpot err: %v", err)) + } + }() + log.Debug(rm.Log("kafka 回退jackpot:%v jpx:%v jpy:%v", -jackpot, -jpx, -jpy)) +} diff --git a/server/colorgame/room/onMessage.go b/server/colorgame/room/onMessage.go deleted file mode 100644 index a2fb923..0000000 --- a/server/colorgame/room/onMessage.go +++ /dev/null @@ -1,16 +0,0 @@ -package room - -import ( - "game/common/proto/pb" - "github.com/fox/fox/ipb" -) - -func (rm *ColorRoom) checkEnterRoom(user *ColorPlayer, iMsg *ipb.InternalMsg, req *pb.C2SMatchRoom) { - - return -} - -func (rm *ColorRoom) OnEnterRoom(user *ColorPlayer, iMsg *ipb.InternalMsg, req *pb.C2SMatchRoom) { - - return -} diff --git a/server/colorgame/room/process.go b/server/colorgame/room/process.go new file mode 100644 index 0000000..937d408 --- /dev/null +++ b/server/colorgame/room/process.go @@ -0,0 +1,117 @@ +package room + +import ( + "encoding/json" + "game/common/proto/pb" + "github.com/fox/fox/ipb" + "time" +) + +func (rm *ColorRoom) Ready() { + rm.Table.ResetGameRoundId() + rm.ResetData(true) + rm.Table.EndGame() + + if isFunding := rm.jackpotMgr.Load(rm.RoomCfg.ColorPinoyLiveConfig.InitJackpot); isFunding { + rm.kafkaJackpotFunding(rm.RoomCfg.ColorPinoyLiveConfig.InitJackpot) + rm.jackpotFunding = rm.RoomCfg.ColorPinoyLiveConfig.InitJackpot + log.Debugf(rm.Log("发生垫资:%v", rm.jackpotFunding)) + } else { + rm.jackpotFunding = 0 + log.Debugf(rm.Log("没有垫资")) + } + rm.jackpotUser = nil + rm.costJackpot = 0 + log.Debugf(rm.Log("游戏开始costJackpot重置为0")) + rm.SetGameStatus(pb.ColorPinoyLiveGameStatus_ColorPinoyLiveStartReady) + rm.TimerJob, _ = rm.Table.AddTimer(time.Duration(rm.RoomCfg.TimeConf.Readymove), func() { + rm.Start() + }) + + // 初始化默认骰子 + // rm.initDefaultDiceGameRoundReady() + // 开始动画消息 + msg := new(pb.ColorPinoyLiveStatusMessage) + msg.Status = int32(rm.GetGameStatus()) + msg.StatusTime = int32(rm.RoomCfg.TimeConf.Startmove) + msg.Jackpot = rm.jackpotMgr.GetJackpot() + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameReady), msg) +} + +func (rm *ColorRoom) Start() { + rm.GameRoundStart() + rm.InitBigOddsBetAreas() + // 推送房间筹码选择规则 + rm.SendRuleInfo() + rm.checkUserBet() + // 选择列表中前6个用户上座 + rm.SelectUserListBalanceTopSitDownChair() + rm.startAt = time.Now().Unix() + rm.Table.StartGame() + // 开始动画消息 + msg := new(pb.ColorPinoyLiveStatusMessage) + msg.Status = int32(rm.GetGameStatus()) + msg.StatusTime = int32(rm.RoomCfg.TimeConf.Startmove) + // rm.jackpotMgr.Load(rm.Cfg.InitJackpot) + msg.Jackpot = rm.jackpotMgr.GetJackpot() + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameStart), msg) +} + +func (rm *ColorRoom) StartBet() { + rm.SetGameStatus(pb.ColorPinoyLiveGameStatus_ColorPinoyLiveBetStatus) + rm.TimerJob, _ = rm.Table.AddTimer(time.Duration(rm.RoomCfg.TimeConf.Startbet), func() { + rm.EndBet() + }) + + // 发送开始下注消息 + msg := new(pb.ColorPinoyLiveStatusMessage) + msg.Status = int32(rm.GetGameStatus()) + msg.StatusTime = int32(rm.RoomCfg.TimeConf.Startbet) + msg.Jackpot = rm.jackpotMgr.GetJackpot() + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameStartBet), msg) + // log.Debug("pb. 开始下注.....StartBet()") +} + +func (rm *ColorRoom) EndBet() { + rm.SetGameStatus(pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie) + // 停止下注就扣钱 + rm.StartTransInoutBet() + + // 发送停止下注消息 + msg := new(pb.ColorPinoyLiveStatusMessage) + msg.Status = int32(rm.GetGameStatus()) + msg.StatusTime = int32(rm.RoomCfg.TimeConf.Endmove) + msg.Jackpot = rm.jackpotMgr.GetJackpot() + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameEndBet), msg) + + // log.Debug("pb. 停止下注.....EndBet()") +} + +// 开3个 dice +func (rm *ColorRoom) openThreeDice() { + // log.Debug("aabb openThreeDice") + rm.SetGameStatus(pb.ColorPinoyLiveGameStatus_ColorPinoyLiveOpenThreeDice) + rm.Table.AddTimer(time.Duration(rm.RoomCfg.TimeConf.OpenThreeDice), func() { + // log.Debug("aabb settle") + rm.CompareDiceResult() + rm.Settle() + }) + // 发送开三个骰子消息 + rm._aniThreeDiceRouteIndex = int32(rand.RandIntM(0, 48)) + msg := new(pb.ColorPinoyLiveGameOpenThreeDice) + msg.Status = int32(rm.GetGameStatus()) + msg.AniRouteIndex = rm._aniThreeDiceRouteIndex // 掉落路径 + + for _, dice := range rm.NormalDices { + msg.Color = append(msg.Color, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameOpenThreeDice), msg) +} + +// 结算 +func (rm *ColorRoom) Settle() { + // log.Debug("aabb 结算") + rm.SetGameStatus(pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus) + rm.endAt = time.Now().Unix() + rm.SetUserSettleMsg() +} diff --git a/server/colorgame/room/s2c.go b/server/colorgame/room/s2c.go new file mode 100644 index 0000000..fb0019c --- /dev/null +++ b/server/colorgame/room/s2c.go @@ -0,0 +1,703 @@ +package room + +import ( + "encoding/json" + "fmt" + "game/common/proto/pb" + "github.com/fox/fox/ipb" + "github.com/fox/fox/log" + "math" + "sort" + "time" +) + +// 发送场景消息 +func (rm *ColorRoom) SendSceneMsg(u *model.User) { + + rm.MutexUserList.RLock() + defer rm.MutexUserList.RUnlock() + + msg := new(pb.SceneMessage) + + msg.RoomID = int32(rm.Table.GetId()) + // 游戏状态信息 + msg.GameStatus = new(pb.ColorPinoyLiveStatusMessage) + msg.GameStatus.Status = int32(rm.GetGameStatus()) + msg.GameStatus.StatusTime = int32(rm.StatusTime / 1000) // 转成秒 + msg.GameStatus.StatusRemainTime = int32(math.Floor(float64(rm.TimerJob.GetTimeDifference() / 1000))) // 转成秒 + msg.GameStatus.Jackpot = rm.jackpotMgr.GetJackpot() + msg.Jackpot = msg.GameStatus.Jackpot + + // 玩家信息 和下注信息 + var betAreaInfo []*pb.ColorPinoyLiveGameBetAreaInfo + for _, betArea := range rm.betEndBetAreasOdds { + areaInfo := new(pb.ColorPinoyLiveGameBetAreaInfo) + areaInfo.BetType = betArea.BetType + areaInfo.Odd = betArea.Odd + areaInfo.IsBigOdd = betArea.IsBigOdd + areaInfo.IsJackpot = betArea.IsJackpot + areaInfo.BigSingleColorOddPos = betArea.BigSingleColorOddPos + + areaInfo.BetChipsInfo = []*pb.ColorPinoyLiveGameBetAreaUserInfo{} + betAreaInfo = append(betAreaInfo, areaInfo) + } + rm.Traverse(func(u *model.User) bool { + if u.TotalBet > 0 { + // 下注玩家下注区域信息 + for _, info := range betAreaInfo { + for betType, betChips := range u.TotalBets { + if pb.ColorPinoyLiveBetTypeJP(betType) == info.BetType && betChips != 0 { + var betAearUser = new(pb.ColorPinoyLiveGameBetAreaUserInfo) + betAearUser.UserID = u.UserID + betAearUser.BetChips = betChips + info.BetChipsInfo = append(info.BetChipsInfo, betAearUser) + } + } + } + } + return true + }) + msg.BetAreaInfo = betAreaInfo + msg.MulRangeConfig = rm.MulRangeConfig() + + if u != nil { + // 后台配置的下注档位信息 + roomBetRule := new(pb.ColorPinoyLiveRoomBetRuleMsg) + for _, v := range rm.RoomCfg.ColorPinoyLiveConfig.BetList { + betArr := new(pb.ColorPinoyLiveBetArr) + betArr.BetArr = v + roomBetRule.BetLevels = append(roomBetRule.BetLevels, betArr) + } + roomBetRule.BetMinLimit = rm.RoomCfg.BaseBet + roomBetRule.Level = rm.RoomCfg.ColorPinoyLiveConfig.BetLevel + msg.BetRule = roomBetRule + // 上局下注数据 + if u.TempLastTimeBet != nil { + msg.LastTimeBet = make([]*pb.ColorPinoyLiveBetReqs, 0) + for _, reqs := range u.TempLastTimeBet { + betreq := &pb.ColorPinoyLiveBetReqs{} + for _, req := range reqs { + betreq.Info = append(betreq.Info, req) + } + msg.LastTimeBet = append(msg.LastTimeBet, betreq) + } + } + } + + if rm.Status == pb.ColorPinoyLiveGameStatus_ColorPinoyLiveOpenThreeDice || rm.Status == pb.ColorPinoyLiveGameStatus_ColorPinoyLiveSettleStatus { + // 3个骰子 + // log.Debug("同步房间信息发送场景信息 rm.NormalDices:", rm.NormalDices) + msg.LuckyDice = pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)) + msg.ThreeDice = []pb.ColorPinoyLiveDiceColorType{} + for _, dice := range rm.NormalDices { + msg.ThreeDice = append(msg.ThreeDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + // log.Debug("同步房间信息发送场景信息 i:", i, "dice:", dice, "color:", pb.DiceColorType(model.GetColor(dice)), "msg.ThreeDice:", msg.ThreeDice) + } + msg.AniThreeDiceRouteIndex = rm._aniThreeDiceRouteIndex + } + // 走势图 + msg.TrendList = rm.GameTrend + if msg.TrendList != nil { + msg.TrendList.LuckStarRate = rm.GetGameTrend() + } + + // 在线人数 + msg.OnlineNums = int32(len(rm.OnlineUserList)) + if rm.LiveMgr.RankList != nil { + msg.RankList = rm.LiveMgr.RankList.PlayerData + } + // msg.Bonus = int32(rm.RoomCfg.ColorPinoyLiveConfig.Bonus) + + liveAuthDuration := time.Hour * 24 + //goland:noinspection GoDfaNilDereference + msg.ArtcUrl, _ = artc.GetAuthedUrl( + gconfig.LiveRtcConfig.Uri, + gconfig.LiveRtcConfig.Key, + u.UserInetr.GetId(), + liveAuthDuration, + ) + roomArgs, _ := trtc.GetRoomArgs( + gconfig.LiveTrtcConfig.AppId, + gconfig.LiveTrtcConfig.SecretKey, + int64(gconfig.LiveTrtcConfig.GameId), + u.UserInetr.GetId(), + liveAuthDuration, + gconfig.GConfig.GDataConfig.VersionMode, + ) + msg.TrtcRoomArgs = &pb.TRTCRoomArgs{ + AppId: roomArgs.AppId, + StrRoomId: roomArgs.StrRoomId, + UserId: roomArgs.UserId, + UserSig: roomArgs.UserSig, + } + msg.Balance = u.Balance + msg.BigWinner = rm.BigWinner + if rm.GetGameStatus() < pb.ColorPinoyLiveGameStatus_ColorPinoyLiveEndBetMovie { + msg.BigWinner = nil + } + msg.DealerName = rm.dealerName + // log.Debug("同步房间信息发送场景信息 msg:", msg) + // log.Debug(msg) + u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameSync), msg) +} + +func (rm *ColorRoom) SendUserBet(u *model.User) { + msg := new(pb.ColorPinoyLiveSceneBetInfo) + msg.UserBets = u.TotalBets[:] + msg.TotalBets = rm.TotalBets[:] + msg.UserBetTotal = u.TotalBet + // msg.MasterBetType = rm.LastMasterBetType + msg.UserInfo = new(pb.ColorPinoyLiveUserInfo) + msg.UserInfo.UserID = u.UserID + msg.UserInfo.UserGlod = u.Balance + msg.UserInfo.NikeName = u.UserInetr.GetNike() + msg.UserInfo.Head = u.UserInetr.GetHead() + _ = u.UserInetr.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameUserBet), msg) +} + +func (rm *ColorRoom) SendRuleInfo() { + // 后台配置的下注档位信息 + msg := new(pb.ColorPinoyLiveRoomBetRuleMsg) + for _, v := range rm.RoomCfg.ColorPinoyLiveConfig.BetList { + betArr := new(pb.ColorPinoyLiveBetArr) + betArr.BetArr = v + msg.BetLevels = append(msg.BetLevels, betArr) + } + msg.BetMinLimit = rm.RoomCfg.BaseBet + msg.Level = rm.RoomCfg.ColorPinoyLiveConfig.BetLevel + msg.MulRangeConfig = rm.MulRangeConfig() + // log.Debug("发送规则 2222 BroadcastRuleInfo:", msg) + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeRoomBetRuleMsg), msg) +} + +func (rm *ColorRoom) SendScene(user inter.UserInetr) bool { + _ = user + return true +} + +func (rm *ColorRoom) copyBetAreaOdds() []*pb.ColorPinoyLiveBetAreaOdd { + var betAreaMul []*pb.ColorPinoyLiveBetAreaOdd + // 游戏下注区域倍率 + for _, areaOdds := range rm.afterBetAreaOdds { + area := &pb.ColorPinoyLiveBetAreaOdd{ + BetArea: areaOdds.BetArea, + Odd: areaOdds.Odd, + ViewOdd: areaOdds.ViewOdd, + IsBigOdd: areaOdds.IsBigOdd, + BigSingleColorOddPos: areaOdds.BigSingleColorOddPos, + IsWin: areaOdds.IsWin, + IsJackpot: areaOdds.IsJackpot, + } + betAreaMul = append(betAreaMul, area) + } + return betAreaMul +} + +func (rm *ColorRoom) GameSync(user inter.UserInetr) { + // 玩家加入 牌桌 + u := rm.getUser(user) + rm.SendSceneMsg(u) + rm.Table.AddTimer(100, func() { + if rm.LiveMgr.MaintenanceStatus == 1 { + rm.sendUserMainte(u, int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameMainte)) + } + }) +} + +// 向客户端发送结算消息 +func (rm *ColorRoom) sendSettleMsg2Client() { + + MaxWinGold := int64(0) + MaxWinUserID := int64(0) + var RealSystemWins [config.BET_TYPE_NUM]int64 + var RealSystemWin int64 + var SystemTax int64 + var PlayerData []*pb.ColorPinoyLivePlayerData + betTypePlayerCount := [config.BET_TYPE_NUM]int64{} + wins := rm.PokerMsg.WinBetArea + + // 玩家各个下注区域的输赢情况 + var betAreaInfo []*pb.ColorPinoyLiveGameBetAreaInfo + for i := 0; i < config.BET_TYPE_NUM; i++ { + areaInfo := new(pb.ColorPinoyLiveGameBetAreaInfo) + areaInfo.BetType = pb.ColorPinoyLiveBetTypeJP(i) + for _, win := range wins { + if win.BetArea == areaInfo.BetType { + areaInfo.IsWin = 1 + } + } + areaInfo.BetChipsInfo = []*pb.ColorPinoyLiveGameBetAreaUserInfo{} + betAreaInfo = append(betAreaInfo, areaInfo) + } + + // 获取有座玩家下注情况 暂时没有有座玩家下注 + var betUserInfo []*pb.ColorPinoyLiveSceneUserInfo + noChairTotalWin := int64(0) + rm.Traverse(func(u *model.User) bool { + if u.TotalBet > 0 && u.SettleMsg != nil { + user := new(pb.ColorPinoyLiveSceneUserInfo) + user.UserID = u.UserID + user.TotalWin = u.SettleMsg.TotalWin + user.UserScore = u.SettleMsg.UserScore + + for _, info := range betAreaInfo { + for betType, betChips := range u.SettleMsg.UserBets { + if pb.ColorPinoyLiveBetTypeJP(betType) == info.BetType && betChips != 0 { + var betAearUser = new(pb.ColorPinoyLiveGameBetAreaUserInfo) + betAearUser.UserID = u.UserID + betAearUser.BetChips = betChips + info.BetChipsInfo = append(info.BetChipsInfo, betAearUser) + } + } + } + betUserInfo = append(betUserInfo, user) + noChairTotalWin += u.SettleMsg.TotalWin + + } + return true + }) + + // 单播每个玩家的结算信息 + copyBetAreaMul := rm.copyBetAreaOdds() + betCount := int64(0) + GameTotalBets := [config.BET_TYPE_NUM]int64{} + rm.Traverse(func(u *model.User) bool { + + SceneUserInfo := new(pb.ColorPinoyLiveSceneSettleMsg) + // 下注区域投注信息 + SceneUserInfo.BetAreaInfo = betAreaInfo + // 本局走势图数据 + trendGroup := new(pb.ColorPinoyLiveTrendGroup) + trendGroup.LuckyDice = pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)) + for _, dice := range rm.NormalDices { + trendGroup.ThreeDice = append(trendGroup.ThreeDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + SceneUserInfo.TrendGroup = trendGroup + // 有座玩家下注信息 暂时没有有座玩家 + // SceneUserInfo.UserList = betUserInfo + // 幸运骰子 + SceneUserInfo.LuckyDice = pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)) + // 3个骰子 + SceneUserInfo.ThreeDice = []pb.ColorPinoyLiveDiceColorType{} + for _, dice := range rm.NormalDices { + SceneUserInfo.ThreeDice = append(SceneUserInfo.ThreeDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + // 自己的投注信息 + if u.SettleMsg != nil { + SceneUserInfo.SelfWinInfo = new(pb.ColorPinoyLiveSceneUserInfo) + SceneUserInfo.SelfWinInfo.UserID = int64(u.UserInetr.GetId()) + SceneUserInfo.SelfWinInfo.SceneSeatID = int32(u.SceneChairId) + SceneUserInfo.SelfWinInfo.TotalWin = u.SettleMsg.TotalWin // 净利 + 投注本金 + SceneUserInfo.SelfWinInfo.UserScore = u.SettleMsg.UserScore + SceneUserInfo.SelfWinInfo.JackpotWin = u.SettleMsg.JackpotWin + SceneUserInfo.SelfWinInfo.NormalWin = u.SettleMsg.TotalWin - u.SettleMsg.JackpotWin + } + // 上局投注信息 + SceneUserInfo.LastTimeBet = make([]*pb.ColorPinoyLiveBetReqs, 0) + for _, reqs := range u.LastTimeBet { + betreq := &pb.ColorPinoyLiveBetReqs{} + for _, req := range reqs { + betreq.Info = append(betreq.Info, req) + } + SceneUserInfo.LastTimeBet = append(SceneUserInfo.LastTimeBet, betreq) + } + SceneUserInfo.TrendGroupEx = &pb.ColorPinoyLiveTrend{} + SceneUserInfo.TrendGroupEx.ListTrendGroup = rm.GameTrend.ListTrendGroup + SceneUserInfo.TrendGroupEx.LuckStarRate = rm.GetGameTrend() + SceneUserInfo.BigWinner = rm.BigWinner + SceneUserInfo.Jackpot = rm.jackpotMgr.GetJackpot() + SceneUserInfo.JackpotUserName = u.SettleMsg.JackpotUserName + // 单播玩家结算信息 + // log.Debug("发送结算信息 SceneUserInfo BetAreaInfo:", SceneUserInfo.BetAreaInfo) + // log.Debug("发送结算信息 SceneUserInfo UserList:", SceneUserInfo.UserList) + // log.Debug("发送结算信息 SceneUserInfo SelfWinInfo:", SceneUserInfo.SelfWinInfo) + u.SendMsg(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeGameUserSettle), SceneUserInfo) + + if !u.IsRobot && u.SettleMsg != nil { + RealSystemWin += u.TotalBet + RealSystemWin -= u.SettleMsg.TotalWin + betCount += u.TotalBet + SystemTax += u.SettleMsg.Tax + if MaxWinGold < u.SettleMsg.TotalWin-u.TotalBet { + MaxWinGold = u.SettleMsg.TotalWin - u.TotalBet + MaxWinUserID = u.UserInetr.GetId() + } + for i, bet := range u.TotalBets { + if bet > 0 { + RealSystemWins[i] += bet + betTypePlayerCount[i] += 1 + RealSystemWins[i] -= u.SettleMsg.UserRealWins[i] + GameTotalBets[i] += bet + } + } + // 写入数据库统计信息 + if u.TotalBet > 0 { + // 玩家下注区域统计 + u.SettleMsg.UserBetsCount = make([]int64, config.BET_TYPE_NUM) + for i, count := range u.TotalBetsCount { + u.SettleMsg.UserBetsCount[i] = count + } + PlayerData = append(PlayerData, &pb.ColorPinoyLivePlayerData{ + Uid: u.UserID, + TotalBets: u.SettleMsg.UserBets, // 玩家各个区域的总下注额 + TotalBet: u.TotalBet, + Profit: u.SettleMsg.TotalWin, + Tax: u.SettleMsg.Tax, + Balance: u.Balance, + PreBalance: u.PreBalance, + UserWins: u.SettleMsg.UserWins, // 玩家赢取的下注区域总下注额 + UserRealWins: u.SettleMsg.UserRealWins, // 玩家赢取的下注区域总下注额 扣税后 + AreaOdds: copyBetAreaMul, // 投注区域赔率 + StartTime: u.StartAt, + TransBet: u.TransBet, + TransWin: u.TransWin, + DevMode: u.UserInetr.GetDevMode(), + UserBetsCount: u.SettleMsg.UserBetsCount, + Nickname: u.UserInetr.GetNike(), + Avatar: u.UserInetr.GetHead(), + }) + } + // log.Debug("开奖倍率:", u.SettleMsg.OddsWins) + } + + // u.ResetUserData() + return true + }) + // rm.Table.GameBetInfo(gameBetInfos) + cou := model.Usercount{} + cou = rm.OnlineUserList + sort.Sort(cou) + + for key, v := range pb.ColorPinoyLiveBetTypeJP_value { + if rm.TotalBets[v] > 0 || betTypePlayerCount[v] > 0 || RealSystemWins[v] > 0 { + log.Debug(rm.Log("%v 区域:总:%v 真:%v 真人数量:%v 真输赢:%v", key, score.GetScoreStr(rm.TotalBets[v]), score.GetScoreStr(GameTotalBets[v]), betTypePlayerCount[v], score.GetScoreStr(rm.TotalBets[v]-RealSystemWins[v]))) + } + } + + str := fmt.Sprintf("开局结果 幸运骰子:%v :普通骰子:%v ,%v ,%v ,", + model.GetColorString(rm.LuckyDice), model.GetColorString(rm.NormalDices[0]), model.GetColorString(rm.NormalDices[1]), model.GetColorString(rm.NormalDices[2])) + + str += fmt.Sprintf("总押注:%v ", score.GetScoreStr(rm.TotalBet)) + + str += fmt.Sprintf("真人 总押注:%v , 系统输赢额度:%v ", + score.GetScoreStr(betCount), + score.GetScoreStr(RealSystemWin), + ) + + str += fmt.Sprintf("最高获利用户ID:%v 获得:%v", + MaxWinUserID, score.GetScoreStr(MaxWinGold)) + + log.Debug(rm.Log(str)) + log.Debug(rm.Log("各区域投注:%v", rm.TotalBets)) + log.Debug(rm.Log("真人各区域投注:%v", GameTotalBets)) + log.Debug(rm.Log("真人各区域中奖:%v", RealSystemWins)) + log.Debug(rm.Log("中奖区域:%v", wins)) + + // SceneSettleMsg.NoChairTotalWin = noChairTotalWin + // rm.Table.Broadcast(int32(pb.SendToClientMessageType_NoticeGameSettle), SceneSettleMsg) + rm.LiveMgr.RankList = &pb.ColorPinoyLiveRankList{ + PlayerData: nil, + GameNo: rm.Table.GetGameRoundId(), + StartTime: rm.startAt, + EndTime: rm.endAt, + } + + // 发布事件 + if PlayerData == nil || len(PlayerData) == 0 { + return + } + // 开奖结果 + var threeDice []pb.ColorPinoyLiveDiceColorType + for _, dice := range rm.NormalDices { + threeDice = append(threeDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + + var startDice []pb.ColorPinoyLiveDiceColorType + for _, dice := range rm.StartDices { + startDice = append(startDice, pb.ColorPinoyLiveDiceColorType(model.GetColor(dice))) + } + + gameDetail := &pb.ColorPinoyLiveDetail{ + // LuckyDice: pb.ColorPinoyLiveDiceColorType(model.GetColor(rm.LuckyDice)), + ThreeDice: threeDice, + // Bonus: rm.RoomCfg.ColorPinoyLiveConfig.Bonus, + StartDice: startDice, + ResultImg: rm.ResultImgs, + DealerName: rm.dealerName, + BetAreaMul: copyBetAreaMul, + JackpotFunding: rm.jackpotFunding, + JackpotX: rm.jackpotX, + JackpotY: rm.jackpotY, + } + + gameRecordData := &pb.ColorPinoyLiveEnd{ + GameNo: rm.Table.GetGameRoundId(), + StartTime: rm.startAt, + EndTime: rm.endAt, + Level: gconfig.GConfig.GRoomConfig.Level, + BaseBet: rm.RoomCfg.BaseBet, + PlayerData: PlayerData, + TaxRate: rm.RoomCfg.Rate, + TotalBet: betCount, + TotalBets: GameTotalBets[:], + RealSystemWin: RealSystemWin, + RealSystemWins: RealSystemWins[:], + Tax: SystemTax, + Wins: nil, + OpToken: gconfig.GConfig.GServConfig.ChannelId, + Detail: gameDetail, + } + for _, winArea := range rm.PokerMsg.WinBetArea { + gameRecordData.Wins = append(gameRecordData.Wins, winArea.BetArea) + } + + sort.Slice(PlayerData, func(i, j int) bool { + return PlayerData[i].Profit > PlayerData[j].Profit + }) + + for i := 0; i < 6 && i < len(PlayerData); i++ { + if PlayerData[i].TransWin == 0 { + continue + } + rm.LiveMgr.RankList.PlayerData = append(rm.LiveMgr.RankList.PlayerData, PlayerData[i]) + } + log.Debug(rm.Log("玩家数量:%v 赢家数量:%v", len(PlayerData), len(rm.LiveMgr.RankList.PlayerData))) + go func() { + // log.Debug("color game 游戏记录:", gameDetail) + // log.Debug("color game 游戏记录 Tax:", gameRecordData.Tax) + // log.Debug("color game 游戏记录 Wins:", gameRecordData.Wins) + // log.Debug("color game 游戏记录 PlayerData:", gameRecordData.PlayerData) + s, _ := json.Marshal(gameRecordData) + log.Debug(rm.Log("记录区域数据:%v", string(s))) + err := gconfig.Produce(context.Background(), define.TopicColoLiveGameGameEnd, gameRecordData) + if err != nil { + log.Error(rm.Log("[%s] fail to Produce TongitsGameEndEvent(%+v), err: %v", gameRecordData.GameNo, gameRecordData, err)) + } + }() + +} + +func (rm *ColorRoom) SendOnlinePlayerNum() { + msg := new(pb.ColorPinoyLiveS2COnlinePlayerNum) + msg.Num = int64(len(rm.OnlineUserList)) + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeOnlinePlayerNum), msg) +} + +func (rm *ColorRoom) SendRoomInfo() { + // if rm.GetGameStatus() == 0 { + // return + // } + // msg := new(pb.UpdateRoomInfoMsg) + // msg.OnlineNum = int64(len(rm.OnlineUserList)) + // rm.Table.Broadcast(int32(pb.SendToClientMessageType_NoticeUpdateRoomInfo), msg) +} + +// 广播主播名字 +func (rm *ColorRoom) NotifyDealerName() { + msg := new(pb.ColorPinoyLiveDealerName) + msg.DealerName = rm.dealerName + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeDealerName), msg) + log.Debug(rm.Log("NotifyDealerName:%v", msg)) +} + +type MulRangeW struct { + *config.MulRate + MinW int // 权重转换成数值区间 + MaxW int // 权重转换成数值区间 + ColorPos pb.ColorPinoyLiveBigBetAreaPos // 0:单色区域基础倍率 1:单色区域双色倍率 2:单色区域开三色倍率 3:双色区域 4:三色区域 +} + +// 带有权重信息的五行倍率数组(单色单,单色双,单色三,双色,三色倍率数组) +func (rm *ColorRoom) initMulRangeW() (mulRangeW [][]*MulRangeW) { + mulRangeW = make([][]*MulRangeW, 0, 5) + + for pos, mulWs := range rm.Cfg.WinSingleColorMul { + var single []*MulRangeW + for _, mul := range mulWs { + single = append(single, &MulRangeW{MulRate: mul, ColorPos: pb.ColorPinoyLiveBigBetAreaPos(pos)}) + } + mulRangeW = append(mulRangeW, single) + } + + var double []*MulRangeW + for _, mul := range rm.Cfg.WinDoubleColorMul { + double = append(double, &MulRangeW{MulRate: mul, ColorPos: pb.ColorPinoyLiveBigBetAreaPos_BBA_Double}) + } + mulRangeW = append(mulRangeW, double) + + var three []*MulRangeW + for _, mul := range rm.Cfg.WinThreeColorMul { + three = append(three, &MulRangeW{MulRate: mul, ColorPos: pb.ColorPinoyLiveBigBetAreaPos_BBA_Three}) + } + mulRangeW = append(mulRangeW, three) + + for _, mulRws := range mulRangeW { + begin := 0 + for _, v := range mulRws { + v.MinW = begin + v.MaxW = begin + v.Rate + begin += v.Rate + } + } + + return mulRangeW +} + +// 返回单色投注区爆奖的权重数组及是爆在双色还是三色位置 +func (rm *ColorRoom) randSingle(cfg *config.ColorPinoyLiveConfig) (singleMul []*MulRangeW, singlePos int) { + maxWeight := 0 + for _, w := range cfg.WinSingleColorWeight { + maxWeight += w + } + weight := rand.RandInt(0, maxWeight) + log.Debug(rm.Log("单色投注区获取爆奖在双色还是三色,随机值为:%v 最大值:%v", weight, maxWeight)) + for pos, w := range cfg.WinSingleColorWeight { + if weight > w { + weight -= w + continue + } + log.Debug(rm.Log("单色投注区获取爆奖根据权重随机出来的爆奖位置为:%v", pos)) + // 爆奖只会提高开出双色或三色的赔率,基础赔率区不会爆奖 + if pos == 0 { + log.Debug(rm.Log("单色投注区的基础赔率区不会爆奖")) + return nil, pos + } + for _, mul := range cfg.WinSingleColorMul[pos] { + singleMul = append(singleMul, &MulRangeW{MulRate: mul, ColorPos: pb.ColorPinoyLiveBigBetAreaPos(pos)}) + } + begin := 0 + for _, v := range singleMul { + v.MinW = begin + v.MaxW = begin + v.Rate + begin += v.Rate + } + return singleMul, pos + } + return nil, 0 +} + +// 更新 +func (rm *ColorRoom) updateBetEndBetAreasOdds(mulRangeWs [][]*MulRangeW) { + for pos, betArea := range rm.betEndBetAreasOdds { + log.Debug(rm.Log("区域:%v 随机前 爆奖状态:%v", pb.ColorPinoyLiveBetTypeJP(pos), betArea.IsBigOdd)) + betArea.IsBigOdd = false + // 区域位置 0-2分别为单色、双色、三色投注区域, + index := pos / 6 + singlePos := 0 + var mulRangeW []*MulRangeW + if index == 0 { + mulRangeW, singlePos = rm.randSingle(rm.Cfg) + } else { + mulRangeW = mulRangeWs[index+2] + } + if mulRangeW == nil { + log.Error(rm.Log("投注区域:%v 获取爆奖权重数组为nil", pos)) + continue + } + rdv := rand.RandInt(mulRangeW[0].MinW, mulRangeW[len(mulRangeW)-1].MaxW) + for mulPos, mul := range mulRangeW { + if rdv < mul.MinW || rdv >= mul.MaxW { + continue + } + if index == 0 { + betArea.Odd[singlePos] = mul.Mul + if singlePos != 0 && mulPos != 0 { + log.Debug(rm.Log("区域:%v 爆奖位置:%v", pb.ColorPinoyLiveBetTypeJP(pos), mul.ColorPos)) + betArea.IsBigOdd = true + } + } else { + betArea.Odd[0] = mul.Mul + if mulPos != 0 { + log.Debug(rm.Log("区域:%v 爆奖位置:%v", pb.ColorPinoyLiveBetTypeJP(pos), mul.ColorPos)) + betArea.IsBigOdd = true + } + } + betArea.BigSingleColorOddPos = mul.ColorPos + break + } + log.Debug(rm.Log("区域:%v 爆奖权重区间:[%v,%v],随机数:%v betArea:%+v", pb.ColorPinoyLiveBetTypeJP(pos), + mulRangeW[0].MinW, mulRangeW[len(mulRangeW)-1].MaxW, rdv, betArea)) + } + // 更新jackpot标记 + _ = rm.randJackpotArea() + return +} + +func (rm *ColorRoom) randJackpotArea() []pb.ColorPinoyLiveBetTypeJP { + betAreaInfo := make(map[int]*pb.ColorPinoyLiveGameBetAreaInfo) + for pos, betArea := range rm.betEndBetAreasOdds { + betAreaInfo[pos] = betArea + } + // 利用map的随机特性 + for pos, betArea := range betAreaInfo { + // 区域位置 0-2分别为单色、双色、三色投注区域, + index := pos / 6 + if index > 0 { + continue + } + _, singlePos := rm.randSingle(rm.Cfg) + // 在单色区域 命中三同色爆奖之后 再随jackpot概率 + // 只会有一个区域有jackpot标签 + if singlePos == 2 { + if rand.RandInt(0, 10000) < rm.Cfg.JackpotRate { + betArea.IsJackpot = true + return []pb.ColorPinoyLiveBetTypeJP{betArea.BetType} + } + } + } + return nil +} + +// 区域爆奖 +func (rm *ColorRoom) NotifyBigBetAreaMul() { + mulRangeW := rm.initMulRangeW() + rm.updateBetEndBetAreasOdds(mulRangeW) + + for _, betArea := range rm.betEndBetAreasOdds { + log.Debug(rm.Log("投注区域:%v 倍率:%v 是否爆奖:%v 是否jackpot:%v 倍率位置:%v", betArea.BetType, betArea.Odd, betArea.IsBigOdd, betArea.IsJackpot, betArea.BigSingleColorOddPos)) + } + + msg := new(pb.ColorPinoyLiveNtfBigOddBetArea) + msg.BetAreas = rm.betEndBetAreasOdds + rm.Table.Broadcast(int32(pb.ColorPinoyLiveSendToClientMessageType_ColorPinoyLiveNoticeBigOddBetArea), msg) + log.Debug(rm.Log("ColorPinoyLiveNtfBigOddBetArea:%v", msg)) +} + +func (rm *ColorRoom) formatScore(score int64) string { + s := float64(score / 100.0) + numStr := fmt.Sprintf("%.2f", s) + + // result := "" + // for i := len(numStr) - 1; i >= 0; i-- { + // result = string(numStr[i]) + result + // if (len(numStr)-i)%3 == 0 && i != 0 { + // result = "," + result + // } + // } + return numStr + // return result +} + +func (rm *ColorRoom) BroadHitJackpot(user *model.User, jpScore int64) { + go func() { + req := &fmsg.ChatReq{ + Uid: user.UserID, + GameId: rm.RoomCfg.GameId, + Content: fmt.Sprintf("%v WIN ₱ %v FROM JACKPOT", user.UserInetr.GetNike(), rm.formatScore(jpScore)), + Type: 0, + } + bReq, err := proto.Marshal(req) + if err != nil { + log.Error(rm.Log(err.Error())) + return + } + lobbyMsg := &events.SingleMsgToLobbyEvent{ + Module: events.SingleMsgToLobbyEvent_mtl_chat, + Data: bReq, + } + err = gconfig.Produce(context.Background(), define.TopicSingleMsgToLobby, lobbyMsg) + if err != nil { + log.Error(rm.Log("fail to Produce SingleMsgToLobbyEvent_mtl_chat, err: %v", err)) + } + }() +}