竞速 记录异妖

back_recharge
jiahuiwen 2019-04-29 18:46:08 +08:00
parent 2d5fe1aa50
commit c0949548df
2 changed files with 17 additions and 0 deletions

View File

@ -11,6 +11,8 @@ public class CrossInfo {
private Set<Integer> heroIds = new HashSet<>(5);
private Set<Integer> pokemons = new HashSet<>(3);
private long sendRewardTime;
private int forces;
@ -40,6 +42,10 @@ public class CrossInfo {
return heroIds;
}
public Set<Integer> getPokemons() {
return pokemons;
}
public int getForces() {
return forces;
}

View File

@ -1278,6 +1278,7 @@ public class MapLogic {
crossInfo.setLeastTime(useTime);
List<TeamPosHeroInfo> teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(mapManager.getTeamId());
int heroForces = 0;
// 妖灵师
crossInfo.getHeroIds().clear();
for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) {
Hero hero = user.getHeroManager().getHero(teamPosHeroInfo.getHeroId());
@ -1287,6 +1288,16 @@ public class MapLogic {
heroForces += HeroLogic.getInstance().calHeoForce(user, hero);
crossInfo.getHeroIds().add(hero.getTemplateId());
}
// 异妖
crossInfo.getPokemons().clear();
List<TeamPosForPokenInfo> teamPosForPokenInfos = user.getTeamPosManager().getTeamPosForPoken().get(mapManager.getTeamId());
for (TeamPosForPokenInfo teamPosForPokenInfo : teamPosForPokenInfos) {
Pokemon pokemon = user.getPokemonManager().getPokemonMap().get(teamPosForPokenInfo.getPokenId());
if (pokemon == null) {
continue;
}
crossInfo.getPokemons().add(pokemon.getId());
}
crossInfo.setForces(heroForces);
SChallengeMapConfig sChallengeMapConfig = SChallengeMapConfig.integerSChallengeMapConfigMap.get(mapManager.getCurMapId());
if (sChallengeMapConfig.getIfRank() == 1) {