主角技能添加用户等级

back_recharge
yuanshuai 2021-10-26 17:57:10 +08:00
parent 379e85704d
commit 004ce5a027
2 changed files with 8 additions and 6 deletions

View File

@ -753,7 +753,7 @@ public class FightUtil {
return CommonProto.FightTeamInfo.
newBuilder()
.addAllFightUnitList(heroFightInfos)
.addAllPokemonUnitList(HeroLogic.getInstance().getCrossPokemon(crossArenaManager,csPlayer.getSex()))
.addAllPokemonUnitList(HeroLogic.getInstance().getCrossPokemon(crossArenaManager,csPlayer))
.setTeamPassiveList("")
.setForceScore(crossArenaManager.getMaxHistoryForce())
.build();

View File

@ -27,6 +27,7 @@ import com.ljsd.jieling.logic.activity.eventhandler.HeroFiveStarGetEventHandler;
import com.ljsd.jieling.logic.activity.eventhandler.PokemonFiveStarGetEventHandler;
import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
import com.ljsd.jieling.logic.dao.gm.ArenaOfHero;
import com.ljsd.jieling.logic.dao.gm.ArenaOfUser;
import com.ljsd.jieling.logic.dao.root.User;
@ -2371,7 +2372,7 @@ public class HeroLogic {
}
///获取修行技能数据
public void getPracticeSkill(List<CommonProto.FightUnitInfo> infoList, Map<Integer, Integer> practiceSkillMap,long maxForce,int sex) {
public void getPracticeSkill(List<CommonProto.FightUnitInfo> infoList, Map<Integer, Integer> practiceSkillMap,long maxForce,int sex,int userLv) {
if (practiceSkillMap.isEmpty()) {
return;
}
@ -2390,6 +2391,7 @@ public class HeroLogic {
.setUnitSkillIds(skillStr.toString())
.setProperty("0")
.setPosition(100)
.setStar(userLv)
.setSkinId(0)
.setForceScore(maxForce)
.setPlayerSex(sex)
@ -2432,7 +2434,7 @@ public class HeroLogic {
.build();
pokemonInfos.add(info);
}
getPracticeSkill(pokemonInfos, user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce(),user.getPlayerInfoManager().getSex());
getPracticeSkill(pokemonInfos, user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce(),user.getPlayerInfoManager().getSex(),user.getPlayerInfoManager().getLevel());
return pokemonInfos;
}
@ -2460,7 +2462,7 @@ public class HeroLogic {
return pokemonInfos;
}
public List<CommonProto.FightUnitInfo> getCrossPokemon(CrossArenaManager crossArenaManager,int sex) {
public List<CommonProto.FightUnitInfo> getCrossPokemon(CrossArenaManager crossArenaManager, CSPlayer csPlayer) {
//todo 灵兽
Map<String, com.ljsd.jieling.thrift.idl.Pokemon> pokemonMap = crossArenaManager.getPokemons();
Map<Integer, String> teamMap = crossArenaManager.getPokemonTeamMap();
@ -2487,7 +2489,7 @@ public class HeroLogic {
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
pokemonInfos.add(info);
}
getPracticeSkill(pokemonInfos,crossArenaManager.getPracticeSkillMap(),crossArenaManager.getMaxHistoryForce(),sex);
getPracticeSkill(pokemonInfos,crossArenaManager.getPracticeSkillMap(),crossArenaManager.getMaxHistoryForce(),csPlayer.getSex(),csPlayer.getLevel());
return pokemonInfos;
}
@ -2520,7 +2522,7 @@ public class HeroLogic {
.setUnitId(String.valueOf(pokemon.getTmpId())).setUnitSkillIds(String.valueOf(sSpiritAnimalSkill.getId())).build();
pokemonInfos.add(info);
}
getPracticeSkill(pokemonInfos,user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce(),user.getPlayerInfoManager().getSex());
getPracticeSkill(pokemonInfos,user.getHeroManager().getPracticeSkillMap(),user.getPlayerInfoManager().getMaxForce(),user.getPlayerInfoManager().getSex(),user.getPlayerInfoManager().getLevel());
return pokemonInfos;
}