伤害计算优先使用本地定义的伤害计算 (#539)

伤害计算优先使用本地定义的伤害计算
This commit is contained in:
panganqi 2023-04-11 01:47:22 +08:00 committed by GitHub
parent cb1d2eb41d
commit 5b1b99a5aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}