From edd7dad1d2068e193c15c9144161b4dfa5ea591d Mon Sep 17 00:00:00 2001 From: Kokomi <592981798@qq.com> Date: Sun, 24 Apr 2022 10:48:51 +0800 Subject: [PATCH] =?UTF-8?q?#=E8=A7=92=E8=89=B2=E8=AF=A6=E6=83=85=20?= =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E5=B1=95=E7=A4=BA=E6=9A=82=E6=97=B6=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/character.js | 7 +++++-- components/Calc.js | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/character.js b/apps/character.js index 918efffc..ef2d8614 100644 --- a/apps/character.js +++ b/apps/character.js @@ -585,6 +585,9 @@ export async function renderProfile(e, char, render) { let avatar = await getAvatar(e, char, MysApi); let talent = await getTalent(e, avatar); + if(!talent.id){ + return true; + } let posIdx = { "生之花": { @@ -636,8 +639,8 @@ export async function renderProfile(e, char, render) { let dmgCalc = await Calc.calcData(profile, char, avatar, talent); if (dmgCalc && dmgCalc.ret) { lodash.forEach(dmgCalc.ret, (ds) => { - ds.dmg = Format.comma(ds.dmg, 1); - ds.avg = Format.comma(ds.avg, 1); + ds.dmg = Format.comma(ds.dmg, 0); + ds.avg = Format.comma(ds.avg, 0); dmgData.push(ds); }) dmgMsg = dmgCalc.msg; diff --git a/components/Calc.js b/components/Calc.js index 777cd6ee..3e2a5906 100644 --- a/components/Calc.js +++ b/components/Calc.js @@ -321,7 +321,7 @@ let Calc = { 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; };