装备:一键装备顺序

This commit is contained in:
luying
2021-08-03 14:26:27 +08:00
parent ac2c18dff8
commit 3fb0e80272
4 changed files with 24 additions and 17 deletions
+11 -1
View File
@@ -261,6 +261,16 @@ export function checkRefineReachNextLv(oldRefineLv: number, refineLv: number) {
let dic = gameData.refine.get(refineLv);
if(!oldDic || !dic) return true;
console.log('*******', dic.level, oldDic.level)
return dic.level > oldDic.level;
}
export function calEquipCe(goodsAbility: Map<number, number>, randMain: RandMain[]) {
let ce = 0;
for(let [ id, ratio ] of gameData.equipAttributeRatio) {
let valueBase = goodsAbility.get(id);
let curRand = randMain.find(cur => cur.id == id);
let valueRand = curRand?curRand.rand: 0;
ce += Math.floor(valueBase * valueRand * ratio / 100);
}
return ce
}