灵兽战斗数据添加
parent
bf282624e7
commit
d054d48907
|
@ -247,7 +247,7 @@ public class BehaviorUtil {
|
|||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user))
|
||||
.setTeamPassiveList(HeroLogic.getInstance().getPokenmonPassiveSkills(user,teamId))
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ public class RoomMatchRequestHandler extends BaseHandler{
|
|||
String heroSkill = HeroLogic.getInstance().getHeroSkills(mine, hero,skillSb ).toString();
|
||||
userBloodySnpInfo.updateHeroSkill(heroId,heroSkill.substring(0, heroSkill.length() - 1));
|
||||
}
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(mine, myteamId);
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(mine);
|
||||
userBloodySnpInfo.setPokenmonSkills(pokenmonSkills);
|
||||
Map<String, FamilyHeroInfo> heroAllAttribute = BloodLogic.getInstance().battleRecord(mine, myteamId,null);
|
||||
userBloodySnpInfo.setHeroAllAttributes(heroAllAttribute);
|
||||
|
|
|
@ -221,7 +221,7 @@ public class Cmd_role_gm extends GmRoleAbstract {
|
|||
|
||||
if (self.getPokemonManager().getPokemonMap().size()!=0) {
|
||||
//玩家未激活异妖(神器)时,敌人阵容中不会出现异妖;激活异妖后,由敌人数据来源方决定战斗时是否有敌方异妖。
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user, snapTeamId);
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user);
|
||||
String pokenmonPassiveSkills = HeroLogic.getInstance().getPokenmonPassiveSkills(user, snapTeamId);
|
||||
// List<TeamPosForPokenInfo> teamPosForPokenInfos = user.getTeamPosManager().getTeamPosForPoken().get(snapTeamId);
|
||||
// if (null!=teamPosForPokenInfos) {
|
||||
|
|
|
@ -690,7 +690,7 @@ public class ChampionshipLogic {
|
|||
String heroSkill = HeroLogic.getInstance().getHeroSkills(user, hero, skillSb).toString();
|
||||
fightInfo.updateHeroSkill(heroId, heroSkill.substring(0, heroSkill.length() - 1));
|
||||
}
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user, snapTeamId);
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user);
|
||||
fightInfo.setPokenmonSkills(pokenmonSkills);
|
||||
String pokenmonPassiveSkills = HeroLogic.getInstance().getPokenmonPassiveSkills(user, snapTeamId);
|
||||
fightInfo.setPassiveSkills(pokenmonPassiveSkills);
|
||||
|
|
|
@ -586,7 +586,7 @@ public class ExpeditionLogic {
|
|||
|
||||
if (self.getPokemonManager().getPokemonMap().size()!=0) {
|
||||
//玩家未激活异妖(神器)时,敌人阵容中不会出现异妖;激活异妖后,由敌人数据来源方决定战斗时是否有敌方异妖。
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user, snapTeamId);
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user);
|
||||
String pokenmonPassiveSkills = HeroLogic.getInstance().getPokenmonPassiveSkills(user, snapTeamId);
|
||||
fightInfo.setPokenmonSkills(pokenmonSkills);
|
||||
fightInfo.setPassiveSkills(pokenmonPassiveSkills);
|
||||
|
@ -1042,7 +1042,7 @@ public class ExpeditionLogic {
|
|||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user))
|
||||
.setTeamPassiveList(pokenmonPassiveSkills)
|
||||
.setSpecialPassive(SpecialForTeamBuildEnum.toParm(teamId,user))
|
||||
.build();
|
||||
|
|
|
@ -352,7 +352,7 @@ public class GuildFightLogic {
|
|||
String heroSkill = HeroLogic.getInstance().getHeroSkills(user, hero,skillSb ).toString();
|
||||
fightInfo.updateHeroSkill(heroId,heroSkill.substring(0, heroSkill.length() - 1));
|
||||
}
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user, 501);
|
||||
String pokenmonSkills = HeroLogic.getInstance().getPokenmonSkills(user);
|
||||
fightInfo.setPokenmonSkills(pokenmonSkills);
|
||||
String pokenmonPassiveSkills = HeroLogic.getInstance().getPokenmonPassiveSkills(user, 501);
|
||||
fightInfo.setPassiveSkills(pokenmonPassiveSkills);
|
||||
|
|
|
@ -297,7 +297,7 @@ public class FightUtil {
|
|||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user))
|
||||
.setTeamPassiveList(HeroLogic.getInstance().getPokenmonPassiveSkills(user,teamId))
|
||||
.setSpecialPassive(SpecialForTeamBuildEnum.toParm(teamId,user))
|
||||
.build();
|
||||
|
@ -334,7 +334,7 @@ public class FightUtil {
|
|||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user))
|
||||
.setTeamPassiveList(HeroLogic.getInstance().getPokenmonPassiveSkills(user,teamId))
|
||||
.setSpecialPassive(SpecialForTeamBuildEnum.toParm(teamId,user))
|
||||
.build();
|
||||
|
@ -376,7 +376,7 @@ public class FightUtil {
|
|||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user))
|
||||
.setTeamPassiveList(HeroLogic.getInstance().getPokenmonPassiveSkills(user,teamId))
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -1297,29 +1297,29 @@ public class HeroLogic{
|
|||
return sb;
|
||||
}
|
||||
|
||||
public String getPokenmonSkills(User user,int teamId){
|
||||
public String getPokenmonSkills(User user){
|
||||
StringBuilder pokenSkillResult = new StringBuilder();
|
||||
//todo 灵兽
|
||||
// Map<Integer, Pokemon> pokemonMap = user.getPokemonManager().getPokemonMap();
|
||||
// Collections.sort(teamPosForPokenInfos);
|
||||
// int size = teamPosForPokenInfos.size();
|
||||
// for(int i=0;i<size;i++){
|
||||
// TeamPosForPokenInfo teamPosForPokenInfo = teamPosForPokenInfos.get(i);
|
||||
// int pokemonId = teamPosForPokenInfo.getPokenId();
|
||||
// int position = teamPosForPokenInfo.getPosition();
|
||||
// Pokemon pokemon = pokemonMap.get(pokemonId);
|
||||
// SDifferDemonsStageConfig sDifferDemonsStageConfig = SDifferDemonsStageConfig.getsDifferDemonsStageConfigMap(pokemonId*100 + pokemon.getAllStage());
|
||||
// pokenSkillResult.append(position).append("#").append(sDifferDemonsStageConfig.getSkillId());
|
||||
// if(i!=size-1){
|
||||
// pokenSkillResult.append("|");
|
||||
// }
|
||||
// }
|
||||
Map<Integer, String> pokemonTeamMap = user.getPokemonManager().getPokemonTeamMap();
|
||||
int[] blockUnlockLevel = SSpiritAnimalSetting.sSpiritAnimalSetting.getBlockUnlockLevel();
|
||||
PokemonManager pokemonManager = user.getPokemonManager();
|
||||
for(int i = 0;i<blockUnlockLevel.length;i++){
|
||||
if(pokemonTeamMap.containsKey(i+1)){
|
||||
String s = pokemonTeamMap.get(i + 1);
|
||||
Pokemon pokemon = pokemonManager.getPokemonMap().get(s);
|
||||
if(pokemon!=null){
|
||||
SSpiritAnimalSkill sSpiritAnimalSkill = SSpiritAnimalSkill.skillByAnimalAndStar.get(pokemon.getTmpId()).get(pokemon.getStar());
|
||||
pokenSkillResult.append(pokenSkillResult.length()==0?sSpiritAnimalSkill.getId():"#"+sSpiritAnimalSkill.getId());
|
||||
}
|
||||
}else{
|
||||
pokenSkillResult.append(pokenSkillResult.length()==0?0:"#"+0);
|
||||
}
|
||||
}
|
||||
return pokenSkillResult.toString();
|
||||
}
|
||||
|
||||
public String getPokenmonPassiveSkills(User user,int teamId){
|
||||
StringBuilder pokenSkillResult = new StringBuilder();
|
||||
//todo 灵兽
|
||||
//todo 灵兽 目前用不到
|
||||
// Map<Integer, Pokemon> pokemonMap = user.getPokemonManager().getPokemonMap();
|
||||
// Collections.sort(teamPosForPokenInfos);
|
||||
// for(TeamPosForPokenInfo teamPosForPokenInfo:teamPosForPokenInfos){
|
||||
|
|
|
@ -1593,7 +1593,7 @@ public class ItemUtil {
|
|||
for(int i = 0 ; i <entry.getValue();i++){
|
||||
Pokemon pokemon = new Pokemon(user.getId(),entry.getKey());
|
||||
user.getPokemonManager().addPokemon(pokemon);
|
||||
if(user.getPokemonManager().getPokemonGot().contains(pokemon.getTmpId())){
|
||||
if(!user.getPokemonManager().getPokemonGot().contains(pokemon.getTmpId())){
|
||||
user.getPokemonManager().addPokemonGot(pokemon.getTmpId());
|
||||
}
|
||||
dropBuilder.addPokemon(CBean2Proto.getPokemon(pokemon));
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
package config;
|
||||
|
||||
import manager.STableManager;
|
||||
import manager.Table;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@Table(name ="SpiritAnimalSkill")
|
||||
public class SSpiritAnimalSkill implements BaseConfig {
|
||||
|
||||
private int id;
|
||||
|
||||
private int spiritAnimalMatch;
|
||||
|
||||
private int starMatch;
|
||||
|
||||
private int[] skillIDList;
|
||||
|
||||
private int[] releasePoint;
|
||||
|
||||
private int[][] releaseLimit;
|
||||
|
||||
private int[] warEffectCount;
|
||||
|
||||
private int[] turnEffectCount;
|
||||
|
||||
public static Map<Integer,Map<Integer,SSpiritAnimalSkill>> skillByAnimalAndStar;
|
||||
@Override
|
||||
public void init() throws Exception {
|
||||
Map<Integer,Map<Integer,SSpiritAnimalSkill>> skillByAnimalAndStarTmp = new HashMap<>();
|
||||
Map<Integer, SSpiritAnimalSkill> configMap = STableManager.getConfig(SSpiritAnimalSkill.class);
|
||||
for(Map.Entry<Integer, SSpiritAnimalSkill> entry:configMap.entrySet()){
|
||||
skillByAnimalAndStarTmp.computeIfAbsent(entry.getValue().getSpiritAnimalMatch(),n->new HashMap<>()).put(entry.getValue().getStarMatch(),entry.getValue());
|
||||
}
|
||||
|
||||
skillByAnimalAndStar = skillByAnimalAndStarTmp;
|
||||
}
|
||||
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getSpiritAnimalMatch() {
|
||||
return spiritAnimalMatch;
|
||||
}
|
||||
|
||||
public int getStarMatch() {
|
||||
return starMatch;
|
||||
}
|
||||
|
||||
public int[] getSkillIDList() {
|
||||
return skillIDList;
|
||||
}
|
||||
|
||||
public int[] getReleasePoint() {
|
||||
return releasePoint;
|
||||
}
|
||||
|
||||
public int[][] getReleaseLimit() {
|
||||
return releaseLimit;
|
||||
}
|
||||
|
||||
public int[] getWarEffectCount() {
|
||||
return warEffectCount;
|
||||
}
|
||||
|
||||
public int[] getTurnEffectCount() {
|
||||
return turnEffectCount;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue