大闹天宫等级浮动加上配置上限
parent
bc08a7f1e5
commit
c5e88c9d73
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue