From 5b1b99a5aaecdad75a5fd9e98a9303032bbcebc6 Mon Sep 17 00:00:00 2001 From: panganqi Date: Tue, 11 Apr 2023 01:47:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E8=AE=A1=E7=AE=97=E4=BC=98?= =?UTF-8?q?=E5=85=88=E4=BD=BF=E7=94=A8=E6=9C=AC=E5=9C=B0=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E7=9A=84=E4=BC=A4=E5=AE=B3=E8=AE=A1=E7=AE=97=20(#539)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 伤害计算优先使用本地定义的伤害计算 --- models/ProfileDmg.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/models/ProfileDmg.js b/models/ProfileDmg.js index b4d1daba..9fb23a45 100644 --- a/models/ProfileDmg.js +++ b/models/ProfileDmg.js @@ -20,7 +20,11 @@ export default class ProfileDmg extends Base { static dmgRulePath (name) { const _path = process.cwd() - let path = `${_path}/plugins/miao-plugin/resources/meta/character/${name}/calc_auto.js` + let path = `${_path}/plugins/miao-plugin/resources/meta/character/${name}/calc_user.js` + if (fs.existsSync(path)) { + return path + } + path = `${_path}/plugins/miao-plugin/resources/meta/character/${name}/calc_auto.js` if (fs.existsSync(path) && Common.cfg('teamCalc')) { return path }