修改抽卡逻辑
parent
50824acdd9
commit
1b2e00e478
|
|
@ -552,20 +552,14 @@ public class HeroLogic{
|
|||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
sLotteryRewardConfig = randomHeroByPoolId(onConfig.getpool_id(), 1, user.getPlayerInfoManager().getLevel());
|
||||
if(mustSet.size() > 1){
|
||||
//如果同时触发多个 把所有的计数清零
|
||||
for(int mustId:mustSet){
|
||||
randomPoolByType.get(mergePool).put(mustId,0);
|
||||
|
||||
for (int key : randomPoolByType.get(mergePool).keySet()) {
|
||||
if(maxId >= key){
|
||||
randomPoolByType.get(mergePool).put(key, 0);
|
||||
}else{
|
||||
int curValue = randomPoolByType.get(mergePool).getOrDefault(key, 0);
|
||||
randomPoolByType.get(mergePool).put(key, curValue + 1);
|
||||
}
|
||||
}else{
|
||||
//如果只触发一个,仍把其他的计数加1
|
||||
for (int key : randomPoolByType.get(mergePool).keySet()) {
|
||||
if(maxId != key){
|
||||
int curValue = randomPoolByType.get(mergePool).getOrDefault(key, 0);
|
||||
randomPoolByType.get(mergePool).put(key, curValue + 1);
|
||||
}
|
||||
}
|
||||
randomPoolByType.get(mergePool).put(maxId,0);
|
||||
}
|
||||
}
|
||||
heroManager.updateRandomPoolByType(mergePool,randomPoolByType.get(mergePool));
|
||||
|
|
|
|||
Loading…
Reference in New Issue