Files
youle_cocos/projects/majiang_jx/js/flow/recon/send_recon.js
T
joywayerandClaude Opus 4.8 7ab748919a chore: 纳入项目全部源码进根仓库统一管理
删除 YouleNexus 内嵌 .git,统一由根仓库唯一管理。提交:
- projects/ 旧 H5 模板 Game_Surface_3 与各子游戏源码
- cocoscreator_projects/YouleNexus 工程 + cocos-creator-mcp 扩展源码
- CLAUDE.md、.mcp.json 等配置
library/temp/node_modules/dist 等缓存由 .gitignore 排除。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 11:55:13 +08:00

185 lines
4.3 KiB
JavaScript

//请求所有数据,发包到服务器(开战和重连时)
d.ini_StartWar=function (mode)
{var show_menu=0;
if(mode==2)//if是重连
{show_menu=2;}
d.ini_start(show_menu);
set_self(291,7,"房号:"+Desk.roomcode+"\n("+String(d.turn[1]+1)+"/"+Desk.count+"局)");
if(d.replay==0)
{var send={"app":"youle","route":d.route,"rpc":"starta","data":{"agentid":GameData.AgentId,"gameid":GameData.GameId,"playerid":C_Player.playerid,"roomcode":Desk.roomcode,"seat":C_Player.seat,"send":mode}};
Net.ws_tcp.send(JSON.stringify(send));
}
}
d.baoting_send=function(ting)
{
var send = {
"app": "youle",
"route": d.route,
"rpc": "baoting",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"baoting": ting,
}
};
Net.ws_tcp.send(JSON.stringify(send));
set_self(2176, 37, 0, 0, 0);
set_self(2177, 37, 0, 0, 0);
set_self(2322,37,0);
}
d.robot_send=function(robot_chu)
{
var send = {
"app": "youle",
"route": d.route,
"rpc": "baoting",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"baoting": robot_chu,
}
};
Net.ws_tcp.send(JSON.stringify(send));
}
d.offline_war = function (mode) {
var send = {
"app": "youle",
"route": d.route,
"rpc": "offline",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"send": mode
}
};
Net.ws_tcp.send(JSON.stringify(send));
}
d.Play_Card = function () {
d.jishi_chu=0;
var send = {
"app": "youle",
"route": d.route,
"rpc": "sieves",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"sieves": d.sieves[2],
}
};
Net.ws_tcp.send(JSON.stringify(send));
set_self(1363, 37, 0, 0, 0);
}
d.debug = function () {
if (d.turn[1] + 1 == d.turn[2] && d.isEnd()) {
return;
}
var send = {
"app": "youle",
"route": d.route,
"rpc": "debug",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"hand": d.hand[C_Player.seat]
}
};
Net.ws_tcp.send(JSON.stringify(send));
}
d.offline_kick = function (offkick_seat) {
if (Desk.PlayerList[offkick_seat].onstate == 1) {
var send = {
"app": "youle",
"route": d.route,
"rpc": "off_kick",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"kick_seat": offkick_seat,
}
};
Net.ws_tcp.send(JSON.stringify(send));
Desk.PlayerList[offkick_seat].onstate = 0 ;
}
}
d.unprepare_kick = function (unprepare_seat) {
var send = {
"app": "youle",
"route": d.route,
"rpc": "unprepare_kick",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"unprepare_seat": unprepare_seat,
}
};
Net.ws_tcp.send(JSON.stringify(send));
}
//重绘取消代打
d.time_over = function () {
var send = {
"app": "youle",
"route": d.route,
"rpc": "overtime",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"daida": 0,
}
};
Net.ws_tcp.send(JSON.stringify(send));
}
d.free_room=function(){
var send = {
"app": "youle",
"route": d.route,
"rpc": "free_before_makewar",
"data": {
"agentid": GameData.AgentId,
"gameid": GameData.GameId,
"playerid": C_Player.playerid,
"roomcode": Desk.roomcode,
"seat": C_Player.seat,
"go": 1,
}
};
Net.ws_tcp.send(JSON.stringify(send));
}