宝石合成并穿戴
This commit is contained in:
@@ -207,4 +207,13 @@ function sortItems (goods: Array<ItemInter>, bags: Array<BagInter>, skins: Array
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export async function decreaseItems(roleId: string, sid: string, bags: Array<{id: number, count:number, ratio?: number}>) {
|
||||
let uids = [{uid: roleId, sid}];
|
||||
if(bags.length > 0) {
|
||||
let {hasError, result} = await ItemModel.decreaseItems(roleId, bags);
|
||||
if(hasError) return true;
|
||||
pinus.app.get('channelService').pushMessageByUids('onItemUpdate', resResult(STATUS.SUCCESS, {goods: result} ), uids);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user