TASK【ID1008168】【大闹天宫】招募神将的等级,跟文档描述的不一样
parent
8253bdcc6a
commit
5043f26ac6
|
@ -86,7 +86,7 @@ public class ReliveExpeditionHeroRequest extends BaseHandler<Expedition.ReliveEx
|
|||
|
||||
//更新节点
|
||||
Expedition.ExpeditionNodeInfoIndication.Builder builder = Expedition.ExpeditionNodeInfoIndication.newBuilder();
|
||||
builder.addAllHeroInfo(ExpeditionLogic.getInstance().getAllHeroInfo(user,ids));
|
||||
builder.addAllHeroInfo(ExpeditionLogic.getInstance().getAllHeroInfo(user,new HashSet<>()));
|
||||
MessageUtil.sendIndicationMessage(iSession, 1, MessageTypeProto.MessageType.EXPEDITION_NOINFO_INDICATION_VALUE, builder.build(), true);
|
||||
|
||||
} else {
|
||||
|
|
|
@ -60,12 +60,28 @@ public class Hero extends MongoBase {
|
|||
this.id = KeyGenUtils.produceIdByModule(UUIDEnum.HERO, uid);
|
||||
this.templateId = heroTid;
|
||||
this.level = initStar;
|
||||
int[] heroStar = SItem.getsItemMap().get(heroTid).getHeroStar();
|
||||
this.star =heroStar[1] ;
|
||||
SCHero hero1 = SCHero.getsCHero().get(heroTid);
|
||||
int initCfgStar = hero1.getStar();
|
||||
int maxStar = hero1.getMaxRank();
|
||||
if(hero.getStar()<initCfgStar){
|
||||
this.star =initCfgStar;
|
||||
}else if(hero.getStar()>maxStar){
|
||||
this.star=maxStar;
|
||||
}else {
|
||||
this.star = hero.getStar();
|
||||
}
|
||||
|
||||
if(initCfgStar!=hero.getStar()){
|
||||
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = STableManager.getFigureConfig(HeroStaticConfig.class).getScHeroRankUpConfigByShow(GlobalsDef.UP_STAR_TYPE,initCfgStar);
|
||||
if(scHeroRankUpConfigByType!=null) {
|
||||
SCHeroRankUpConfig scHeroRankUpConfig = scHeroRankUpConfigByType.get(hero.getStar()-1);
|
||||
starBreakId = scHeroRankUpConfig.getId();
|
||||
}
|
||||
}
|
||||
|
||||
this.equipByPositionMap = new HashMap<>();
|
||||
this.soulEquipByPositionMap = hero.soulEquipByPositionMap;
|
||||
this.breakId = hero.breakId;
|
||||
this.starBreakId = hero.starBreakId;
|
||||
this.createTime = (int)(System.currentTimeMillis()/1000);
|
||||
this.speed = hero.speed;
|
||||
this.especialEquipLevel = hero.especialEquipLevel;
|
||||
|
|
|
@ -919,9 +919,30 @@ public class ExpeditionLogic {
|
|||
|
||||
//random ids
|
||||
TreeSet<Integer> tempid = new TreeSet<>();
|
||||
Set<Integer> tempType = new HashSet<>();
|
||||
int i=0;
|
||||
while (tempid.size()<size){
|
||||
if(i>1000){
|
||||
LOGGER.error("getRandomTidException:条件不匹配");
|
||||
break;
|
||||
}
|
||||
int i1 = ranndomFromWeight(cfg);
|
||||
SExpeditionRecruitConfig sExpeditionRecruitConfig = STableManager.getConfig(SExpeditionRecruitConfig.class).get(i1);
|
||||
SCHero hero1 = SCHero.getsCHero().get(sExpeditionRecruitConfig.getHeroId());
|
||||
i++;
|
||||
if(hero1==null){
|
||||
LOGGER.error("英雄配置不存在"+i1);
|
||||
continue;
|
||||
}
|
||||
int propertyName = hero1.getPropertyName();
|
||||
if(tempType.contains(propertyName)){
|
||||
continue;
|
||||
}
|
||||
|
||||
tempid.add(i1);
|
||||
tempType.add(propertyName);
|
||||
i++;
|
||||
|
||||
}
|
||||
return tempid;
|
||||
|
||||
|
|
Loading…
Reference in New Issue