Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
a3b84a9b2d
|
@ -58,8 +58,8 @@ public class SGlobalSystemConfig implements BaseConfig {
|
|||
}
|
||||
if(2 == sGlobalSystemConfig.getType()){
|
||||
long cacheOpenTime = GameApplication.serverConfig.getCacheOpenTime();
|
||||
sGlobalSystemConfig.setSeasonOpenLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonOpen()));
|
||||
sGlobalSystemConfig.setSeasonEndLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonEnd()));
|
||||
sGlobalSystemConfig.setSeasonOpenLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonOpen())*1000);
|
||||
sGlobalSystemConfig.setSeasonEndLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonEnd())*1000);
|
||||
}else{
|
||||
sGlobalSystemConfig.setSeasonOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonOpen(), TimeUtils.Stand_CeHua_Data_format));
|
||||
sGlobalSystemConfig.setSeasonEndLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonEnd(), TimeUtils.Stand_CeHua_Data_format));
|
||||
|
|
|
@ -1540,28 +1540,32 @@ public class MapLogic {
|
|||
}
|
||||
int teamId = mapManager.getTeamId();
|
||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
||||
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
||||
Map<Integer, Integer> heroAttr = mapManager.getHeroAllAttributeMap().get(teamPosHeroInfo.getHeroId());
|
||||
if(heroAttr!=null) {
|
||||
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition() + 1]);
|
||||
}
|
||||
}
|
||||
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
||||
mapManager.updateEndlessFightCount(mapManager.getEndlessMapInfo().getFightCount()+1);
|
||||
Set<String> cacheRemove = new HashSet<>();
|
||||
for (int i = 0 ; i <team.size();i++) {
|
||||
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
||||
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
||||
int per =(int) (checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
||||
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
||||
Map<Integer, Integer> currAttrMap = mapManager.getHeroAllAttributeMap().get(hero.getId());
|
||||
if(currAttrMap==null){
|
||||
continue;
|
||||
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
||||
if(per<=0){
|
||||
cacheRemove.add(hero.getId());
|
||||
}
|
||||
if(currAttrMap.get(HeroAttributeEnum.CurHP.getPropertyId())==0){
|
||||
mapManager.removeOneHeroAttribute(hero.getId());
|
||||
}else{
|
||||
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
||||
}
|
||||
if(!cacheRemove.isEmpty()){
|
||||
Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
||||
while (iterator.hasNext()){
|
||||
TeamPosHeroInfo next = iterator.next();
|
||||
if(cacheRemove.contains(next.getHeroId())){
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
user.getTeamPosManager().updateTeamPosByTeamId(teamId,team);
|
||||
}
|
||||
}else{
|
||||
for (TeamPosHeroInfo teamPosHeroInfo : team) {
|
||||
mapManager.updateHeroOneAttribute(teamPosHeroInfo.getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[teamPosHeroInfo.getPosition()+1]);
|
||||
}
|
||||
}
|
||||
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sMonsterGroup.getRewardgroup(), 1, 1, BIReason.MAP_GENERAL_FIGHT_REWARD);
|
||||
|
|
Loading…
Reference in New Issue