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": {
"__type__": "cc.Vec3",
"x": 0.26425451014034457,
"y": 0.26425451014034457,
"x": 0.5993534574534599,
"y": 0.5993534574534599,
"z": 1
},
"_quat": {
@ -13797,7 +13797,7 @@
"__id__": 411
}
],
"_active": true,
"_active": false,
"_level": 2,
"_components": [
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -442,6 +442,18 @@ module.exports = {
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) {
this.urlbd.clear();
this.urlbd

View File

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