🐞 fix(宝物抽卡): 修复心愿单走错的问题
This commit is contained in:
@@ -470,7 +470,10 @@ export class GachaPull {
|
|||||||
let { dic: { id: randHopePosition } } = getRandEelmWithWeight(gameData.gachaHope);
|
let { dic: { id: randHopePosition } } = getRandEelmWithWeight(gameData.gachaHope);
|
||||||
if(randHopePosition > 0) { // 按玩家设置的心愿单塞
|
if(randHopePosition > 0) { // 按玩家设置的心愿单塞
|
||||||
let hopeHero = this.player.getHopeHero(randHopePosition)
|
let hopeHero = this.player.getHopeHero(randHopePosition)
|
||||||
if(hopeHero > 0) gachaResult.setHero(hopeHero, 1);
|
if(hopeHero > 0) {
|
||||||
|
if (this.gachaType == GACHA_TYPE.NORMAL) gachaResult.setHero(hopeHero, 1);
|
||||||
|
if (this.gachaType == GACHA_TYPE.ARTIFACT) gachaResult.setItem(hopeHero, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.player.setUserHope(gachaResult.hid); // 设置心愿单中了没有
|
this.player.setUserHope(gachaResult.hid); // 设置心愿单中了没有
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user