feat(玉石一键合成): 修复5品无法升6品

This commit is contained in:
zhangxk
2023-07-14 16:13:33 +08:00
committed by luying
parent 6c73466071
commit 848a33f377

View File

@@ -234,7 +234,7 @@ export async function getCurItem(roleId: string, itId: number) {
let stoneItId = gameData.stoneItId.get(itId);
let goodIds = [];
for (const { good_id, lv } of stoneItId) {
if (lv >= ITID_STONE_LIMIT) continue;
if (lv > ITID_STONE_LIMIT) continue;
let nextLvMaterial = await getComposeStoneNeedCost(good_id);
if (!nextLvMaterial) continue;
for (let material of nextLvMaterial) {
@@ -305,7 +305,14 @@ export async function getComposeStoneCostAndAdd(curItem, itId) {
nextLvCount = Math.min(nextLvCount, Math.floor((tempCount1 + tempCount2) / material.count));
}
if (nextLvCount == 0) continue;// 不能升品
if (nextLvCount == 0) {
// console.log('---------------- curItem', curItem);
// console.log('---------------- indexLv', indexLv);
// console.log('---------------- nextLvCount', nextLvCount);
// console.log('---------------- allCostItem', allCostItem);
// console.log('---------------- allAddItem', allAddItem);
continue;// 不能升品
}
// 消耗
for (let material of nextLvMaterial) {