抽卡:修改引导抽卡逻辑
This commit is contained in:
@@ -403,15 +403,16 @@ export class GachaHandler {
|
||||
const gachaId = GACHA_ID.NORMAL;
|
||||
|
||||
let userGacha = await UserGachaModel.findByRole(roleId, GACHA_ID.NORMAL);
|
||||
let { guideResultList, candidates = [] } = userGacha;
|
||||
let { guideResultList, candidates = [], guideCount } = userGacha;
|
||||
|
||||
let index = candidates.findIndex(cur => cur.id == id);
|
||||
if(index == -1) {
|
||||
candidates.push({
|
||||
id, list: guideResultList
|
||||
id, guideCount, list: guideResultList
|
||||
});
|
||||
} else {
|
||||
} else {
|
||||
candidates[index].list = guideResultList;
|
||||
candidates[index].guideCount = guideCount;
|
||||
}
|
||||
|
||||
userGacha = await UserGachaModel.updateInfo(roleId, gachaId, 0, { candidates })
|
||||
|
||||
Reference in New Issue
Block a user