装备:合成消耗

This commit is contained in:
luying
2021-08-05 14:56:03 +08:00
parent 7a46bc3dec
commit da2a690c82
2 changed files with 3 additions and 1 deletions

View File

@@ -51,10 +51,11 @@ export function checkMaterialEnough(consumes: Array<{ id: number, count: number
} else {
if(consumeCount < count * targetCount) {
comJewelMap.set(id, 0);
needConsumes.push({ id, count: consumeCount });
isEnough = checkCurMeterial(id, count * targetCount - consumeCount);
} else {
comJewelMap.set(id, consumeCount - count * targetCount);
needConsumes.push({ id, count: consumeCount - count * targetCount });
needConsumes.push({ id, count: count * targetCount });
}
}

View File

@@ -195,6 +195,7 @@ function sortItems(goods: ItemInter[], handleType: HANDLE_REWARD_TYPE) {
let figures: number[] = [];
for(let good of goods) {
if(good.count == 0) continue;
let dicGood = gameData.goods.get(good.id);
if(!dicGood) {
errlogger.error(`物品 ${good.id} 未配置`);