挂机收益道具逻辑修改

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();
int fightId = user.getMainLevelManager().getFightId();
SMainLevelConfig targetMainLevelConfig = SMainLevelConfig.config.get(fightId);
int[] randomRewardMin = targetMainLevelConfig.getRandomRewardMin();
for (int dropGroupId : randomRewardMin) {
SRewardGroup sRewardGroup = SRewardGroup.getsRewardItemMap().get(dropGroupId);
if (sRewardGroup == null) {
continue;
}
ItemUtil.selectDrop(user, sRewardGroup, itemObj, dropRatio);
}
ItemUtil.extraAddItem(user,itemObj.getItemMap(), BIReason.ADVENTURE_BASE_REWARD);
int[] randomReward = targetMainLevelConfig.getRandomReward();
ItemUtil.combineRewardByMainLine(user,false, true, randomRewardMin, dropRatio,itemObj,BIReason.ADVENTURE_BASE_REWARD);
ItemUtil.combineRewardByMainLine(user,true, false,randomReward, dropRatio,itemObj,BIReason.ADVENTURE_RANDOM_REWARDD);
if (itemObj.getItemMap().containsKey(itemId)){
dropArr[index][0]=itemId;
dropArr[index][1]=itemObj.getItemMap().get(itemId)*useNum;