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 dmgMsg = [], dmgData = [];
|
||||||
let dmgCalc = await Calc.calcData(profile, char, avatar);
|
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, 1);
|
||||||
|
@ -91,11 +91,11 @@ let Calc = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 获取天赋数据
|
// 获取天赋数据
|
||||||
talent(profile, char) {
|
talent(talentData, char) {
|
||||||
let ret = {};
|
let ret = {};
|
||||||
|
|
||||||
lodash.forEach(['a', 'e', 'q'], (key) => {
|
lodash.forEach(['a', 'e', 'q'], (key) => {
|
||||||
let lv = profile.talent[key] * 1 || 1,
|
let lv = talentData[key].level_current * 1 || 1,
|
||||||
lvKey = `Lv${lv}`;
|
lvKey = `Lv${lv}`;
|
||||||
|
|
||||||
let map = {};
|
let map = {};
|
||||||
@ -236,7 +236,7 @@ let Calc = {
|
|||||||
})
|
})
|
||||||
return retBuffs;
|
return retBuffs;
|
||||||
},
|
},
|
||||||
async calcData(profile, char, avatar) {
|
async calcData(profile, char, avatar, talentData) {
|
||||||
let charCalcData = await Calc.getCharCalcRule(char.name);
|
let charCalcData = await Calc.getCharCalcRule(char.name);
|
||||||
|
|
||||||
//avatar.element;
|
//avatar.element;
|
||||||
@ -244,12 +244,11 @@ let Calc = {
|
|||||||
if (!charCalcData) {
|
if (!charCalcData) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let talent = Calc.talent(profile, char);
|
let talent = Calc.talent(talentData, char);
|
||||||
|
|
||||||
let meta = {
|
let meta = {
|
||||||
cons: profile.cons * 1,
|
cons: avatar.actived_constellation_num * 1,
|
||||||
...profile.talent,
|
talent
|
||||||
talent,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let { buffs, details, defParams } = charCalcData;
|
let { buffs, details, defParams } = charCalcData;
|
||||||
|
Loading…
Reference in New Issue
Block a user