From 48072dbd281b7d0f6ed7185662aa47ca74aa53cb Mon Sep 17 00:00:00 2001 From: luying Date: Wed, 20 Oct 2021 17:02:34 +0800 Subject: [PATCH] =?UTF-8?q?jenkins:=20=E6=8A=BD=E5=8D=A1=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game-server/app/services/activity/gachaService.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/game-server/app/services/activity/gachaService.ts b/game-server/app/services/activity/gachaService.ts index c9661d70d..57b30a439 100644 --- a/game-server/app/services/activity/gachaService.ts +++ b/game-server/app/services/activity/gachaService.ts @@ -228,6 +228,11 @@ export class GachaPull { } else if (type == GACHA_CONTENT_TYPE.SUIT_PAPER) { pool = getSuitPaper(this.lv); } + + if(pool.length <= 0) { + if(contentId <= 0) return false + return this.getResultFromContentId(contentId - 1, goodId); + } let item = getRandEelm(pool); let result = new GachaResult(contentId); result.setItem(item[0], count); @@ -284,7 +289,7 @@ export class GachaPull { let { id: contentId, goodId } = this.getFloorResult(dic); // 根据保底替换 contentId = this.getPurpleFloor(count, i, contentId, resultList); let result = this.getResultFromContentId(contentId, goodId); - + if(!result) continue; if (result.hid > 0) { let hasHero = this.userHeroes.find(cur => cur.hid == result.hid); if (hasHero) { // 已有转换为碎片