mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正#角色面板 中伤害计算的bug
This commit is contained in:
parent
dd3a3074e5
commit
ef4f899f6e
@ -633,7 +633,7 @@ export async function renderProfile(e, char, render) {
|
||||
});
|
||||
|
||||
let dmgMsg = [], dmgData = [];
|
||||
let dmgCalc = await Calc.calcData(profile, char, avatar);
|
||||
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);
|
||||
|
@ -91,11 +91,11 @@ let Calc = {
|
||||
},
|
||||
|
||||
// 获取天赋数据
|
||||
talent(profile, char) {
|
||||
talent(talentData, char) {
|
||||
let ret = {};
|
||||
|
||||
lodash.forEach(['a', 'e', 'q'], (key) => {
|
||||
let lv = profile.talent[key] * 1 || 1,
|
||||
let lv = talentData[key].level_current * 1 || 1,
|
||||
lvKey = `Lv${lv}`;
|
||||
|
||||
let map = {};
|
||||
@ -236,7 +236,7 @@ let Calc = {
|
||||
})
|
||||
return retBuffs;
|
||||
},
|
||||
async calcData(profile, char, avatar) {
|
||||
async calcData(profile, char, avatar, talentData) {
|
||||
let charCalcData = await Calc.getCharCalcRule(char.name);
|
||||
|
||||
//avatar.element;
|
||||
@ -244,12 +244,11 @@ let Calc = {
|
||||
if (!charCalcData) {
|
||||
return false;
|
||||
}
|
||||
let talent = Calc.talent(profile, char);
|
||||
let talent = Calc.talent(talentData, char);
|
||||
|
||||
let meta = {
|
||||
cons: profile.cons * 1,
|
||||
...profile.talent,
|
||||
talent,
|
||||
cons: avatar.actived_constellation_num * 1,
|
||||
talent
|
||||
}
|
||||
|
||||
let { buffs, details, defParams } = charCalcData;
|
||||
|
Loading…
Reference in New Issue
Block a user