装备:合成消耗
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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} 未配置`);
|
||||
|
||||
Reference in New Issue
Block a user