diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hardStage/HardStageLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hardStage/HardStageLogic.java index 563ce93df..7bd038f83 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hardStage/HardStageLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hardStage/HardStageLogic.java @@ -150,10 +150,14 @@ public class HardStageLogic { user.getTeamPosManager().setCurTeamPosId(teamId); List heroFightInfos = new ArrayList<>(); List teamPosHeroInfos = user.getTeamPosManager().getTeamPosForHero().get(teamId); - //只能使用一个神将 复制为6个神将 - if(nodeConfig.getHardStageBuff() == 1011){ - - + //只能使用一个神将 复制为6个神将 TODO + if(nodeConfig.getHardStageBuff() == 12 &&teamPosHeroInfos.size() == 1){ + int position = teamPosHeroInfos.get(0).getPosition(); + for(int i =1;i<=6;i++){ + if(position!= i){ + teamPosHeroInfos.add(new TeamPosHeroInfo(teamPosHeroInfos.get(0).getHeroId(),i)); + } + } } for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfos) { Hero hero; @@ -162,6 +166,15 @@ public class HardStageLogic { if (hero == null) { continue; } + SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId()); + if(nodeConfig.getHardStageBuff()!=0){ + SHardStageBuff buff = SHardStageBuff.getConfigMap().get(nodeConfig.getHardStageBuff()); + if(buff != null&& buff.getType()==101) {//TODO + if (!Arrays.stream(buff.getVocation()).boxed().anyMatch(n->n.equals(Integer.valueOf(scHero.getPropertyName())))) { + continue; + } + } + } Map heroAttributeMap = HeroLogic.getInstance().calHeroNotBufferAttribute(user, hero, false, teamId); StringBuilder skillSb = new StringBuilder(); StringBuilder propertySb = new StringBuilder(); diff --git a/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java b/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java index c23ade12d..256f75efb 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/util/CBean2Proto.java @@ -772,7 +772,7 @@ public class CBean2Proto { return CommonProto.TeamSimpleInfo.newBuilder().setHeroid(pokemon.getId()).setHeroTid(pokemon.getTmpId()).setLevel(pokemon.getLevel()).setStar(pokemon.getStar()).setPosition(position).build(); } - public static CommonProto.HardStagePlayerInfo getHardStagePlayerInfo(ArenaRecord arenaRecord,int type)throws Exception{ + public static CommonProto.HardStagePlayerInfo getHardStagePlayerInfo(ArenaRecord arenaRecord,int type)throws Exception { CommonProto.FightData fightDataProto = CommonProto.FightData.parseFrom(arenaRecord.getFightData()); return CommonProto.HardStagePlayerInfo.newBuilder() .setUid(arenaRecord.getAttackId()) @@ -782,7 +782,7 @@ public class CBean2Proto { .setHeadFrame(arenaRecord.getHeadFrame()) .setFightData(fightDataProto).setPower(arenaRecord.getAttackForce()).setType(type).build(); - + } /** * 获取紫府神印list by proto * @param user diff --git a/tablemanager/src/main/java/config/SHardStageBuff.java b/tablemanager/src/main/java/config/SHardStageBuff.java index e005dfa3d..ae2349e2e 100644 --- a/tablemanager/src/main/java/config/SHardStageBuff.java +++ b/tablemanager/src/main/java/config/SHardStageBuff.java @@ -11,6 +11,7 @@ public class SHardStageBuff implements BaseConfig { private int id; private int type; private int passiveSkillLogic; + private int[] vocation; private static Map configMap ; @@ -27,27 +28,19 @@ public class SHardStageBuff implements BaseConfig { return id; } - public void setId(int id) { - this.id = id; - } - public int getType() { return type; } - public void setType(int type) { - this.type = type; - } - public int getPassiveSkillLogic() { return passiveSkillLogic; } - public void setPassiveSkillLogic(int passiveSkillLogic) { - this.passiveSkillLogic = passiveSkillLogic; - } - public static Map getConfigMap() { return configMap; } + + public int[] getVocation() { + return vocation; + } }