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()){
|
if(2 == sGlobalSystemConfig.getType()){
|
||||||
long cacheOpenTime = GameApplication.serverConfig.getCacheOpenTime();
|
long cacheOpenTime = GameApplication.serverConfig.getCacheOpenTime();
|
||||||
sGlobalSystemConfig.setSeasonOpenLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonOpen()));
|
sGlobalSystemConfig.setSeasonOpenLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonOpen())*1000);
|
||||||
sGlobalSystemConfig.setSeasonEndLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonEnd()));
|
sGlobalSystemConfig.setSeasonEndLong(cacheOpenTime +Integer.parseInt(sGlobalSystemConfig.getSeasonEnd())*1000);
|
||||||
}else{
|
}else{
|
||||||
sGlobalSystemConfig.setSeasonOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonOpen(), TimeUtils.Stand_CeHua_Data_format));
|
sGlobalSystemConfig.setSeasonOpenLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonOpen(), TimeUtils.Stand_CeHua_Data_format));
|
||||||
sGlobalSystemConfig.setSeasonEndLong(TimeUtils.parseTimeToMiles(sGlobalSystemConfig.getSeasonEnd(), 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();
|
int teamId = mapManager.getTeamId();
|
||||||
List<TeamPosHeroInfo> team = user.getTeamPosManager().getTeamPosForHero().get(teamId);
|
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){
|
if(SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId()).getType()==4&&teamId==401){
|
||||||
mapManager.updateEndlessFightCount(mapManager.getEndlessMapInfo().getFightCount()+1);
|
mapManager.updateEndlessFightCount(mapManager.getEndlessMapInfo().getFightCount()+1);
|
||||||
|
Set<String> cacheRemove = new HashSet<>();
|
||||||
for (int i = 0 ; i <team.size();i++) {
|
for (int i = 0 ; i <team.size();i++) {
|
||||||
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
Hero hero = user.getHeroManager().getHero(team.get(i).getHeroId());
|
||||||
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
Map<Integer, Integer> heroAllAttribute = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero,false,teamId);
|
||||||
int per =(int) (checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
int per =(int) (checkResult[i+2] / (double) heroAllAttribute.get(HeroAttributeEnum.Hp.getPropertyId())*10000);
|
||||||
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
mapManager.updateEndlessHeroHp(team.get(i).getHeroId(),per);
|
||||||
Map<Integer, Integer> currAttrMap = mapManager.getHeroAllAttributeMap().get(hero.getId());
|
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
||||||
if(currAttrMap==null){
|
if(per<=0){
|
||||||
continue;
|
cacheRemove.add(hero.getId());
|
||||||
}
|
}
|
||||||
if(currAttrMap.get(HeroAttributeEnum.CurHP.getPropertyId())==0){
|
}
|
||||||
mapManager.removeOneHeroAttribute(hero.getId());
|
if(!cacheRemove.isEmpty()){
|
||||||
}else{
|
Iterator<TeamPosHeroInfo> iterator = team.iterator();
|
||||||
mapManager.updateHeroOneAttribute(team.get(i).getHeroId(), HeroAttributeEnum.CurHP.getPropertyId(), checkResult[i+2]);
|
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);
|
CommonProto.Drop.Builder drop = ItemUtil.drop(user, sMonsterGroup.getRewardgroup(), 1, 1, BIReason.MAP_GENERAL_FIGHT_REWARD);
|
||||||
|
|
Loading…
Reference in New Issue