大闹天宫等级浮动加上配置上限

back_recharge
zhangshanxue 2020-06-19 02:10:12 +08:00
parent bc08a7f1e5
commit c5e88c9d73
1 changed files with 11 additions and 2 deletions

View File

@ -830,12 +830,21 @@ public class ExpeditionLogic {
throw new ErrorCodeException(ErrorCode.CFG_NULL);
}
//random star
int min = sExpeditionSetting.getMatchForceRange()[0];
int max= sExpeditionSetting.getMatchForceRange()[1];
int min = sExpeditionSetting.getLevelForce()[0];
int max= sExpeditionSetting.getLevelForce()[1];
int finalstar = (int) (star * ((min / 10000f) + ((float) (Math.random() *(max - min))/10000f)));
if(finalstar<=20){
finalstar=50;
}
SCHero hero1 = SCHero.getsCHero().get(tempid);
if (null != hero1) {
SCHeroRankUpConfig scHeroRankUpConfig = STableManager.getConfig(SCHeroRankUpConfig.class).get(hero1.getStar());
if(null !=scHeroRankUpConfig&&finalstar>scHeroRankUpConfig.getOpenLevel()){
finalstar=scHeroRankUpConfig.getOpenLevel();
}
}
//random tempid
Hero newHero = new Hero(uid,tempid,finalstar,hero);