From 97080e3da57823814fd94c0b087299b24c71707c Mon Sep 17 00:00:00 2001 From: "PC-202302260912\\Administrator" <1769111741@qq.com> Date: Tue, 4 Jul 2023 14:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 - .../com/ljsd/jieling/logic/hero/HeroLogic.java | 14 ++------------ 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 72a538423..f55d3353d 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,6 @@ gamecommon/src/main/java/rpc/protocols *.class out build -out tmp/ luafight/LogError/*.txt luafight/LogError/*.json diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index 584a93cae..9a1e6ad5e 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -439,7 +439,7 @@ public class HeroLogic { //记录卡池抽奖次数 heroManager.putRandomType(type, num + result[1]); - int[]rewardArr=new int[result.length]; + int[] rewardArr = new int[result.length]; System.arraycopy(result, 0, rewardArr, 0, result.length); return rewardArr; } @@ -924,16 +924,6 @@ public class HeroLogic { if (mustSet.isEmpty()) { int pooId = getPooId(sLotterySetting); sLotteryRewardConfig = randomHeroByPoolId(pooId, user); -// if(randomPoolByType.get(mergePool)!=null) { -// for (int key : randomPoolByType.get(mergePool).keySet()) { -// if (star == key) { -// randomPoolByType.get(mergePool).put(key, 0); -// } else { -// int curValue = randomPoolByType.get(mergePool).getOrDefault(key, 0); -// randomPoolByType.get(mergePool).put(key, curValue + 1); -// } -// } -// } if (sLotteryRewardConfig != null) { currStarId = sLotteryRewardConfig.getStar(); // LOGGER.info("随机到了{}-->对应star-->{}", sLotteryRewardConfig.getId(), currStarId); @@ -943,7 +933,7 @@ public class HeroLogic { //有必出时比较各个优先级,取优先级高的 int maxId = 0; for (int mustId : mustSet) { - maxId = mustId > maxId ? mustId : maxId; + maxId = Math.max(mustId, maxId); } // LOGGER.info("randomOne uid=>{} 触发必出=>{}", user.getId(), maxId); SLotterySpecialConfig onConfig = null;