装备:消耗修复
This commit is contained in:
@@ -96,6 +96,7 @@ export class CheckMeterial {
|
|||||||
this.pushToNotEnoughItems(this.goldId, goldCost - this.itemsIndb.get(this.goldId));
|
this.pushToNotEnoughItems(this.goldId, goldCost - this.itemsIndb.get(this.goldId));
|
||||||
isEnough = false;
|
isEnough = false;
|
||||||
}
|
}
|
||||||
|
this.itemsIndb.set(this.goldId, this.itemsIndb.get(this.goldId) - goldCost);
|
||||||
}
|
}
|
||||||
if(isEnough && coin.length > 0) {
|
if(isEnough && coin.length > 0) {
|
||||||
if(!this.itemsIndb.has(this.coinId)) {
|
if(!this.itemsIndb.has(this.coinId)) {
|
||||||
@@ -108,6 +109,7 @@ export class CheckMeterial {
|
|||||||
this.pushToNotEnoughItems(this.coinId, coinCost - this.itemsIndb.get(this.coinId));
|
this.pushToNotEnoughItems(this.coinId, coinCost - this.itemsIndb.get(this.coinId));
|
||||||
isEnough = false;
|
isEnough = false;
|
||||||
}
|
}
|
||||||
|
this.itemsIndb.set(this.coinId, this.itemsIndb.get(this.coinId) - coinCost);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isEnough) this.consumes.push(...goods);
|
if(isEnough) this.consumes.push(...goods);
|
||||||
|
|||||||
Reference in New Issue
Block a user