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) { // 已有转换为碎片