✨ feat(诸子列传): 查询其他好友数据
This commit is contained in:
@@ -49,9 +49,7 @@ export class CheckMeterial {
|
||||
this.notEnoughItems.clear();
|
||||
let { items, gold, coin } = sortItems(goods, HANDLE_REWARD_TYPE.COST);
|
||||
for(let { id, count} of items) {
|
||||
console.log('#####', id, count)
|
||||
let notEnoughCount = await this.decreaseItem(id, count);
|
||||
console.log('##### notEnoughCount', id, notEnoughCount, this.canReplace)
|
||||
if(notEnoughCount > 0) {
|
||||
let isEnough = await this.checkReplaceItem(id, notEnoughCount);
|
||||
if(isEnough) {
|
||||
@@ -100,10 +98,8 @@ export class CheckMeterial {
|
||||
}
|
||||
|
||||
private async decreaseItem(id: number, count: number) {
|
||||
console.log('#### decreaseItem 1', id, count);
|
||||
if(!this.itemsIndb.has(id)) {
|
||||
let item = await ItemModel.findbyRoleAndGid(this.roleId, id);
|
||||
console.log('#### decreaseItem', item);
|
||||
if(!item) {
|
||||
this.pushToNotEnoughItems(id, count);
|
||||
return count;
|
||||
|
||||
Reference in New Issue
Block a user