装备:合成消耗
This commit is contained in:
@@ -51,10 +51,11 @@ export function checkMaterialEnough(consumes: Array<{ id: number, count: number
|
|||||||
} else {
|
} else {
|
||||||
if(consumeCount < count * targetCount) {
|
if(consumeCount < count * targetCount) {
|
||||||
comJewelMap.set(id, 0);
|
comJewelMap.set(id, 0);
|
||||||
|
needConsumes.push({ id, count: consumeCount });
|
||||||
isEnough = checkCurMeterial(id, count * targetCount - consumeCount);
|
isEnough = checkCurMeterial(id, count * targetCount - consumeCount);
|
||||||
} else {
|
} else {
|
||||||
comJewelMap.set(id, consumeCount - count * targetCount);
|
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[] = [];
|
let figures: number[] = [];
|
||||||
|
|
||||||
for(let good of goods) {
|
for(let good of goods) {
|
||||||
|
if(good.count == 0) continue;
|
||||||
let dicGood = gameData.goods.get(good.id);
|
let dicGood = gameData.goods.get(good.id);
|
||||||
if(!dicGood) {
|
if(!dicGood) {
|
||||||
errlogger.error(`物品 ${good.id} 未配置`);
|
errlogger.error(`物品 ${good.id} 未配置`);
|
||||||
|
|||||||
Reference in New Issue
Block a user