默认值修改

lvxinran 2020-12-23 01:16:14 +08:00
parent cda3ad53a7
commit b99117fe0b
1 changed files with 5 additions and 7 deletions

View File

@ -123,19 +123,17 @@ public class BloodLogic {
.build(); .build();
heroDefendFightInfos.add(heroFightInfo); heroDefendFightInfos.add(heroFightInfo);
} }
List<CommonProto.FightUnitInfo> pokemonSkills = null; List<CommonProto.FightUnitInfo> pokemonSkills = new ArrayList<>();
User user = UserManager.getUser(uid, true); User user = UserManager.getUser(uid, true);
if(user!=null&&!user.getPokemonManager().getPokemonTeamMap().isEmpty()){ if(user!=null&&!user.getPokemonManager().getPokemonTeamMap().isEmpty()){
pokemonSkills = HeroLogic.getInstance().getPokemonSkills(UserManager.getUser(uid)); pokemonSkills = HeroLogic.getInstance().getPokemonSkills(UserManager.getUser(uid));
} }
CommonProto.FightTeamInfo.Builder builder = CommonProto.FightTeamInfo. return CommonProto.FightTeamInfo.
newBuilder() newBuilder()
.addAllFightUnitList(heroDefendFightInfos) .addAllFightUnitList(heroDefendFightInfos)
.setTeamPassiveList(passiveSkill); .addAllPokemonUnitList(pokemonSkills)
if(pokemonSkills != null){ .setTeamPassiveList(passiveSkill)
builder.addAllPokemonUnitList(pokemonSkills); .build();
}
return builder.build();
} }