feat(抽卡): 宝物抽卡逻辑

This commit is contained in:
luying
2023-09-20 15:16:47 +08:00
parent 2dd4f15f9a
commit 32d5d23025
4 changed files with 17 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ class PlayerGachaRecord {
let userHope = this.hope.find(cur => cur.hid == hid);
if(userHope && !userHope.hasGet) userHope.hasGet = true;
}
public getUserGachaParam() {
return { hope: this.hope, floor: this.floor }
}
@@ -464,7 +464,7 @@ export class GachaPull {
// 心愿单
private processHope() {
if(this.gachaType != GACHA_TYPE.NORMAL) return;
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; // 只有橙将
let { dic: { id: randHopePosition } } = getRandEelmWithWeight(gameData.gachaHope);