占星优化

back_recharge
zhangshanxue 2019-09-24 10:21:17 +08:00
parent 67590bf4dd
commit 001bc4bedc
1 changed files with 9 additions and 12 deletions

View File

@ -512,26 +512,18 @@ public class ItemLogic {
User user = UserManager.getUser(uid);
int currentPool = user.getEquipManager().getSoulEquipPool();
//跳卡池
SEquipTalismanaLottery lottery = SEquipTalismanaLottery.getsEquipTalismanaLotteryMap().get(currentPool);
if (null == lottery) {
throw new Exception("SEquipTalismanaLottery 配置不存在" + currentPool);
}
currentPool = MathUtils.randomFromWeight(lottery.getProbability());
//50cost
SEquipTalismanaLottery lotteryRepeat = SEquipTalismanaLottery.getsEquipTalismanaLotteryMap().get(currentPool);
if (null == lotteryRepeat) {
throw new Exception("SEquipTalismanaLottery 配置不存在" + currentPool);
}
int[][] tempCost = new int[1][];
if (time == 50) {
tempCost[0] = lotteryRepeat.getRepeatedlyCost();
tempCost[0] = lottery.getRepeatedlyCost();
}
//next cost and drop
Map<Integer, Integer> itemMap = new HashMap<>();
//cost and drop
Map<Integer, Integer> itemMap = new HashMap<>();
ArrayList<Integer> droplist = new ArrayList<>();
int realTime = 0;
int randTime = time == 1 ? 1 : 50;
@ -551,9 +543,14 @@ public class ItemLogic {
break;
}
}
droplist.add(MathUtils.randomFromWeight(lotteryIn.getDrop()));
currentPool = newPool;
newPool = MathUtils.randomFromWeight(lotteryIn.getProbability());
SEquipTalismanaLottery nextLotteryIn = SEquipTalismanaLottery.getsEquipTalismanaLotteryMap().get(currentPool);
if (null == nextLotteryIn) {
throw new Exception("SEquipTalismanaLottery 配置不存在" + currentPool);
}
droplist.add(MathUtils.randomFromWeight(nextLotteryIn.getDrop()));
realTime++;
}
if (time != 50) {