天地洪炉脚本抽奖脚本完善
parent
144ea73fa0
commit
f5ea9a3b8c
|
|
@ -481,22 +481,20 @@ public class HeroLogic {
|
|||
|
||||
int index = list.indexOf(sLotteryRewardConfig);
|
||||
///保底奖励替换逻辑(偶数为保底卡池)
|
||||
if (sLotteryRewardConfig.getPool()%2==0) {
|
||||
index=index%count;
|
||||
if (sLotteryRewardConfig.getPool() % 2 == 0) {
|
||||
index = index % count;
|
||||
}
|
||||
///天地洪炉默认没选择up道具特殊处理(奇数为普通卡池)
|
||||
if (user.getHeroManager().getTrumpSelectItemMap().size() == 0 && sLotteryRewardConfig.getPool() % 2 == 1) {
|
||||
HashMap<Integer, Integer> map = new HashMap<>();
|
||||
for (int i = 0; i < count; i++) {
|
||||
map.put(i + 1, list.get(i).getReward()[0]);
|
||||
}
|
||||
user.getHeroManager().setTrumpSelectItemMap(map);
|
||||
}
|
||||
if (index >= count) {
|
||||
return sLotteryRewardConfig.getReward();
|
||||
}
|
||||
///天地洪炉默认没选择up道具特殊处理(奇数为普通卡池)
|
||||
if (sLotteryRewardConfig.getPool()%2==1) {
|
||||
if (user.getHeroManager().getTrumpSelectItemMap().size()==0){
|
||||
HashMap<Integer, Integer> map = new HashMap<>();
|
||||
for (int i = 0; i < count; i++) {
|
||||
map.put(i+1,list.get(i).getReward()[0]);
|
||||
}
|
||||
user.getHeroManager().setTrumpSelectItemMap(map);
|
||||
}
|
||||
}
|
||||
|
||||
if (!user.getHeroManager().getTrumpSelectItemMap().containsKey(index + 1)) {
|
||||
return sLotteryRewardConfig.getReward();
|
||||
|
|
|
|||
Loading…
Reference in New Issue