挂机收益道具逻辑修改

back_recharge
yuanshuai 2021-12-16 11:14:48 +08:00
parent db39942231
commit 93993d8150
1 changed files with 5 additions and 8 deletions

View File

@ -106,15 +106,12 @@ public class UseAndPriceItemHandler extends BaseHandler<PlayerInfoProto.UseAndPr
ItemMap itemObj=new ItemMap(); ItemMap itemObj=new ItemMap();
int fightId = user.getMainLevelManager().getFightId(); int fightId = user.getMainLevelManager().getFightId();
SMainLevelConfig targetMainLevelConfig = SMainLevelConfig.config.get(fightId); SMainLevelConfig targetMainLevelConfig = SMainLevelConfig.config.get(fightId);
int[] randomRewardMin = targetMainLevelConfig.getRandomRewardMin(); int[] randomRewardMin = targetMainLevelConfig.getRandomRewardMin();
for (int dropGroupId : randomRewardMin) { int[] randomReward = targetMainLevelConfig.getRandomReward();
SRewardGroup sRewardGroup = SRewardGroup.getsRewardItemMap().get(dropGroupId);
if (sRewardGroup == null) { ItemUtil.combineRewardByMainLine(user,false, true, randomRewardMin, dropRatio,itemObj,BIReason.ADVENTURE_BASE_REWARD);
continue; ItemUtil.combineRewardByMainLine(user,true, false,randomReward, dropRatio,itemObj,BIReason.ADVENTURE_RANDOM_REWARDD);
}
ItemUtil.selectDrop(user, sRewardGroup, itemObj, dropRatio);
}
ItemUtil.extraAddItem(user,itemObj.getItemMap(), BIReason.ADVENTURE_BASE_REWARD);
if (itemObj.getItemMap().containsKey(itemId)){ if (itemObj.getItemMap().containsKey(itemId)){
dropArr[index][0]=itemId; dropArr[index][0]=itemId;
dropArr[index][1]=itemObj.getItemMap().get(itemId)*useNum; dropArr[index][1]=itemObj.getItemMap().get(itemId)*useNum;