hnmj

11


# 大厅与子游戏通信协议

<h1>大厅与子游戏通信协议</h1> <p>[TOC]</p> <h2>协议基本说明</h2> <pre><code>每条协议都为json格式 json数据的固定格式为:{cmd:345, msg:{...}} msg可以没有 服务器地址 hallws.hainanmj.com 端口6888 ws web 地址 lqhall.hainanmj.com</code></pre> <h2>平台ID</h2> <p>固定为<strong>1</strong></p> <h1>一些常量</h1> <p>MATCH_TYPE_HFS = 1 # 话费赛 MATCH_TYPE_SWS = 2 # 实物赛 MATCH_TYPE_JBS = 3 # 竞标赛 MATCH_TYPE_TZS = 4 # 挑战赛 MATCH_TYPE_TTS = 5 # 淘汰赛 MATCH_TYPE_CGS = 6 # 闯关赛</p> <p>CLUB_LOG_TYPE_CREATE_CLUB = 1 # 创建亲友圈 CLUB_LOG_TYPE_DISMISS_CLUB = 2 # 解散亲友圈 CLUB_LOG_TYPE_ACCEPT_MEMBER = 3 # 通过成员申请 CLUB_LOG_TYPE_REFUSE_MEMBER = 4 # 拒绝成员申请 CLUB_LOG_TYPE_REMOVE_MEMBER = 5 # 移除成员 CLUB_LOG_TYPE_RECHARGE = 6 # 充值 CLUB_LOG_TYPE_SET_MANAGER = 7 # 设置管理员 CLUB_LOG_TYPE_CANCEL_MANAGER = 8 # 取消管理员 CLUB_LOG_TYPE_FORBIDDEN = 9 # 禁止成员加入房间 CLUB_LOG_TYPE_CANCEL_FOR = 10 # 取消禁止成员加入房间 CLUB_LOG_TYPE_ZI_YOU_KAI_FANG = 11 # 设置自由开房 CLUB_LOG_TYPE_KAI_FANG_QUAN_XIAN = 12 # 设置开放权限 CLUB_LOG_TYPE_ADD_WAN_FA = 13 # 添加玩法 CLUB_LOG_TYPE_MODIFY_WAN_FA = 14 # 修改玩法</p> <h1>服务端错误码列表</h1> <h1>coding:utf-8</h1> <h1>服务端错误码列表</h1> <p>OVER = 1 OK = 0 # 请求正常 DATA_BROKEN = -1 # 客户端请求数据错误,不符合即定格式 TOKEN_ERROR = -2 SYSTEM_ERROR = -3 # 系统错误 DUPLICATE_LOGIN = -4 # 客户端收到通知,账号已在别处登录 SEAT_FULL = -5 # 坐位已满 TABLE_NOT_EXIST = -6 # 桌子不存在 USER_NOT_EXIST = -7 # 玩家数据不存在 RULE_ERROR = -8 # 出牌不符合规则 NOT_YOUR_TURN = -9 # 当前循问的玩家不是你 CARD_NOT_EXIST = -10 # 所出牌不存在 IN_OTHER_ROOM = -11 # 玩家当前已在其它房间中 TABLE_FULL = -12 # 桌子已满 NOT_YOUR_ROOM = -13 # 不是你的桌子无法解散 COMMAND_DENNY = -14 # 命令不允许被执行 OPERATES_ILLEGAL = -15 # 当前玩家无此操作 OPERATES_DUPLICATE = -16 # 此玩家已操作 FLOW_ERROR = -17 # 当前流程不允许此操作 CLUB_NOT_EXIST = -19 # 俱乐部不存在 CLUB_LIMITS = -20 # 俱乐部数量上限 CLUB_NAME_EXIST = -21 # 俱乐部名字已存在 NOT_HAS_CLUB = -22 # 玩家没有俱乐部 ADD_MEMBER_FAIL = -23 NOT_CLUB_OWNER = -24 APPLY_NOT_EXIST = -25 DU_ADD_CLUB = -26 # 重复添加 NOT_CLUB_MEMBER = -27 # 不是俱乐部成员 TABLE_STARTED = -28 # 已经开始的桌子不能加入 DIAMOND_NOT_ENOUGHT = -29 # 已经开始的桌子不能加入 FORBIDDEN = -30 # 禁止加入 CHU_LAI_ZI = -31 # 禁止出赖子 NEED_GEN_DA_SINGLE_HUA_PAI = -32 CARDS_WRONG = -33 DUN_NOT_IN_CARDS = -34 ORDER_ERROR = -35 DUN_CARDS_COUNT_ERROR = -36 NOT_IN_GAME = -37 NOT_IN_LI_PAI_FLOW = -38 TIAN_TING_LOCK = -39 # 天听情况必须出锁定牌 NOT_IN_FLOW = -40 BAO_DAN_MUST_BIG = -41 GOLD_HALL_NOT_EXIST = -51 NOT_GOLD_HALL_OWNER = -52 DU_ADD_GOLD_HALL = -53</p> <p>GOLD_NOT_ENOUGHT = -55</p> <p>QIAN_DUO_NO_JIU_JI = -56 JIU_JI_COUNT_TOO_MANY = -57</p> <p>NOT_OWNER_FRIEND = -58 # 非房主好友 ALREADY_GET = -59 # 已领取 ALREADY_BACK = -60 # 已退回</p> <p>HAS_BEEN_FRIEND = -61 HAS_ADD_FRIEND = -62 HAS_DELED_FRIEND = -63</p> <p>MONTH_VIP_TIME_OUT = -64 CLUB_COUNT_TOO_MANY = -65 HAS_TONG_MING_CLUB = -66</p> <p>TOKEN_NOT_EXIST = -67 # token不存在</p> <p>HAS_USED_FREE_CHANCE = -68</p> <p>HAS_IN_MATCH = -69 # 已经在比赛中了 MATCH_FULL = -70 # 比赛已报满 IN_OTHER_MATCH = -71 # 已经在别的比赛了</p> <p>HAS_IN_GUAN_ZHU_LIST = -72 # 已经在关注列表了 NOT_IN_GUAN_ZHU_LIST = -73 # 不在关注列表,不能取消</p> <p>MATCH_BAO_MING_FAIL = -74 # 门票或钻石不足,报名失败 IN_MATCH_FORBIDDEN = -75 # 比赛场已禁用 MATCH_NOT_EXIST = -76 # 未报名无法退赛</p> <p>OPT_NUMBER_FAIL = -77 # 批量操作数量过多 MAIL_NOT_EXIST = -78 # 邮件不存在 MAIL_AWARDS_PULLED = -79 # 邮件奖励已领取或不存在</p> <h2>协议列表--非游戏过程</h2> <h3>2373心跳协议CHILD_GAME_KEEP_CONNECT = 2373</h3> <p>命令号: <strong>2373</strong> 心跳时间约定为<strong>5</strong>秒 仅为子游戏服务器调用,大厅保持原来的 该命令由子游戏定期发送给大厅服务器 但是大厅服务器检查超过15秒没收到心跳情况下会主动给子游戏下发心跳检查</p> <pre><code class="language-js">// 请求 { timestamp : 123232323.33 //发起消息的心跳时间 } // 应答 { timestamp : 123232323.33 //转发客户端消息的心跳时间,客户端凭此时间的对比值来确定网络质量 }</code></pre> <hr /> <h3>208子游戏网关认证</h3> <p>命令号:<strong>208</strong></p> <pre><code class="language-js">// 请求 { uid : 22, // 玩家ID key : abcabc, // 认证key 登录返回的token platformID : 1, // 游戏平台ID 不是子游戏类型 } 示例 {"cmd":208, "msg":{"server_id":10,"key":"dsjkalfjdslk789yh789yhgyugyuguy","gameType":10,"TimeStamp":1598584369259}} // 应答 { code : 0 //0正确 1校验失败 DATA_BROKEN = -1 # 客户端请求数据错误,不符合即定格式 TOKEN_ERROR = -2 # token错误 }</code></pre> <hr /> <h3>换服通知</h3> <p>命令号:<strong>105</strong></p> <pre><code class="language-js">// 服务器广播消息,不需要请求 { host: 11.1.1.1, // 新的服务器地址 port: 8889, // 新的服务器端口 }</code></pre> <h3>请求进入房间</h3> <p>命令号:<strong>202</strong></p> <pre><code class="language-js">// 请求 { roomID : 222333, x: 333.212, // 经度 y: 12.323, // 纬度 data : xxx //客户端自定义的转发型数据 }, // 响应 // 如果进房间成功,后面接着下发房间内的玩家信息,以及房间配置信息 { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 roomID : 111111 }, TABLE_NOT_EXIST = -6 # 桌子不存在 NOT_CLUB_MEMBER = -27 # 不是俱乐部成员 FORBIDDEN = -29 # 禁止加入 NOT_OWNER_FRIEND = -58 # 非房主好友</code></pre> <h3>分页获取邮件列表</h3> <p>命令号:<strong>401</strong></p> <pre><code class="language-js">// 请求 { "page": 1, // 第几页 "amount": 20, // 每页数据条数,默认为20 }, // 响应 // 成功 { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 "mail_list": [] // 所获取的列表 }</code></pre> <h3>标记邮件已读状态</h3> <p>命令号:<strong>402</strong></p> <pre><code class="language-js">// 请求 { "mail_id": 1, // 邮件ID }, // 响应 // 成功 { code : 0, // 错误码请上面的 《服务端错误码列表》 }</code></pre> <h3>领取邮件奖励</h3> <p>命令号:<strong>404</strong></p> <pre><code class="language-js">// 请求 { "mail_id": 1, // 邮件ID }, // 响应成功 { code : 0, // 错误码请上面的 《服务端错误码列表》 }</code></pre> <h3>2375 CLUB_MODIFY_SETTING = 75</h3> <p>命令号:<strong>2375</strong></p> <pre><code class="language-js">// 请求 { club_id: 亲友圈ID setting: 查询ID{ zi_you_kai_fang: 0|1 自由玩法 kai_fang_quan_xian: 0|1普通开房权限 kou_ji_jin: 0|1 扣费模式 是否扣基金 } }, { code : 0, // 错误码请上面的 《服务端错误码列表》 },</code></pre> <h3>2350 搜索亲友圈成员</h3> <p>命令号:<strong>2324</strong></p> <pre><code class="language-js">// 请求 { club_id: 亲友圈ID refer_uid: 查询ID }, // { code : 0, // 错误码请上面的 《服务端错误码列表》 },</code></pre> <h3>2377 修改亲友圈公告 CLUB_MODIFY_GONG_GAO = 77</h3> <pre><code class="language-js">{ club_id: 亲友圈ID gong_gao: 公告内容 } { code : 0 }</code></pre> <h3>2378 举报亲友圈CLUB_JU_BAO = 78</h3> <pre><code class="language-js">{ club_id: 亲友圈ID reasons: [1,2,3] 选的数据以数组形式给出 content: 其他内容 } { code : 0 }</code></pre> <h3>2371 子游戏连接大厅服务器</h3> <p>// 请求 此命令为208 子游戏连接后主动下发 { }, //<br /> { code : 0, // 错误码请上面的 《服务端错误码列表》 match_info: 比赛信息 },</p> <h3>2324 房间创建 CLUB_JUDGE_CREATE</h3> <p>命令号:<strong>2324</strong></p> <pre><code class="language-js">// 请求 { tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, // { code : 0, // 错误码请上面的 《服务端错误码列表》 },</code></pre> <hr /> <h3>2325 房间解散 CLUB_JUDGE_DISMISS</h3> <p>命令号:<strong>2325</strong> 在解散房间时就不操作反还房卡,子游戏先返回房卡后再解散</p> <pre><code class="language-js">// 请求 { tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 },</code></pre> <hr /> <h3>2326 玩家退出房间(不是亲有圈也调这个,传0) PLAYER_QUIT_CLUB_JUDGE</h3> <p>命令号:<strong>2326</strong></p> <pre><code class="language-js">// 请求 { uid: 11, 退出的玩家ID tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 },</code></pre> <hr /> <h3>2327 玩家加入房间 PLAYER_JOIN_CLUB_JUDGE</h3> <p>命令号:<strong>2327</strong></p> <pre><code class="language-js">// 请求 { uid: 11, 加入的玩家ID tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 },</code></pre> <hr /> <h3>2328 房间游戏开始 CLUB_JUDGE_GAME_START</h3> <p>命令号:<strong>2328</strong></p> <pre><code class="language-js">// 请求 { tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 },</code></pre> <hr /> <h3>2349 房间游戏结束 CLUB_JUDGE_GAME_OVER</h3> <p>命令号:<strong>2349</strong></p> <pre><code class="language-js">// 请求 { tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 },</code></pre> <h2>2386 关注比赛报名情况MATCH_BAO_MING_GUAN_ZHU = 86</h2> <hr /> <p>请求 { match_id: match_id guanzhu: 0|1 是否关注 }</p> <h3>2361 请求扣除房卡</h3> <p>命令号:<strong>2361</strong></p> <pre><code class="language-js">// 请求 { tid : 222333, 房间ID(必填) clubID : 222333, 亲友圈ID,没有填0(必填) }, { code : 0, // 错误码请上面的 《服务端错误码列表》 如果code为0,则有以下属性 }, </code></pre> <hr /> <h2>比赛专用接口</h2> <h2>大厅客户端与大厅交互</h2> <h3>2371 子游戏连接大厅服务器后,大厅服务器主动下发给子游戏当前子游戏正在运行的比赛信息</h3> <p>请求 { } { &quot;judges&quot;: judge_infos, 桌子信息 &quot;players&quot;: self.all_players_info, 玩家信息 &quot;match_config&quot;: { 比赛信息 &quot;game_type&quot;: self.game_type, 类型 'match_name': self.match_name,名称 &quot;qi_ci&quot;: self.qi_ci,期次 格式为当日0点时间戳_比赛id_第几期 'match_type': self.match_type, 比赛类型 'match_id': self.match_id, 比赛ID 'status': self.status, 状态 目前已打完的不会下发,不用考虑 &quot;turn_index&quot;: self.turn_index, 第几轮了 }, &quot;turn_configs&quot;: self.turn_configs, 回合配置 &quot;room_config&quot;: self.room_config, 房间配置 }</p> <pre><code> 淘汰赛的数据 比晋级赛少一些,其他都相同 "judges": judge_infos, "players": self.all_players_info, "match_config": { "game_type": self.game_type, 'match_name': self.match_name, "qi_ci": self.qi_ci, 'match_type': self.match_type, 'match_id': self.match_id, 'status': self.status, }, "room_config": self.room_config,</code></pre> <p>}</p> <h3>2379 淘汰赛玩家加入比赛(报名)MATCH_TTS_PLAYER_JOIN_MATCH 报名为大厅专用,子游戏不用看</h3> <p>请求 { match_id: 1 } { &quot;room_link&quot;: self.room_link, &quot;match_name&quot;: self.match_name }</p> <h3>2381 玩家加入比赛(报名)MATCH_PLAYER_JOIN_MATCH 报名为大厅专用,子游戏不用看</h3> <p>请求 { match_id: 1 } { 'uid': uid 'avatar': 头像 'nick_name': 昵称 } 注意,玩家报名后,所有关注比赛报名情况的人都会收到,同时玩家自己加入关注列表</p> <h2>2385 MATCH_PLAYER_QUIT_MATCH = 85 玩家退赛</h2> <p>报名后不想打了可退赛,在建房/加入其它房间的时候有比赛触发提示,也可退赛,退赛返回门票一张 请求 { match_id: 1 } { 'uid': uid }</p> <h3>2383 通知大厅 比赛开始了,进入相应房间 MATCH_START = 83</h3> <p>无请求 大厅服务器满人后下发子游戏 { } { tid: tid roomlink: &quot;子游戏地址&quot; }</p> <h3>2372 关注或取消 查看亲友圈房间列表</h3> <p>{ &quot;clubID&quot;:1 &quot;guan_zhu&quot;: 0|1 }{</p> <p>} 1 加入观察 0 取消,观察队列会收到房间变动信息 默认是不关注</p> <h3>2385 关注或取消 查看报名列表MATCH_BAO_MING_GUAN_ZHU = 86</h3> <p>{ &quot;match_id&quot;:1 &quot;guan_zhu&quot;: 0|1 }{</p> <p>} 1 加入观察 2 取消,观察队列会收到报名变动信息 报名默认加入观察</p> <h2>子游戏与大厅服务器交互</h2> <h3>2382 比赛开始(报名完毕,配桌) MATCH_PI_PEI = 82</h3> <p>无请求 大厅服务器满人后下发子游戏 { } { 'judges': 桌子列表(里边包含全部Uid) 结构 [ { p:[玩家uid列表] s:[桌子状态] tid:[桌子id] } ] &quot;match_config&quot;: 比赛配置 &quot;turn_config&quot;: 当前轮配置 &quot;round_index&quot;: 第几回合 从1开始 } 示例 {'judges': [{'p': [1075, 1060, 1069, 1074], 'tid': 1, 's': 0}, {'p': [1012, 1036, 1064, 1077], 'tid': 2, 's': 0}, {'p': [1066, 1041, 1093, 1084], 'tid': 3, 's': 0}, {'p': [1097, 1094, 1045, 1051], 'tid': 4, 's': 0}, {'p': [1091, 1002, 1063, 1024], 'tid': 5, 's': 0}, {'p': [1099, 1078, 1021, 1055], 'tid': 6, 's': 0}, {'p': [1004, 1071, 1076, 1085], 'tid': 7, 's': 0}, {'p': [1052, 1011, 1098, 1072], 'tid': 8, 's': 0}, {'p': [1046, 1016, 1034, 1067], 'tid': 9, 's': 0}, {'p': [1038, 1026, 1003, 1087], 'tid': 10, 's': 0}, {'p': [1005, 1019, 1080, 1009], 'tid': 11, 's': 0}, {'p': [1053, 1086, 1025, 1050], 'tid': 12, 's': 0}, {'p': [1035, 1089, 1058, 1022], 'tid': 13, 's': 0}, {'p': [1090, 1029, 1054, 1027], 'tid': 14, 's': 0}, {'p': [1013, 1048, 1082, 1037], 'tid': 15, 's': 0}, {'p': [1023, 1092, 1047, 1030], 'tid': 16, 's': 0}, {'p': [1096, 1020, 1057, 1061], 'tid': 17, 's': 0}, {'p': [1039, 1043, 1083, 1006], 'tid': 18, 's': 0}, {'p': [1081, 1017, 1040, 1031], 'tid': 19, 's': 0}, {'p': [1049, 1068, 1079, 1042], 'tid': 20, 's': 0}, {'p': [1059, 1100, 1028, 1007], 'tid': 21, 's': 0}, {'p': [1015, 1073, 1070, 1014], 'tid': 22, 's': 0}, {'p': [1062, 1044, 1056, 1032], 'tid': 23, 's': 0}, {'p': [1010, 1065, 1088, 1033], 'tid': 24, 's': 0}], 'match_name': '金条赛', 'status': 1, 'turn_config': {'base_score': 5, 'left_count': 96}, 'qi_ci': '1600444800_4_1', 'game_type': 11, 'match_id': 4, 'match_type': 2, 'match_config': '{&quot;rule_type&quot;: 1, &quot;round_count&quot;: 4}', 'round_index': 1}</p> <h3>2591 比赛启动后自动下发给子游戏服务器 通知新比赛建立</h3> <p>无请求 大厅服务器 比赛启动后自动下发给子游戏服务器 通知新比赛建立 { } { 'judges': 桌子列表(里边包含全部Uid) 结构 [ { p:[玩家uid列表] s:[桌子状态] tid:[桌子id] } ] &quot;match_config&quot;: 比赛配置 &quot;turn_config&quot;: 当前轮配置 &quot;round_index&quot;: 第几回合 从1开始 &quot;guan_ka_config&quot;: 关卡配置 (针对于闯关赛) 结构:[ { &quot;left_count&quot;: 0, --(不用) &quot;redeem_rate&quot;: 0.3,(当前关卡的兑换比例) &quot;double_score&quot;: 12000,(当前关卡的过关分) &quot;fail_lost&quot;: 0,(当前关卡失败是否掉关) &quot;base_score&quot;: 10000 (当前关卡的基础分) } -- 第一关的,第二关的同样结构往后] &quot;default_rate&quot;:默认兑换比例,浮点数(针对于闯关赛) &quot;prop_config&quot;: 关卡道具配置(针对于闯关赛) 结构:[{ &quot;game_level&quot;: 1,--(第几关) &quot;prop_list&quot;: --(可用道具列表) [{ &quot;prop_id&quot;:1, &quot;coast&quot;:8000, &quot;prop_level&quot;:4, &quot;name&quot;:&quot;奖励增加250000金币&quot;, &quot;score&quot;:0, &quot;rate&quot;:0, &quot;awards&quot;:250000, &quot;mul_score&quot;:1} ] ] &quot;pai_ming_info&quot; 排名信息(针对于闯关赛) } 示例 {'judges': [{'p': [1075, 1060, 1069, 1074], 'tid': 1, 's': 0}, {'p': [1012, 1036, 1064, 1077], 'tid': 2, 's': 0}, {'p': [1066, 1041, 1093, 1084], 'tid': 3, 's': 0}, {'p': [1097, 1094, 1045, 1051], 'tid': 4, 's': 0}, {'p': [1091, 1002, 1063, 1024], 'tid': 5, 's': 0}, {'p': [1099, 1078, 1021, 1055], 'tid': 6, 's': 0}, {'p': [1004, 1071, 1076, 1085], 'tid': 7, 's': 0}, {'p': [1052, 1011, 1098, 1072], 'tid': 8, 's': 0}, {'p': [1046, 1016, 1034, 1067], 'tid': 9, 's': 0}, {'p': [1038, 1026, 1003, 1087], 'tid': 10, 's': 0}, {'p': [1005, 1019, 1080, 1009], 'tid': 11, 's': 0}, {'p': [1053, 1086, 1025, 1050], 'tid': 12, 's': 0}, {'p': [1035, 1089, 1058, 1022], 'tid': 13, 's': 0}, {'p': [1090, 1029, 1054, 1027], 'tid': 14, 's': 0}, {'p': [1013, 1048, 1082, 1037], 'tid': 15, 's': 0}, {'p': [1023, 1092, 1047, 1030], 'tid': 16, 's': 0}, {'p': [1096, 1020, 1057, 1061], 'tid': 17, 's': 0}, {'p': [1039, 1043, 1083, 1006], 'tid': 18, 's': 0}, {'p': [1081, 1017, 1040, 1031], 'tid': 19, 's': 0}, {'p': [1049, 1068, 1079, 1042], 'tid': 20, 's': 0}, {'p': [1059, 1100, 1028, 1007], 'tid': 21, 's': 0}, {'p': [1015, 1073, 1070, 1014], 'tid': 22, 's': 0}, {'p': [1062, 1044, 1056, 1032], 'tid': 23, 's': 0}, {'p': [1010, 1065, 1088, 1033], 'tid': 24, 's': 0}], 'match_name': '金条赛', 'status': 1, 'turn_config': {'base_score': 5, 'left_count': 96}, 'qi_ci': '1600444800_4_1', 'game_type': 11, 'match_id': 4, 'match_type': 2, 'match_config': '{&quot;rule_type&quot;: 1, &quot;round_count&quot;: 4}', 'round_index': 1}</p> <h3>2387 子游戏通知大厅服务器 游戏结束 结算分值 MATCH_TABLE_GAME_OVER = 87</h3> <p>{ &quot;match_conf&quot;: 比赛信息 &quot;tid&quot;: 桌子id &quot;round_index&quot;: 第几轮 &quot;qi_ci&quot;: qi_ci &quot;result&quot; : 结果[ [ uid:1 score:1 ], [uid:2, score:2]] } } { } {&quot;cmd&quot;:2387,&quot;msg&quot;:{&quot;match_conf&quot;:{&quot;qi_ci&quot;:&quot;1600617600_1_1&quot;,&quot;game_type&quot;:11,&quot;match_id&quot;:1,&quot;match_type&quot;:1,&quot;status&quot;:1,&quot;match_name&quot;:&quot;1元话费赛&quot;,&quot;round_index&quot;:1},&quot;tid&quot;:&quot;24&quot;,&quot;result&quot;:[{&quot;uid&quot;:1049,&quot;score&quot;:-100},{&quot;uid&quot;:1042,&quot;score&quot;:300},{&quot;uid&quot;:1011,&quot;score&quot;:500},{&quot;uid&quot;:1013,&quot;score&quot;:-700}]}} 服务器回复当前排名信息 { &quot;pai_ming&quot;: info, 排名信息 [uid, score]数组 &quot;round_index&quot;: round_index, 第几局由发过来参数确定 &quot;tid&quot;: tid, 房间id &quot;match_conf&quot;: match_conf 配置,也是发送过来原路返回 }</p> <h3>2388 大厅服务器通知子游戏一轮游戏结束以及结算分值</h3> <p>{ &quot;match_id&quot;: 比赛ID &quot;result&quot; : 结果{ &quot;left_players_info&quot;: self.left_players_info, &quot;out_players_info&quot;: self.out_players_info, &quot;turn_index&quot;: self.turn_index, &quot;qi_ci&quot;: self.qi_ci, } } { }</p> <h3>2389 大厅服务器通知子游戏整场比赛结束以及结算分值</h3> <p>{ &quot;match_info&quot;: { 'match_name': self.match_name, 'match_id': self.match_id, 'status': self.status, 'qi_ci': self.qi_ci,</p> <h1>&quot;room_info&quot;: self.get_all_rooms(),</h1> <p>} &quot;out_players_info&quot;:out_players_info{[<br /> 'uid': self.__uid, 'score': self.score, &quot;max_turn&quot;: self.<strong>max_turn, &quot;pai_ming&quot;: self.</strong>pai_ming,] } }</p> <h3>2393 淘汰赛 大厅服务器通知 大厅客户端接收,淘汰赛通知玩家已加入桌子 MATCH_TTS_PLAYER_JOIN_JUDGE</h3> <p>{ 无输入 由服务端主动发起通知子游戏 淘汰赛以桌为单位,匹配一桌打一桌 } {&quot;roomID&quot;: self.tid, &quot;uid&quot;: player.uid, roomlink:roomlink}</p> <h3>2392 淘汰赛 通知子游戏,开始匹配 MATCH_TTS_JUDGE_PI_PEI(一桌)</h3> <p>{ 无输入 由服务端主动发起通知子游戏 淘汰赛以桌为单位,匹配一桌打一桌 } 返回result = { &quot;match_info&quot;:{} &quot;judge_info&quot;:{ &quot;tid&quot;: self.<strong>tid, &quot;s&quot;: self.</strong>t_status, &quot;p&quot;: self.get_all_player_uid(), }</p> <h3>2394 淘汰赛 子游戏调用 分享复活MATCH_TTS_FEN_XIANG_FU_HUO = 94</h3> <p>{</p> <pre><code>"match_conf": 同晋级赛, "uid": uid 操作的玩家,</code></pre> <p>} 返回<br /> result = { code = error.OK 标识成功 }</p> <h3>2394 淘汰赛 子游戏调用 分享复活MATCH_TTS_FEN_XIANG_FU_HUO = 94</h3> <p>{</p> <pre><code>"match_conf": 同晋级赛, "uid": uid 操作的玩家,</code></pre> <p>} 返回<br /> result = { code = error.OK 标识成功 }</p> <h3>2395 淘汰赛 子游戏调用 道具 复活MATCH_TTS_DAO_JU_FU_HUO</h3> <p>{</p> <pre><code>"qi_ci": 同晋级赛, "uid": uid 操作的玩家, "dao_ju_type": 1 钻石</code></pre> <p>} 返回<br /> result = { code = error.OK 标识成功</p> <p>NO_REVIVE_TIMES = -84 # 已经没有复活次数了 REVIVE_FAIL_WITHOUT_ENOUGH = -85 # 复活道具或资产不足,复活失败 }</p> <p>NO_REVIVE_TIMES = -84 # 已经没有复活次数了 REVIVE_FAIL_WITHOUT_ENOUGH = -85 # 复活道具或资产不足,复活失败</p> <h3>2396 淘汰赛 子游戏调用 道具进阶 MATCH_TTS_DAO_JU_JING_JIE = 96</h3> <p>{</p> <pre><code>"qi_ci": 同晋级赛, "uid": uid 操作的玩家,</code></pre> <p>} 返回<br /> result = { code = error.OK 标识成功 }</p> <h3>2397 淘汰赛 子游戏调用 放弃复活 MATCH_TTS_FANG_QI_FU_HUO = 97</h3> <p>{</p> <pre><code>"match_conf": 同晋级赛, "uid": uid 操作的玩家,</code></pre> <p>}</p> <p>返回<br /> result = { code = error.OK 标识成功 }</p> <h3>2398 淘汰赛 通知子游戏 玩家被淘汰 MATCH_TTS_PLAYER_OUT = 98</h3> <p>{</p> <p>}</p> <p>返回<br /> result = { code = error.OK 标识成功 { &quot;awards_info: [{&quot;goods_id&quot;: 1111, &quot;count&quot;: 1, &quot;reason&quot;: 29}] } }</p> <h3>2399 淘汰赛 通知子游戏 桌子比赛结束的结果</h3> <pre><code>{ } 返回 result = { "jin_jie_player_data": [ "uid": self.uid, id "jie_ceng": self.jie_ceng, 第几阶层 "fx_count": self.fen_xiang_fu_huo_count, 分享复活次数 "dj_count": self.dao_ju_fu_huo_count, 道具/钻石复活次数 ], "tao_tai_player_data": [ "uid": self.uid, id "jie_ceng": self.jie_ceng, 第几阶层 "fx_count": self.fen_xiang_fu_huo_count, 分享复活次数 "dj_count": self.dao_ju_fu_huo_count, 道具/钻石复活次数 ], "qi_ci": self.qi_ci }</code></pre> <h3>2377 闯关赛 通知子游戏 桌子比赛结束的结果 MATCH_CGS_TABLE_GAME_OVER</h3> <pre><code>{ } 返回 result = { "guo_guan": [ 'uid': self.__uid, "guan_ka": self.__guan_ka, 'score': self.__score ], "tao_tai": [ ], "qi_ci": self.qi_ci }</code></pre> <h3>2570 闯关赛 通知子游戏,开始匹配 MATCH_CGS_JUDGE_PI_PEI(一桌)</h3> <p>{ 无输入 由服务端主动发起通知子游戏 淘汰赛以桌为单位,匹配一桌打一桌 } 返回result = { &quot;judge_info&quot;:{ &quot;tid&quot;: self.<strong>tid, &quot;s&quot;: self.</strong>t_status, &quot;p&quot;: self.get_all_cgs_player_info(), { 'uid': self.<strong>uid, &quot;guan_ka&quot;: self.__guan_ka, 'score': self.</strong>score, &quot;dao_ju_list&quot;: self.<strong>cgs_dao_ju_list } &quot;qi_ci&quot;: self.</strong>qi_ci, &quot;result&quot;: self.__judge_result }</p> <h3>2369 选择道具开始游戏</h3> <pre><code>{ qi_ci : 比赛场次 uid: 玩家ID dao_ju_id_list: 数组 道具列表[1,2,3] } 返回 { 根据CODE 判定,成功加入匹配队列,不需做其他操作 }</code></pre> <h3>2375 保留积分退出闯关 MATCH_CGS_BAO_LIU_TUI_CHU</h3> <pre><code>{ qi_ci uid } 返回 { "tid": self.__tid, "s": self.__t_status, "p": self.get_all_player_uid(), }</code></pre> <h2>web 接口</h2> <h3>查询房间信息</h3> <p><a href="http://lqhall.hainanmj.com/queryTid?tid=156664">http://lqhall.hainanmj.com/queryTid?tid=156664</a> 返回 { status = 1标识成功 不是1就读取data中的msg</p> <p>data = 相应数据 } {&quot;data&quot;: {&quot;rule_type&quot;: 1, &quot;round_count&quot;: 4, &quot;roomlink&quot;: &quot;{}&quot;, &quot;club_id&quot;: 0, &quot;kou_ji_jin&quot;: 0, &quot;game_type&quot;: 9, &quot;state&quot;: &quot;0&quot;, &quot;owner&quot;: 110588, &quot;sid&quot;: 1, &quot;tid&quot;: 156664, &quot;time&quot;: 1596599516, &quot;creater&quot;: 110588, &quot;is_agent&quot;: 0, &quot;friendRoom&quot;: 0, &quot;rules&quot;: &quot;{\&quot;isSevenPairs\&quot;: 0, \&quot;shang_xia_ji\&quot;: 0, \&quot;isHongZhong\&quot;: 0, \&quot;jian_gang_san\&quot;: 0, \&quot;isFan\&quot;: 0, \&quot;canQiangGangHu\&quot;: 1, \&quot;friendRoom\&quot;: 0, \&quot;shangGa\&quot;: 1, \&quot;zhuangXian\&quot;: 0, \&quot;haiDiBaoPai\&quot;: 0, \&quot;man_tang_ji\&quot;: 0, \&quot;liuJuSuanFen\&quot;: 0, \&quot;huaHu\&quot;: 0, \&quot;liu_ju_bao_gang\&quot;: 0, \&quot;maxPlayer\&quot;: 3, \&quot;tuoGuan\&quot;: 0, \&quot;lianZhuang\&quot;: 0, \&quot;ze_ren_ji\&quot;: 1, \&quot;hu_pai_ti_shi\&quot;: 0, \&quot;bi_men_yi_shou\&quot;: 0, \&quot;limitScore\&quot;: 0, \&quot;shao_ji_shao_gang\&quot;: 0, \&quot;bao_ting \&quot;: 1, \&quot;jiaoLing\&quot;: 0, \&quot;sui_ji_ting_pai\&quot;: 0, \&quot;an_long_xue_zhan\&quot;: 0, \&quot;huType\&quot;: 1, \&quot;canChi\&quot;: 1, \&quot;zhan_ji\&quot;: 0, \&quot;useRobot\&quot;: 0, \&quot;birdCount\&quot;: 0, \&quot;suo_de_jia_1\&quot;: 0, \&quot;liang_men_pai\&quot;: 0, \&quot;chong_feng_ji\&quot;: 1, \&quot;liu_ju_bao_ji\&quot;: 0, \&quot;zi_mo_jia_bei\&quot;: 1, \&quot;10_s_zi_dong_chu_pai\&quot;: 0, \&quot;wuZiPai\&quot;: 0, \&quot;fangGouJiao\&quot;: 0, \&quot;lianKai\&quot;: 0}&quot;, &quot;roomcards&quot;: 0}, &quot;status&quot;: 1, &quot;desc&quot;: &quot;&quot;}</p> <h3>查询是否可以加入房间</h3> <p><a href="http://web.xuhuiqp.com/queryJoinTid?tid=156664&uid=110274">http://web.xuhuiqp.com/queryJoinTid?tid=156664&uid=110274</a> {&quot;data&quot;: {&quot;msg&quot;: &quot;\u53ef\u4ee5\u52a0\u5165&quot;}, &quot;status&quot;: 1, &quot;desc&quot;: &quot;&quot;}</p> <h3>查询用户信息</h3> <p><a href="http://lweb.xuhuiqp.com/sqUid?uid=110274">http://lweb.xuhuiqp.com/sqUid?uid=110274</a></p> <h3>查询玩家在亲友圈房间情况</h3> <p><a href="http://lweb.xuhuiqp.com/sqUserRoom?uid=110274">http://lweb.xuhuiqp.com/sqUserRoom?uid=110274</a></p> <h3>用户token登录</h3> <p><a href="http://web.xuhuiqp.com/queryToken?token=k1AJ37vKKwrXQracRkKn1Wb8wKna5A3FxGG9aFa">http://web.xuhuiqp.com/queryToken?token=k1AJ37vKKwrXQracRkKn1Wb8wKna5A3FxGG9aFa</a></p> <h3>子游戏设置roomlink接口</h3> <p><a href="http://web.xuhuiqp.com/setGameLink?game_type=10&base_url=lqhall.hainanmj.com&setting=aaa,bbb,ccc&time=12345">http://web.xuhuiqp.com/setGameLink?game_type=10&base_url=lqhall.hainanmj.com&setting=aaa,bbb,ccc&time=12345</a></p> <h3>子游戏查询roomlink接口</h3> <p><a href="http://web.xuhuiqp.com/queryRoomByServerId?server_id=10">http://web.xuhuiqp.com/queryRoomByServerId?server_id=10</a> (包含固定参数与证书,post/get)</p> <h3>子游戏 亲友圈 房间建立通知接口</h3> <p><a href="http://web.xuhuiqp.com/clubJudgeCreate?club_id=100210&tid=222222&server_id=13">http://web.xuhuiqp.com/clubJudgeCreate?club_id=100210&tid=222222&server_id=13</a></p> <h3>子游戏 亲友圈 房间解散通知接口</h3> <p><a href="http://web.xuhuiqp.com/clubJudgeDissmiss?club_id=100210&tid=222222&server_id=13">http://web.xuhuiqp.com/clubJudgeDissmiss?club_id=100210&tid=222222&server_id=13</a></p> <h3>子游戏 亲友圈 玩家加入房间通知接口</h3> <p><a href="http://web.xuhuiqp.com/clubJudgePlayerJoin?club_id=100210&tid=222222&server_id=13&uid=100111">http://web.xuhuiqp.com/clubJudgePlayerJoin?club_id=100210&tid=222222&server_id=13&uid=100111</a></p> <h3>子游戏 亲友圈 玩家退出房间通知接口</h3> <p><a href="http://web.xuhuiqp.com/clubJudgePlayerQuit?club_id=100210&tid=222222&server_id=13&uid=100111">http://web.xuhuiqp.com/clubJudgePlayerQuit?club_id=100210&tid=222222&server_id=13&uid=100111</a></p> <h3>子游戏 返还房卡通知接口</h3> <p>在解散房间时就不操作反还房卡,子游戏先返回房卡后再解散 <a href="http://127.0.0.1:80/clubBackRoomCard?clubID=100210&tid=222222&server_id=137">http://127.0.0.1:80/clubBackRoomCard?clubID=100210&tid=222222&server_id=137</a></p>

页面列表

ITEM_HTML