From 144181f2e1c0bf9b74d830c9fe12b199d145d623 Mon Sep 17 00:00:00 2001 From: luying Date: Sun, 8 Oct 2023 19:38:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=AD=A6=E5=AE=AB):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=9B=BE=E9=89=B4=E7=BB=9F=E8=AE=A1=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/battle/rougeCollectService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game-server/app/services/battle/rougeCollectService.ts b/game-server/app/services/battle/rougeCollectService.ts index 40bd2264e..53a069c47 100644 --- a/game-server/app/services/battle/rougeCollectService.ts +++ b/game-server/app/services/battle/rougeCollectService.ts @@ -186,10 +186,10 @@ export function formateCharasOrCards(params: RougelikeCharaPara[] | RougelikeCar export async function addCollection(roleId: string, sid: string, gameCode: string, arr: { type: number, id: number, addNum?: number }[]) { let collections: { type: number, id: number, num: number }[] = [], passiveCnt = 0; for (let { type, id, addNum = 1 } of arr) { - if (type == COLLECTION_TYPE.PASSIVE_CARD_SUM) continue; + if (type == COLLECTION_TYPE.PASSIVE_CARD_SUM || id == 0) continue; let collection = await RougelikeCollectionModel.addRec(roleId, type, id, gameCode, addNum); if (!collection || collection.num > 1) continue; - if (collection.num == 1) passiveCnt++; + if (type == COLLECTION_TYPE.PASSIVE_CARD && collection.num == 1) passiveCnt++; collections.push({ type, id, num: collection.num }); } if (passiveCnt > 0) {