update zh

This commit is contained in:
guoqing.zhu 2022-05-30 15:51:22 +08:00
parent 03a7381d73
commit bad3788b7c
10 changed files with 188 additions and 187 deletions

View File

@ -47,8 +47,8 @@
}, },
"_scale": { "_scale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.26425451014034457, "x": 0.5993534574534599,
"y": 0.26425451014034457, "y": 0.5993534574534599,
"z": 1 "z": 1
}, },
"_quat": { "_quat": {
@ -13797,7 +13797,7 @@
"__id__": 411 "__id__": 411
} }
], ],
"_active": true, "_active": false,
"_level": 2, "_level": 2,
"_components": [ "_components": [
{ {

View File

@ -1994,9 +1994,7 @@
"_enabled": true, "_enabled": true,
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": null,
"__uuid__": "49e4021a-2ed5-401e-aa14-c19439b8ecc3"
},
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
@ -2682,9 +2680,7 @@
"_enabled": true, "_enabled": true,
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": null,
"__uuid__": "979a4b81-4158-4a34-b517-b9237034aaab"
},
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,
@ -3370,9 +3366,7 @@
"_enabled": true, "_enabled": true,
"_srcBlendFactor": 770, "_srcBlendFactor": 770,
"_dstBlendFactor": 771, "_dstBlendFactor": 771,
"_spriteFrame": { "_spriteFrame": null,
"__uuid__": "02334fe4-0bb0-4395-9d10-ac10ac49e52a"
},
"_type": 0, "_type": 0,
"_sizeMode": 0, "_sizeMode": 0,
"_fillType": 0, "_fillType": 0,

View File

@ -23,7 +23,6 @@ function isDevEnv() {
} }
if (isDevEnv()) { if (isDevEnv()) {
console.log('测试服');
allBaseNet = { allBaseNet = {
usa: '-test.kingsome.cn', usa: '-test.kingsome.cn',
japan: '-test.kingsome.cn', japan: '-test.kingsome.cn',

View File

@ -97,14 +97,14 @@ cc.Class({
// friendlist // friendlist
onAddToBlacklist() { onAddToBlacklist() {
console.log('加入黑名单');
cc.chatMgr.sendmsg('CMFriendAddBlack', { cc.chatMgr.sendmsg('CMFriendAddBlack', {
user_info: JSON.parse(this.tmpData), //MFUserInfo user_info: JSON.parse(this.tmpData), //MFUserInfo
}); });
}, },
onDelete() { onDelete() {
console.log('删除好友');
cc.chatMgr.sendmsg('CMFriendDelete', { cc.chatMgr.sendmsg('CMFriendDelete', {
friend_id: this.playerAccount, friend_id: this.playerAccount,
}); });
@ -112,16 +112,15 @@ cc.Class({
// applylist // applylist
onAgree() { onAgree() {
console.log('同意申请');
console.log(`申请data:${this.tmpData}`);
cc.chatMgr.sendmsg('CMFriendAgree', { cc.chatMgr.sendmsg('CMFriendAgree', {
apply: JSON.parse(this.tmpData), apply: JSON.parse(this.tmpData),
}); });
}, },
onRefuse() { onRefuse() {
console.log('拒绝申请');
console.log(`申请data:${this.tmpData}`);
cc.chatMgr.sendmsg('CMFriendRefuse', { cc.chatMgr.sendmsg('CMFriendRefuse', {
apply: JSON.parse(this.tmpData), apply: JSON.parse(this.tmpData),
}); });
@ -129,14 +128,14 @@ cc.Class({
// blacklist // blacklist
onAddToFriend() { onAddToFriend() {
console.log('加入好友列表');
cc.chatMgr.sendmsg('CMFriendDeleteBlack', { cc.chatMgr.sendmsg('CMFriendDeleteBlack', {
account_id: this.playerAccount, account_id: this.playerAccount,
}); });
}, },
onAddNewFriend() { onAddNewFriend() {
console.log('添加新朋友');
cc.chatMgr.sendmsg('CMFriendApply', { cc.chatMgr.sendmsg('CMFriendApply', {
friend_id: this.playerAccount, friend_id: this.playerAccount,
msg: '', msg: '',
@ -146,13 +145,13 @@ cc.Class({
onInviteFriend() { onInviteFriend() {
if (this.canInvite) { if (this.canInvite) {
this.canInvite = false; this.canInvite = false;
console.log('邀请好友');
var data = { var data = {
msg: 'InvitePlay', msg: 'InvitePlay',
player: playerData.name, player: playerData.name,
data: JSON.parse(this.tmpData), data: JSON.parse(this.tmpData),
}; };
// 发送自定义消息
cc.chatMgr.sendmsg('CMSendCustomMsg', { cc.chatMgr.sendmsg('CMSendCustomMsg', {
target_list: this.playerAccount, target_list: this.playerAccount,
msg: JSON.stringify(data), msg: JSON.stringify(data),

View File

@ -42,7 +42,7 @@ cc.Class({
}, },
}, },
// 游客不显示好友
onLoad() { onLoad() {
// get friendlist // get friendlist
cc.chatMgr.sendmsg("CMFriendList"); cc.chatMgr.sendmsg("CMFriendList");
@ -96,19 +96,19 @@ cc.Class({
const node = cc.instantiate(this.pb_oneFriend); const node = cc.instantiate(this.pb_oneFriend);
switch (type) { switch (type) {
case 0: case 0:
// 好友列表
node.getComponent("SingleFriendList").setToFriendList(); node.getComponent("SingleFriendList").setToFriendList();
break; break;
case 1: case 1:
// 申请列表
node.getComponent("SingleFriendList").setToApplyList(); node.getComponent("SingleFriendList").setToApplyList();
break; break;
case 2: case 2:
// 黑名单
node.getComponent("SingleFriendList").setToBlackList(); node.getComponent("SingleFriendList").setToBlackList();
break; break;
case 3: case 3:
// 添加好友
node.getComponent("SingleFriendList").setToAddFriend(); node.getComponent("SingleFriendList").setToAddFriend();
break; break;
} }
@ -144,14 +144,13 @@ cc.Class({
} }
}, },
// 钱包用户需要添加 6516_2006_的前缀并且需要lowcast toLowerCase()
// 游客不需要
dirtywordcheck(obj) { dirtywordcheck(obj) {
if (obj.errcode == 0) { if (obj.errcode == 0) {
if (this.edit_find.string != "" && this.edit_find.string) { if (this.edit_find.string != "" && this.edit_find.string) {
var tmp = ""; var tmp = "";
if (this.edit_find.string.startsWith("0x")) { if (this.edit_find.string.startsWith("0x")) {
// 钱包地址
console.log("search by wallet"); console.log("search by wallet");
tmp = `6516_2006_${this.edit_find.string.toLowerCase()}`; tmp = `6516_2006_${this.edit_find.string.toLowerCase()}`;
NetManage.searchUserByAccountid(tmp, (res) => { NetManage.searchUserByAccountid(tmp, (res) => {
@ -164,7 +163,7 @@ cc.Class({
this.edit_find.string.startsWith("6513_2006_") || this.edit_find.string.startsWith("6513_2006_") ||
this.edit_find.string.startsWith("6516_2006_") this.edit_find.string.startsWith("6516_2006_")
) { ) {
// 账户id
console.log("search by account"); console.log("search by account");
tmp = this.edit_find.string; tmp = this.edit_find.string;
NetManage.searchUserByAccountid(tmp, (res) => { NetManage.searchUserByAccountid(tmp, (res) => {

View File

@ -214,9 +214,9 @@ cc.Class({
); );
} }
// //
//第一次显示改名界面 //
// this.calleditname(90001); // this.calleditname(90001);
// 后端说可以改名并且已经链接钱包的情况 才可以改名 //
if (window.canrename && window.hasWallet) { if (window.canrename && window.hasWallet) {
window.canrename = false; window.canrename = false;
this.nd_editName.active = true; this.nd_editName.active = true;
@ -224,7 +224,7 @@ cc.Class({
}, },
getCustomMsg(msg) { getCustomMsg(msg) {
// 只有不在游戏中的时候出现 //
console.log('get once '); console.log('get once ');
if (!cc.find('Canvas').getComponentInChildren('GameUI')) { if (!cc.find('Canvas').getComponentInChildren('GameUI')) {
uimanger.showUI(InviteTip.prefabPath, msg); uimanger.showUI(InviteTip.prefabPath, msg);
@ -241,7 +241,7 @@ cc.Class({
); );
}, },
// 将钱包地址中间字段换成 *****
replacepos(text, start, stop) { replacepos(text, start, stop) {
var mid = '*****'; var mid = '*****';
let mystr = let mystr =
@ -350,7 +350,7 @@ cc.Class({
jcgamelog.addOperation(OperationType.BUTTON, 'intobattle'); jcgamelog.addOperation(OperationType.BUTTON, 'intobattle');
if (cc.sys.isNative) { if (cc.sys.isNative) {
if (Config.isTest) { if (Config.isTest) {
// 审核
var nd = cc.instantiate(this.pb_chose); var nd = cc.instantiate(this.pb_chose);
this.node.addChild(nd); this.node.addChild(nd);
} else { } else {
@ -420,7 +420,7 @@ cc.Class({
// this.node.addChild(nd); // this.node.addChild(nd);
// }, // },
buyitem(v) { buyitem(v) {
//待扩展其他类型的
var nd = cc.instantiate(this.pb_herobuy); var nd = cc.instantiate(this.pb_herobuy);
nd.getComponent('UIHeroBuy').initdata(v); nd.getComponent('UIHeroBuy').initdata(v);
this.node.addChild(nd); this.node.addChild(nd);
@ -449,7 +449,7 @@ cc.Class({
this.node.addChild(nd); this.node.addChild(nd);
}); });
// type 10 时常rank
// NetManage.getRankList(10, () => { // NetManage.getRankList(10, () => {
// var nd = cc.instantiate(this.pb_rank); // var nd = cc.instantiate(this.pb_rank);
// this.node.addChild(nd); // this.node.addChild(nd);

View File

@ -30,7 +30,7 @@ var rsp = function () {
this.loginparma.proto_version = this.pversion; this.loginparma.proto_version = this.pversion;
this.loginparma.zid = BaseNet.getCurrentZid(); this.loginparma.zid = BaseNet.getCurrentZid();
//console.log("准备登录测试======",this.loginparma);
this.sendmsg("CMLogin", this.loginparma); this.sendmsg("CMLogin", this.loginparma);
} else if (res.eventtype == "close" || res.eventtype == "reconnect") { } else if (res.eventtype == "close" || res.eventtype == "reconnect") {
this.connecting = false; this.connecting = false;
@ -40,7 +40,7 @@ var rsp = function () {
this.recvMsg = function (mid, msg) { this.recvMsg = function (mid, msg) {
this.time2 = 0; this.time2 = 0;
if (mid == 101) { if (mid == 101) {
//心跳包无视
return; return;
} }
if (this.showdebug) { if (this.showdebug) {

View File

@ -337,7 +337,7 @@ var playerData = function () {
if (obj.errcode == 0) { if (obj.errcode == 0) {
this.node_id = obj.node_id; this.node_id = obj.node_id;
cc.SDKManage.NodeId = obj.node_id; cc.SDKManage.NodeId = obj.node_id;
console.log("获得NodeID====", cc.SDKManage.NodeId); console.log("NodeID====", cc.SDKManage.NodeId);
} }
}; };
@ -363,13 +363,13 @@ var playerData = function () {
this.getbattleopt = function () { this.getbattleopt = function () {
return { return {
account_id: SDKManage.account_id, //账号id account_id account_id: SDKManage.account_id, // account_id
player_count: 4, //玩家数(单人时为1) player_count: 4, //(
energy_shield: 0, //能量护盾 energy_shield: 0, //
baseskin: [this.skinres, 0, 0, 0], baseskin: [this.skinres, 0, 0, 0],
team_uuid: "", //队伍唯一id (没组队时为空字符串) team_uuid: "", // ()
team_mode: 1, //队伍模式 0:单人 1:多人 team_mode: 1, // 0:
auto_fill: true, //是否自动填充玩家 auto_fill: true, //
// team_members: _teamMembers, // team_members: _teamMembers,
weapons: [], weapons: [],
@ -485,53 +485,53 @@ var playerData = function () {
v(); v();
} else if (tp == 5) { } else if (tp == 5) {
this.ranking_list = { this.ranking_list = {
//排行榜数据 //
type: 0, //排行榜类型 1积分榜 type: 0, //
ranking_list: [ ranking_list: [
//排行榜 //
{ {
ranked: 1, //排名 ranked: 1, //
account_id: "1122", //账号id account_id: "1122", //
name: "aaa", //用户名字 name: "aaa", //
head_id: 50003, //头像id head_id: 50003, //
head_frame: 60001, //头像框id head_frame: 60001, //
level: 10, //等级 level: 10, //
exp: 0, //经验 exp: 0, //
gold: 0, //金币 gold: 0, //
diamond: 0, //钻石 diamond: 0, //
hero_id: 30100, //当前使用的英雄ID hero_id: 30100, //
rank: 11, //段位 rank: 11, //
score: 220, //积分 score: 220, //
}, },
{ {
ranked: 2, //排名 ranked: 2, //
account_id: "3344", //账号id account_id: "3344", //
name: "aaa", //用户名字 name: "aaa", //
head_id: 50003, //头像id head_id: 50003, //
head_frame: 60001, //头像框id head_frame: 60001, //
level: 10, //等级 level: 10, //
exp: 0, //经验 exp: 0, //
gold: 0, //金币 gold: 0, //
diamond: 0, //钻石 diamond: 0, //
hero_id: 30300, //当前使用的英雄ID hero_id: 30300, //
rank: 11, //段位 rank: 11, //
score: 220, //积分 score: 220, //
}, },
], ],
my_ranked: { my_ranked: {
//我的排名(如果ranked<1则表示自己未上榜) //(<)
ranked: 0, //排名 ranked: 0, //
account_id: "", //账号id account_id: "", //
name: "ssss", //用户名字 name: "ssss", //
head_id: 0, //头像id head_id: 0, //
head_frame: 0, //头像框id head_frame: 0, //
level: 20, //等级 level: 20,
exp: 0, //经验 exp: 0, //
gold: 0, //金币 gold: 0, //
diamond: 0, //钻石 diamond: 0, //
hero_id: 30200, //当前使用的英雄ID hero_id: 30200, //
rank: 12, //段位 rank: 12, //
score: 110, //积分 score: 110, //
}, },
}; };
v(); v();
@ -539,160 +539,159 @@ var playerData = function () {
v(); v();
} else if (tp == 7) { } else if (tp == 7) {
v({ v({
errcode: 0, //错误码 errcode: 0, //
errmsg: "", //错误描述 errmsg: "", //
info: { info: {
//用户信息(详细) //()
activate: 0, //是否已激活 activate: 0, //
account_id: "", //账号id account_id: "", //
name: "阿拉伯", //用户名字 name: "name", //
head_id: 50003, //头像id head_id: 50003, //
head_frame: 60001, //头像框id head_frame: 60001, //
level: 10, //等级 level: 10, //
exp: 30, //经验 exp: 30, //
max_exp: 90, //经验(上限) max_exp: 90, //()
gold: 0, //金币 gold: 0, //
diamond: 0, //钻石 diamond: 0, //
hero_id: 30200, //当前使用的英雄ID hero_id: 30200, //
current_rank: 10, //当前段位 current_rank: 10, //
history_best_rank: 11, //历史最高段位 history_best_rank: 11, //
history_seasons: [ history_seasons: [
//历史打过的赛季列表 //
{ {
season_id: 22, //赛季 season_id: 22, //
total_kills: 10, //击杀总数(个人信息) total_kills: 10, //()
game_times: 20, //游戏场次(个人信息) game_times: 20, //()
win_times: 30, //胜利场次(个人信息) win_times: 30, //()
win_rate: 40, //胜率(个人信息,百分比数值整数部分) win_rate: 40, //(,)
max_kills: 50, //最高击杀(游戏信息) max_kills: 50, //()
avg_kills: 60, //平均击杀(游戏信息) avg_kills: 60, //()
max_damage_out: 70, //最高伤害输出(游戏信息) max_damage_out: 70, //()
avg_damage_out: 80, //平均伤害输出(游戏信息) avg_damage_out: 80, //()
star_kills: 50, //击败(5纬图-击败, 百分比数值整数部分) star_kills: 50, //(-, )
star_damage: 60, //伤害(5纬图-伤害, 百分比数值整数部分) star_damage: 60, //(-, )
star_alive: 70, //生存(5纬图-生存, 百分比数值整数部分) star_alive: 70, //(-,)
star_recover: 80, //治疗(5纬图-治疗, 百分比数值整数部分) star_recover: 80, //(-, )
star_win: 100, //胜利(5纬图-胜利, 百分比数值整数部分) star_win: 100, //(-,)
}, },
], ],
}, },
}); });
} else if (tp == 8) { } else if (tp == 8) {
var tdata = { var tdata = {
errcode: 0, //错误码 errcode: 0, //
errmsg: "", //错误描述 errmsg: "", //
current_active_value: 30, //当前活跃度 current_active_value: 30, //
max_active_value: 100, //活跃度上限 max_active_value: 100, //
mission_list1: [ mission_list1: [
//任务列表1 //
{ {
mission_id: 71001, //任务id mission_id: 71001,
current: 0, //任务进度-当前 current: 0,
target: 0, //任务进度-目标 target: 0,
state: 0, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 0,
show_progress: 0, //是否显示任务进度 show_progress: 0,
}, },
{ {
mission_id: 71003, //任务id mission_id: 71003,
current: 5, //任务进度-当前 current: 5,
target: 5, //任务进度-目标 target: 5,
state: 1, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 1,
show_progress: 1, //是否显示任务进度 show_progress: 1,
}, },
{ {
mission_id: 71006, //任务id mission_id: 71006,
current: 2, //任务进度-当前 current: 2,
target: 5, //任务进度-目标 target: 5,
state: 2, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 2,
show_progress: 1, //是否显示任务进度 show_progress: 1,
}, },
{ {
mission_id: 71006, //任务id mission_id: 71006,
current: 2, //任务进度-当前 current: 2,
target: 5, //任务进度-目标 target: 5,
state: 2, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 2,
show_progress: 2, //是否显示任务进度 show_progress: 2,
}, },
{ {
mission_id: 71006, //任务id mission_id: 71006,
current: 2, //任务进度-当前 current: 2,
target: 5, //任务进度-目标 target: 5,
state: 2, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 2,
show_progress: 2, //是否显示任务进度 show_progress: 2,
}, },
], ],
mission_list2: [ mission_list2: [
//任务列表2
{ {
mission_id: 71001, //任务id mission_id: 71001,
current: 0, //任务进度-当前 current: 0,
target: 0, //任务进度-目标 target: 0,
state: 0, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 0,
show_progress: 0, //是否显示任务进度 show_progress: 0,
}, },
{ {
mission_id: 71003, //任务id mission_id: 71003,
current: 5, //任务进度-当前 current: 5,
target: 5, //任务进度-目标 target: 5,
state: 1, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 1,
show_progress: 1, //是否显示任务进度 show_progress: 1,
}, },
{ {
mission_id: 71006, //任务id mission_id: 71006,
current: 2, //任务进度-当前 current: 2,
target: 5, //任务进度-目标 target: 5,
state: 2, //任务状态 0:可领取 1:已领取 2:未完成(不可领取) state: 2,
show_progress: 1, //是否显示任务进度 show_progress: 1,
}, },
], ],
}; };
v(tdata); v(tdata);
} else if (tp == 9) { } else if (tp == 9) {
var tdata = { var tdata = {
errcode: 0, //错误码 errcode: 0,
errmsg: "", //错误描述 errmsg: "",
info: { info: {
//struct SeasonCard, 赛季手册信息
season_id: 5, //赛季id(客户端显示为Sxxx) season_id: 5,
card_lv: 11, //手册等级 card_lv: 11,
card_exp: 10, //手册经验 card_exp: 10,
card_max_exp: 100, //手册经验上限 card_max_exp: 100,
season_begin_time: 1638951964, season_begin_time: 1638951964,
season_end_time: 1638951964, season_end_time: 1638951964,
gift_packages: [ gift_packages: [
//礼包列表
//struct SeasonCardGiftPackage //struct SeasonCardGiftPackage
{ {
package_id: 0, //礼包id package_id: 0,
state: 0, //0:未购买 1:已购买 state: 0,
price_info: { price_info: {
//struct PriceInfo, 价格信息 //struct PriceInfo,
cost_list: [ cost_list: [
//扣费方式列表
//struct CostInfo //struct CostInfo
{ {
cost_group: [ cost_group: [
//一组扣费项目,(金币、钻石视为道具,可能有多种价格)
//struct CostInfoItem
{ {
item_id: 0, //购买需要消耗的道具id item_id: 0,
item_num: 0, //购买需要消耗的道具数量 item_num: 0,
discount: 0, //折扣百分比0-100 discount: 0,
}, },
], ],
}, },
], ],
discount_begin_time: 0, //折扣开始时间(utc时间) discount_begin_time: 0,
discount_end_time: 0, //折扣结束时间(utc时间) discount_end_time: 0,
}, },
}, },
], ],
received_level_rewards1: [ received_level_rewards1: [
//等级解锁的奖励已领取等级列表(普通手册)
1, 2, 3, 1, 2, 3,
], ],
received_level_rewards2: [ received_level_rewards2: [
//等级解锁的奖励已领取等级列表(精英)
1, 2, 3, 4, 1, 2, 3, 4,
], ],
}, },

View File

@ -442,6 +442,18 @@ module.exports = {
this.getResponce(cb, this.urlbd); this.getResponce(cb, this.urlbd);
}, },
getUserMainInfo(cb){
this.urlbd.clear();
this.urlbd
.addKV('c', 'User')
.addKV('a', 'Info')
.addKV('account_id', this.account_id)
.addKV('session_id', this.session_id)
.addKV('target_id', this.account_id);
this.getResponce(cb, this.urlbd);
},
missionList(type, cb) { missionList(type, cb) {
this.urlbd.clear(); this.urlbd.clear();
this.urlbd this.urlbd

View File

@ -32,7 +32,6 @@ export class InviteTip extends UIBase {
cc.Notifier.emit('joinTeamRoom', '' + this.m_roomID); cc.Notifier.emit('joinTeamRoom', '' + this.m_roomID);
} }
this.node.destroy(); this.node.destroy();
// 加入队伍
} }
onClose() { onClose() {