招募:引导特殊招募功能
This commit is contained in:
@@ -309,6 +309,29 @@ export class GachaPull {
|
||||
return { items, heroInfo, resultList, activityData }
|
||||
}
|
||||
|
||||
public pullBySimpleResult(simpleResult: {contentId: number, hid: number}[]) {
|
||||
let items: RewardInter[] = [], heroInfo: CreateHeroParam[] = [], resultList: GachaResult[] = [];
|
||||
let activityData = [];//活动需要统计抽中的英雄、碎片品质
|
||||
|
||||
for (let { contentId, hid } of simpleResult) {
|
||||
let result = new GachaResult(contentId);
|
||||
result.setHero(hid);
|
||||
|
||||
let hasHero = this.userHeroes.find(cur => cur.hid == hid);
|
||||
if (hasHero) { // 已有转换为碎片
|
||||
activityData.push({ hid, quality: hasHero.quality });
|
||||
let { pieceId, count } = transPiece(hid);
|
||||
result.transferToPiece(pieceId, count);
|
||||
items.push({ id: pieceId, count });
|
||||
} else {
|
||||
heroInfo.push({ hid, count: 1 })//默认1个英雄
|
||||
}
|
||||
resultList.push(result);
|
||||
}
|
||||
|
||||
return { items, heroInfo, resultList, activityData }
|
||||
}
|
||||
|
||||
private getPurpleFloor(count: number, index: number, contentId: number, resultList: GachaResult[]) {
|
||||
if (this.gachaType == GACHA_ID.NORMAL && count == 10 && index == count - 1) { // 10连到最后一抽
|
||||
let { type, param } = gameData.gachaContent.get(contentId);
|
||||
|
||||
Reference in New Issue
Block a user