From cb009615a61ecc082fb7082436b05a529e56e654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=86=E8=8E=B9?= Date: Sat, 23 Sep 2023 12:59:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=A8=B7=E4=B8=8B=E5=AD=A6=E5=AE=AB):?= =?UTF-8?q?=E7=AD=94=E9=A2=98=E6=97=B6=E5=8F=AF=E8=83=BD=E6=B4=BB=E5=8A=A8?= =?UTF-8?q?id=E4=B8=BA0=E7=9A=84=E5=9C=A3=E7=89=A9=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/servers/battle/handler/rougeHandler.ts | 2 +- game-server/app/services/battle/rougeCollectService.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/game-server/app/servers/battle/handler/rougeHandler.ts b/game-server/app/servers/battle/handler/rougeHandler.ts index f26d89b79..9d1c5766d 100644 --- a/game-server/app/servers/battle/handler/rougeHandler.ts +++ b/game-server/app/servers/battle/handler/rougeHandler.ts @@ -770,7 +770,7 @@ export class RougeHandler { cardId = getRandEelmWithWeight(newCards).dic.cardId; } - handleAddFun.pushHolyCard(cardId); + if(cardId > 0) handleAddFun.pushHolyCard(cardId); } status = 1; diff --git a/game-server/app/services/battle/rougeCollectService.ts b/game-server/app/services/battle/rougeCollectService.ts index 12ba18580..40bd2264e 100644 --- a/game-server/app/services/battle/rougeCollectService.ts +++ b/game-server/app/services/battle/rougeCollectService.ts @@ -179,7 +179,7 @@ export function formateCharasOrCards(params: RougelikeCharaPara[] | RougelikeCar if (!params || params.length == 0) return result; const updateParams = params || []; if (type == ROUGE_LIKE_CARD_TYPE.CHARA) result.charas = updateParams.map(param => new CommonChara(param)); - else result.cards = updateParams.map(param => new CommonCard(param)); + else result.cards = updateParams.map(param => new CommonCard(param)).filter(cur => cur.cardId > 0); return result; }