#角色详情 伤害展示暂时隐藏小数

This commit is contained in:
Kokomi 2022-04-24 10:48:51 +08:00
parent 1a4a45fc7c
commit edd7dad1d2
2 changed files with 6 additions and 3 deletions

View File

@ -585,6 +585,9 @@ export async function renderProfile(e, char, render) {
let avatar = await getAvatar(e, char, MysApi); let avatar = await getAvatar(e, char, MysApi);
let talent = await getTalent(e, avatar); let talent = await getTalent(e, avatar);
if(!talent.id){
return true;
}
let posIdx = { let posIdx = {
"生之花": { "生之花": {
@ -636,8 +639,8 @@ export async function renderProfile(e, char, render) {
let dmgCalc = await Calc.calcData(profile, char, avatar, talent); let dmgCalc = await Calc.calcData(profile, char, avatar, talent);
if (dmgCalc && dmgCalc.ret) { if (dmgCalc && dmgCalc.ret) {
lodash.forEach(dmgCalc.ret, (ds) => { lodash.forEach(dmgCalc.ret, (ds) => {
ds.dmg = Format.comma(ds.dmg, 1); ds.dmg = Format.comma(ds.dmg, 0);
ds.avg = Format.comma(ds.avg, 1); ds.avg = Format.comma(ds.avg, 0);
dmgData.push(ds); dmgData.push(ds);
}) })
dmgMsg = dmgCalc.msg; dmgMsg = dmgCalc.msg;

View File

@ -321,7 +321,7 @@ let Calc = {
avg: atkNum * pctNum * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum avg: atkNum * pctNum * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum
} }
console.log(attr, {atkNum, pctNum, dmgNum, cpctNum, cdmgNum, defNum}, ret) //console.log(attr, {atkNum, pctNum, dmgNum, cpctNum, cdmgNum, defNum}, ret)
return ret; return ret;
}; };