From f5ea9a3b8ce1fcc6d72c5e32aba4a32291a10bc2 Mon Sep 17 00:00:00 2001 From: yuanshuai <243578945@qq.com> Date: Thu, 13 Jan 2022 15:12:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A9=E5=9C=B0=E6=B4=AA=E7=82=89=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=8A=BD=E5=A5=96=E8=84=9A=E6=9C=AC=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ljsd/jieling/logic/hero/HeroLogic.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) 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 e9deb07a7..88d55ddb0 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 @@ -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 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 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();