抽卡:添加抽卡接口

This commit is contained in:
luying
2021-04-23 15:46:04 +08:00
parent 1f6839cafb
commit beadccf778
23 changed files with 591 additions and 85 deletions

View File

@@ -432,7 +432,8 @@ export function randEquipPrintId(warInfo) {
if (!warInfo || !warInfo['jackpotReward']) {
return null;
}
const result = getRandomWithWeight(decodeStr('possibility', warInfo['jackpotReward']));
let jackpotReward: { id: number, weight: number}[] = decodeStr('possibility', warInfo['jackpotReward']);
const result = getRandomWithWeight(jackpotReward);
if (!result || !result.dic || !result.dic.id) {
return null;
}