平台和mcp的升级改动
This commit is contained in:
@@ -142,7 +142,7 @@ GameData.hallConfigName = ["enablePay",
|
||||
'wareHouse',//是否开启仓库功能0->不开启1->开启保险箱不开启赠送2->开启赠送不开启保险箱3->开启星星赠送(开启保险箱)4->开启房卡赠送(开启保险箱)5->开启星星房卡赠送(开启保险箱)
|
||||
'betaText',//版本号后的beta显示内容
|
||||
'launchImgUrl',//启动页图片地址
|
||||
'shareType:',//分享朋友圈类型0->链接分享 1->图片分享
|
||||
'shareType',//分享朋友圈类型0->链接分享 1->图片分享
|
||||
'shareImgUrl',//分享朋友圈图片链接
|
||||
'launchWaitTime',//启动等待时间
|
||||
'shareBgUrl',//分享背景图片
|
||||
@@ -151,7 +151,8 @@ GameData.hallConfigName = ["enablePay",
|
||||
'channelKey',//支付key
|
||||
'payCSS',//支付css
|
||||
'payJS',//支付js
|
||||
'openVideo'
|
||||
'openVideo',
|
||||
'showVisitor'//是否显示游客登陆
|
||||
];//是否开启视频];
|
||||
GameData.hallConfig = {
|
||||
enablePay:0,
|
||||
@@ -185,6 +186,7 @@ GameData.hallConfig = {
|
||||
payCSS:"",//支付css
|
||||
payJS:"",//支付js
|
||||
openVideo:0,//是否开启视频
|
||||
showVisitor:0//是否显示游客登陆
|
||||
};
|
||||
GameData.starName = "星星";
|
||||
GameData.roomCardName = "房卡";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,12 @@ function Player(seat){
|
||||
//this.offline = 0;//玩家是否离线0->否 1->离线
|
||||
this.canexit=1;//是否可以直接离开
|
||||
this.onstate=0;//0:在线1:离线2:通话中
|
||||
/*
|
||||
{"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市",
|
||||
"cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333,
|
||||
"province":"江西省","street":"施尧路"}
|
||||
*/
|
||||
//定位信息 牌桌外
|
||||
this.addr = null;
|
||||
this.invitecode = "";//邀请码
|
||||
this.isStart = false;//能否点击按钮开始游戏
|
||||
@@ -31,6 +37,14 @@ function Player(seat){
|
||||
this.charm = undefined;
|
||||
this.sign = "";//签名
|
||||
this.tel = "";//绑定手机号
|
||||
/*
|
||||
{"address":"江西省南昌市青云谱区施尧路靠近上海浦东发展银行(长天支行)","city":"南昌市",
|
||||
"cityCode":"0791","country":"中国","district":"青云谱区","latitude":28.623546,"longitude":115.900333,
|
||||
"province":"江西省","street":"施尧路"}
|
||||
*/
|
||||
//定位信息 牌桌内
|
||||
this.location = null;
|
||||
|
||||
}
|
||||
//玩家信息初始化
|
||||
if(typeof(Player.prototype.Init) == "undefined"){
|
||||
@@ -67,6 +81,7 @@ if(typeof(Player.prototype.Init) == "undefined"){
|
||||
this.charm = undefined;
|
||||
this.sign = "";//签名
|
||||
this.tel = "";//绑定手机号
|
||||
|
||||
};
|
||||
}
|
||||
//玩家微信信息初始化
|
||||
@@ -107,6 +122,7 @@ if(typeof(Player.prototype.SetMyInfo) == "undefined"){
|
||||
this.charm = object.charm;
|
||||
this.sign = object.sign;
|
||||
this.tel = object.tel;
|
||||
|
||||
//this.setTel();
|
||||
//this.bankpwd = object.bank;//是否设置仓库密码 this.bankpwd = 0;//是否设置仓库密码
|
||||
//this.paycode = _paycode;
|
||||
@@ -121,7 +137,7 @@ if(typeof(Player.prototype.SetLocationInfo) == "undefined"){
|
||||
}else{
|
||||
set_self(200, 7, "获取定位失败!", 0, 0);
|
||||
}
|
||||
|
||||
this.location = _locationinfo;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -279,6 +295,7 @@ if(typeof(Player.prototype.SetDeskInfo) == "undefined"){
|
||||
}else{
|
||||
this.paycode = "";
|
||||
}
|
||||
this.location = _data.location;
|
||||
this.charm = _data.charm;
|
||||
this.sign = _data.sign;
|
||||
};
|
||||
|
||||
@@ -421,6 +421,8 @@ Desk.login=function(_msg){//登录
|
||||
Func.createRoom();
|
||||
}
|
||||
Game_Modify.Reconnect(_msg.data.deskinfo);
|
||||
}else{
|
||||
Game_Modify.ReconnectNoMakewar();
|
||||
}
|
||||
//}
|
||||
}else{
|
||||
@@ -911,7 +913,7 @@ Desk.send_text=function(_msg){//发送消息
|
||||
if(!_msg.data.type){
|
||||
var pobj = Desk.GetPlayerBySeat(_msg.data.seat);
|
||||
GameUI.playTextVoice(_msg.data.text,pobj.sex);
|
||||
GameUI.ShowChat(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),_msg.data.text);
|
||||
GameUI.ShowChat(_msg.data.seat,_msg.data.text);
|
||||
GameUI.addCommunion(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),1,_msg.data.text,0,null,pobj.sex);
|
||||
}else if(_msg.data.type == 1){//全服公告
|
||||
GameUI.CloseChat();
|
||||
@@ -929,7 +931,7 @@ Desk.send_text=function(_msg){//发送消息
|
||||
var idx = Number(_msg.data.text);
|
||||
_msg.data.text = Game_Config.Info.TextContent[(idx - 1)%Game_Config.Info.TextContent.length];
|
||||
GameUI.playTextVoice(_msg.data.text);
|
||||
GameUI.ShowChat(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),_msg.data.text);
|
||||
GameUI.ShowChat(_msg.data.seat,_msg.data.text);
|
||||
GameUI.addCommunion(Logic.ChangeToStatus(C_Player.seat,_msg.data.seat),1,_msg.data.text,0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ Utl.Config.sound = "";
|
||||
|
||||
Utl.Config.pre_wxinfo = "tsgame_wxinfo_";
|
||||
Utl.Config.wxinfo = "tsgame_wxinfo";
|
||||
Utl.Config.visitorinfo = "tsgame_visitorinfo";
|
||||
Utl.Config.maxtime = 48;//小时
|
||||
Utl.Config.pre_validtime = "tsgame_validtime_";//有效时间(时间戳)
|
||||
Utl.Config.validtime = "tsgame_validtime";//有效时间(时间戳)
|
||||
@@ -545,43 +546,49 @@ Utl.openVideo = function (_playerList, _seat, _roomcode, roomtype) {
|
||||
set_self(152, 37, 0, 0, 0);
|
||||
set_self(153, 37, 0, 0, 0);
|
||||
set_self(107, 37, 0, 0, 0);
|
||||
for (var i = 0; i < Desk.PlayerList.length; i++) {
|
||||
if (Desk.PlayerList[i].nickname != "") {
|
||||
var ind = Logic.ChangeToStatus(C_Player.seat, i);
|
||||
var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true);
|
||||
set_self(406 + ind, 7, text, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
// if (Game_Modify.updatePlayerInfoUI) {
|
||||
// for (var i = 0; i < Desk.PlayerList.length; i++) {
|
||||
// Game_Modify.updatePlayerInfoUI(i);
|
||||
// }
|
||||
// } else {
|
||||
for (var i = 0; i < Desk.PlayerList.length; i++) {
|
||||
if (Desk.PlayerList[i].nickname != "") {
|
||||
var ind = Logic.ChangeToStatus(C_Player.seat, i);
|
||||
var text = Func.subString(Desk.PlayerList[i].nickname, Game_Config.Info.Mainnickname, true);
|
||||
set_self(406 + ind, 7, text, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
}
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.myPosition - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(406 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(406 + ind, 18, Game_Config.Info.position[ind - 1] - text.gblen() * Game_Config.Info.textwidth_1 / 2, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
set_self(436 + ind, 7, 0, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
set_self(436 + ind, 7, 0, 0, 0);
|
||||
if (ind == 0) {
|
||||
if (Game_Config.Info.myPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
}
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.myPosition - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
}
|
||||
} else {
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
if (Game_Config.Info.otherPositionDefault) {
|
||||
set_self(436 + ind, 18, get_self(376 + ind, 18, 0, 0, 0) + get_self(376 + ind, 20, 0, 0, 0) / 2 - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
} else {
|
||||
set_self(436 + ind, 18, Game_Config.Info.position[ind - 1] - Game_Config.Info.textwidth_2 / 2, 0, 0);
|
||||
}
|
||||
}
|
||||
Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar);
|
||||
set_group(43 + ind, 37, 1, 0, 0);
|
||||
}
|
||||
Func.up_imgurl(116 + ind, Desk.PlayerList[i].avatar);
|
||||
set_group(43 + ind, 37, 1, 0, 0);
|
||||
}
|
||||
}
|
||||
// }
|
||||
play_ani123(1, 156, 35, 255, 100, 1000, 0, 0, 1);
|
||||
Utl.playMusic();
|
||||
set_self(3141, 37, 0, 0, 0);
|
||||
|
||||
@@ -364,8 +364,7 @@ Net.Send_get_player_grade1 = function(_data){
|
||||
Net.get_player_grade1 = function(_msg){
|
||||
gameCombat.get_player_grade1(_msg);
|
||||
GameUI.EndLoad();
|
||||
//Logic.SetCombatInfo(_msg.data);
|
||||
//GameUI.OpenCombat();
|
||||
|
||||
|
||||
}
|
||||
//发送获取战绩2
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -337,35 +337,35 @@ Logic.AppStart=function(){
|
||||
// 解决:覆盖全局字体渲染函数,统一使用更粗的中文友好字体
|
||||
|
||||
// 保存原始的 Canvas fillText 方法
|
||||
var originalFillText = CanvasRenderingContext2D.prototype.fillText;
|
||||
var originalStrokeText = CanvasRenderingContext2D.prototype.strokeText;
|
||||
// var originalFillText = CanvasRenderingContext2D.prototype.fillText;
|
||||
// var originalStrokeText = CanvasRenderingContext2D.prototype.strokeText;
|
||||
|
||||
// 覆盖 fillText 方法,在绘制前统一字体设置
|
||||
CanvasRenderingContext2D.prototype.fillText = function() {
|
||||
// 如果当前字体包含 'lighter' 或只有 'Arial',替换为更适合中文的字体
|
||||
if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
// 提取字体大小
|
||||
var sizeMatch = this.font.match(/(\d+)px/);
|
||||
if (sizeMatch) {
|
||||
var size = sizeMatch[1];
|
||||
// 使用 500 字重(中等粗细)+ 中文友好字体
|
||||
this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
}
|
||||
}
|
||||
return originalFillText.apply(this, arguments);
|
||||
};
|
||||
// // 覆盖 fillText 方法,在绘制前统一字体设置
|
||||
// CanvasRenderingContext2D.prototype.fillText = function() {
|
||||
// // 如果当前字体包含 'lighter' 或只有 'Arial',替换为更适合中文的字体
|
||||
// if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
// // 提取字体大小
|
||||
// var sizeMatch = this.font.match(/(\d+)px/);
|
||||
// if (sizeMatch) {
|
||||
// var size = sizeMatch[1];
|
||||
// // 使用 500 字重(中等粗细)+ 中文友好字体
|
||||
// this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
// }
|
||||
// }
|
||||
// return originalFillText.apply(this, arguments);
|
||||
// };
|
||||
|
||||
// 同样覆盖 strokeText 方法
|
||||
CanvasRenderingContext2D.prototype.strokeText = function() {
|
||||
if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
var sizeMatch = this.font.match(/(\d+)px/);
|
||||
if (sizeMatch) {
|
||||
var size = sizeMatch[1];
|
||||
this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
}
|
||||
}
|
||||
return originalStrokeText.apply(this, arguments);
|
||||
};
|
||||
// // 同样覆盖 strokeText 方法
|
||||
// CanvasRenderingContext2D.prototype.strokeText = function() {
|
||||
// if (this.font && (this.font.includes('lighter') || this.font.includes('Arial'))) {
|
||||
// var sizeMatch = this.font.match(/(\d+)px/);
|
||||
// if (sizeMatch) {
|
||||
// var size = sizeMatch[1];
|
||||
// this.font = '500 ' + size + 'px "Microsoft YaHei", "PingFang SC", Arial, sans-serif';
|
||||
// }
|
||||
// }
|
||||
// return originalStrokeText.apply(this, arguments);
|
||||
// };
|
||||
|
||||
// console.log('[字体优化] Canvas 文字渲染已优化,中英文粗细统一');
|
||||
// ============================================================================
|
||||
@@ -1150,9 +1150,7 @@ Logic.TurnOffVoice = function(){
|
||||
|
||||
}
|
||||
|
||||
//Logic.SetCombatInfo=function(_data){
|
||||
//CombatInfo = _data.gradeinfo;
|
||||
//}
|
||||
|
||||
Logic.ChangeToStatus=function(myseat,seat){//将座位转化为对应位置
|
||||
return (seat-myseat+Game_Config.Max.PlayerCnt)%Game_Config.Max.PlayerCnt;
|
||||
}
|
||||
@@ -1798,6 +1796,7 @@ Logic.setConfigInfo = function(){
|
||||
}
|
||||
for(var i=0;i<GameData.hallConfigName.length;i++){
|
||||
var val = get_paravalue(GameData.serverConfig,GameData.hallConfigName[i]);
|
||||
// console.log(GameData.hallConfigName[i] + val);
|
||||
if(val != null){
|
||||
GameData.hallConfig[GameData.hallConfigName[i]] = val;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user