fix(宝物抽卡): 心愿单错误

This commit is contained in:
luying
2023-10-10 20:47:10 +08:00
parent 63008ffee6
commit c23dc63bd5

View File

@@ -470,7 +470,8 @@ export class GachaPull {
private processHope() {
if(this.gachaType != GACHA_TYPE.NORMAL && this.gachaType != GACHA_TYPE.ARTIFACT) return;
for(let gachaResult of this.result.list) {
if(gachaResult.heroQuality != HERO_QUALITY_TYPE.GOLD) continue; // 只有橙将
if(this.gachaType == GACHA_TYPE.NORMAL && gachaResult.heroQuality != HERO_QUALITY_TYPE.GOLD) continue; // 只有橙将
if(this.gachaType == GACHA_TYPE.ARTIFACT && gachaResult.heroQuality != HERO_QUALITY_TYPE.UR) continue; // 只有橙将
let { dic: { id: randHopePosition } } = getRandEelmWithWeight(gameData.gachaHope);
if(randHopePosition > 0) { // 按玩家设置的心愿单塞
let hopeHero = this.player.getHopeHero(randHopePosition)