fix
parent
8f247ddff2
commit
653579444f
|
@ -233,6 +233,7 @@ public class BehaviorUtil {
|
|||
.setUnitId(Integer.toString(hero.getTemplateId()))
|
||||
.setUnitSkillIds(heroSkill.substring(0,heroSkill.length()-1))
|
||||
.setProperty(property.substring(0, property.length()-1))
|
||||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.build();
|
||||
heroFightInfos.add(heroFightInfo);
|
||||
}
|
||||
|
|
|
@ -1021,10 +1021,26 @@ public class HeroLogic{
|
|||
return skillList;
|
||||
}
|
||||
|
||||
public void coverSkill(List<Integer> heroSkillList){
|
||||
Set<Integer> coverSkillIds = new HashSet<>();
|
||||
heroSkillList.forEach(skill->{
|
||||
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill);
|
||||
if(config!=null &&config.getCoverID()!=0){
|
||||
coverSkillIds.add(config.getCoverID());
|
||||
}
|
||||
});
|
||||
heroSkillList.removeAll(coverSkillIds);
|
||||
}
|
||||
|
||||
public StringBuilder getHeroSkills(User user,Hero hero, StringBuilder sb){
|
||||
List<Integer> heroSkillList = getHeroSkillList(user, hero);
|
||||
for(int i=2;i<heroSkillList.size();i++){
|
||||
coverSkill(heroSkillList);
|
||||
for(int i=0;i<heroSkillList.size();i++){
|
||||
Integer skill = heroSkillList.get(i);
|
||||
if(i<2){
|
||||
sb.append(skill).append(DIVISION);
|
||||
continue;
|
||||
}
|
||||
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill);
|
||||
if(config!=null &&config.getEffectiveRange()==1){
|
||||
sb.append(skill).append(DIVISION);
|
||||
|
|
|
@ -80,6 +80,7 @@ public class FightDataUtil {
|
|||
unitData.set("professionId", sMonster.getProfession());
|
||||
unitData.set("camp", 1);
|
||||
unitData.set("type", sMonster.getType());
|
||||
unitData.set("position", i+1);
|
||||
unitData.set("quality", sMonster.getQuality());
|
||||
unitData.set("element",sMonster.getPropertyName());
|
||||
if (unitSkill.length==1){
|
||||
|
@ -249,6 +250,7 @@ public class FightDataUtil {
|
|||
unitData.set("camp", postion);
|
||||
unitData.set("type", 1);
|
||||
unitData.set("quality", 1);
|
||||
unitData.set("position", data.getPosition());
|
||||
unitData.set("element", hero.getPropertyName());
|
||||
|
||||
unitData.set("skill", getSkill(skillIds[0]));
|
||||
|
|
|
@ -56,4 +56,8 @@ public class SPassiveSkillLogicConfig implements BaseConfig {
|
|||
public int getEffectiveRange() {
|
||||
return effectiveRange;
|
||||
}
|
||||
|
||||
public int getCoverID() {
|
||||
return coverID;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue