1、添加神印套装技能

2、添加魂灵宝精炼技能
back_recharge
duhui 2022-11-17 16:54:28 +08:00
parent 4a030074ea
commit f4952c5d51
8 changed files with 323 additions and 198 deletions

View File

@ -41,6 +41,15 @@ public class Jewel extends PropertyItem implements Cloneable {
this.setGodTreeLv(jewel.getGodTreeLv()); this.setGodTreeLv(jewel.getGodTreeLv());
} }
public Jewel(com.ljsd.jieling.thrift.idl.PropertyItem propertyItem){
this.setId(propertyItem.getId());
this.setEquipId(propertyItem.getEquipId());
this.setHeroId(propertyItem.heroId);
this.setBuildLevel(propertyItem.getRebuildLevel());
this.setLevel(propertyItem.getLevel());
this.setGodTreeLv(propertyItem.getGodTreeLv());
}
public int getGodTreeLv() { public int getGodTreeLv() {
return godTreeLv; return godTreeLv;
} }
@ -74,12 +83,13 @@ public class Jewel extends PropertyItem implements Cloneable {
public int getLevelByHongMeng(HeroManager heroManager,String heroId) { public int getLevelByHongMeng(HeroManager heroManager,String heroId) {
// 英雄在共鳴池中 // 英雄在共鳴池中
if (heroManager.getResonances().values().contains(heroId)) { if (heroManager.getResonances().containsValue(heroId)) {
// 1:魂宝2灵宝 // 1:魂宝2灵宝
HongMengAddAttribute hongMengAddAttribute = null; HongMengAddAttribute hongMengAddAttribute = null;
if (jewelType == 1){ if (jewelType == 1){
hongMengAddAttribute = heroManager.getResonanceAddition().get(HongMengAttributeEnum.SOUL_EQUIP); hongMengAddAttribute = heroManager.getResonanceAddition().get(HongMengAttributeEnum.SOUL_EQUIP);
}else if (jewelType == 2){ }
if (jewelType == 2){
hongMengAddAttribute = heroManager.getResonanceAddition().get(HongMengAttributeEnum.SPIRIT_EQUIP); hongMengAddAttribute = heroManager.getResonanceAddition().get(HongMengAttributeEnum.SPIRIT_EQUIP);
} }
// 读配置表 // 读配置表
@ -88,9 +98,9 @@ public class Jewel extends PropertyItem implements Cloneable {
int[] max = config.getMax(); int[] max = config.getMax();
if (hongMengAddAttribute != null){ if (hongMengAddAttribute != null){
// 比较当前等级和共鸣等级 // 比较当前等级和共鸣等级
int newLevel = getLevel() >= hongMengAddAttribute.value?getLevel():hongMengAddAttribute.value; int newLevel = Math.max(getLevel(), hongMengAddAttribute.value);
// 第一次结果和最大等级限制比较 // 第一次结果和最大等级限制比较
newLevel = max[0] >= newLevel?newLevel:max[0]; newLevel = Math.min(max[0], newLevel);
return newLevel; return newLevel;
} }
} }

View File

@ -37,6 +37,13 @@ public class PurpleMansionSeal{
this.state = state; this.state = state;
} }
public PurpleMansionSeal(com.ljsd.jieling.thrift.idl.PurpleMansionSeal seal) {
this.sealId = seal.getSealId();
this.type = seal.getType();
this.subId = seal.getSubId();
this.state = seal.getState();
}
public int getSealId() { public int getSealId() {
return sealId; return sealId;
} }

View File

@ -0,0 +1,142 @@
package com.ljsd.jieling.logic.dao.vo;
import com.ljsd.jieling.logic.dao.Hero;
import com.ljsd.jieling.logic.dao.HeroManager;
import com.ljsd.jieling.logic.dao.Jewel;
import com.ljsd.jieling.logic.dao.PurpleMansionSeal;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.thrift.idl.ArenaOfHero;
import com.ljsd.jieling.thrift.idl.CrossArenaManager;
import com.ljsd.jieling.util.CBean2Proto;
import config.SCHero;
import java.util.HashMap;
import java.util.Map;
/**
*
*
* @author ascend
* 2022/11/17 15:26:54
*/
public class HeroVo {
private String id;
private int templateId;
private int star;
private int HMBreakId;
private int starBreakId;
private int HMEspecialEquipLevel;
private int propertyId;
private int godSoulLv;
private Map<Integer, Integer> soulEquipByPositionMap = new HashMap<>();
private Map<Integer, Integer> godSealByPositionMap = new HashMap<>();
private Map<Integer, PurpleMansionSeal> purpleMansionSealMap = new HashMap<>();
private Map<Integer, Integer> HMEquipPositionMap = new HashMap<>();
private Map<Integer, Integer> faBaoGongMingSkillMap = new HashMap<>();
private Map<Integer, Long> userMountValidTime = new HashMap<>();
private Map<String, Jewel> jewelMap = new HashMap<>();
public HeroVo(User user, Hero hero) {
HeroManager heroManager = user.getHeroManager();
this.id = hero.getId();
this.templateId = hero.getTemplateId();
this.star = hero.getTemplateId();
this.HMBreakId = hero.getBreakIdByHongMeng(heroManager);
this.starBreakId = hero.getStarBreakId();
this.HMEspecialEquipLevel = hero.getEspecialEquipLevelByHongmeng(heroManager,hero.getId());
this.propertyId = hero.getPropertyId();
this.godSoulLv = hero.getGodSoulLv();
this.soulEquipByPositionMap = new HashMap<>(hero.getSoulEquipByPositionMap());
this.godSealByPositionMap = new HashMap<>(hero.getGodSealByPositionMap());
this.purpleMansionSealMap = new HashMap<>(heroManager.getPurpleMansionSeal());
this.HMEquipPositionMap = new HashMap<>(hero.getEquipByHongmengPositionMap(heroManager));
this.faBaoGongMingSkillMap = new HashMap<>(heroManager.getFaBaoGongMingSkillMap());
this.userMountValidTime = new HashMap<>(user.getPlayerInfoManager().getUserMountValidTime());
this.jewelMap = new HashMap<>(CBean2Proto.jewelOfLocal(user,hero));
}
public HeroVo(CrossArenaManager arena, ArenaOfHero hero) {
this.id = hero.getId();
this.templateId = hero.getTemplateId();
this.star = hero.getTemplateId();
this.HMBreakId = hero.getBreakId();
this.starBreakId = hero.getStarBreakId();
this.HMEspecialEquipLevel = hero.getEspecialEquipLevel();
this.propertyId = hero.getPropertyId();
this.godSoulLv = hero.getGodSoulLv();
this.soulEquipByPositionMap = new HashMap<>(hero.getSoulEquipByPositionMap());
this.godSealByPositionMap = new HashMap<>(hero.getGodSealByPositionMap());
this.purpleMansionSealMap = CBean2Proto.sealOfCross(arena.getSeals());
this.HMEquipPositionMap = new HashMap<>(hero.getEquipByPositionMap());
this.faBaoGongMingSkillMap = new HashMap<>(arena.getFaBaoGongMingSkillMap());
this.userMountValidTime = new HashMap<>();
this.jewelMap = new HashMap<>(CBean2Proto.jewelOfCross(arena,hero));
}
public String getId() {
return id;
}
public int getGodSoulLv() {
return godSoulLv;
}
public int getPropertyId() {
if (propertyId == 0) {
SCHero scHero = SCHero.getsCHero().get(templateId);
return scHero.getPropertyName();
}
return propertyId;
}
public Map<String, Jewel> getJewelMap() {
return jewelMap;
}
public Map<Integer, Long> getUserMountValidTime() {
return userMountValidTime;
}
public int getTemplateId() {
return templateId;
}
public int getStar() {
return star;
}
public int getHMBreakId() {
return HMBreakId;
}
public int getStarBreakId() {
return starBreakId;
}
public int getHMEspecialEquipLevel() {
return HMEspecialEquipLevel;
}
public Map<Integer, Integer> getSoulEquipByPositionMap() {
return soulEquipByPositionMap;
}
public Map<Integer, Integer> getGodSealByPositionMap() {
return godSealByPositionMap;
}
public Map<Integer, PurpleMansionSeal> getPurpleMansionSealMap() {
return purpleMansionSealMap;
}
public Map<Integer, Integer> getHMEquipPositionMap() {
return HMEquipPositionMap;
}
public Map<Integer, Integer> getFaBaoGongMingSkillMap() {
return faBaoGongMingSkillMap;
}
}

View File

@ -798,13 +798,6 @@ public class CombatLogic {
} }
}); });
} }
// if(teamId == GlobalsDef.EXPEDITION_TEAM){
// user.getPlayerInfoManager().getRechargeInfo().getBuyGoodsTimes().keySet().forEach(id->{
// for(int passId : SRechargeCommodityConfig.rechargeCommodityConfigMap.get(id).getPassiveSkill()) {
// passiveTeamskillEffect.add(passId);
// }
// });
// }
user.getTeamPosManager().updatePassSkillTeamPos(teamId,passiveTeamskillEffect); user.getTeamPosManager().updatePassSkillTeamPos(teamId,passiveTeamskillEffect);
passiveskillEffect.addAll(passiveTeamskillEffect); passiveskillEffect.addAll(passiveTeamskillEffect);
}else{ }else{

View File

@ -30,6 +30,7 @@ import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
import com.ljsd.jieling.logic.dao.*; import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.dao.cross.CSPlayer; import com.ljsd.jieling.logic.dao.cross.CSPlayer;
import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.dao.vo.HeroVo;
import com.ljsd.jieling.logic.expedition.ExpeditionLogic; import com.ljsd.jieling.logic.expedition.ExpeditionLogic;
import com.ljsd.jieling.logic.fight.CombatLogic; import com.ljsd.jieling.logic.fight.CombatLogic;
import com.ljsd.jieling.logic.fight.passiveSkillCal.PassiveskillCalEnum; import com.ljsd.jieling.logic.fight.passiveSkillCal.PassiveskillCalEnum;
@ -2005,7 +2006,6 @@ public class HeroLogic {
return getParaRate(scHero, hero.getStar(), hero.getLevel(user.getHeroManager()), hero.getBreakIdByHongMeng(user.getHeroManager())); return getParaRate(scHero, hero.getStar(), hero.getLevel(user.getHeroManager()), hero.getBreakIdByHongMeng(user.getHeroManager()));
} }
//todo
private Map<Integer, Object> getParaForRobotHero(SCHero scHero, int level, int breakId) { private Map<Integer, Object> getParaForRobotHero(SCHero scHero, int level, int breakId) {
return getParaRate(scHero, scHero.getStar(), level, breakId); return getParaRate(scHero, scHero.getStar(), level, breakId);
} }
@ -2030,31 +2030,34 @@ public class HeroLogic {
break; break;
default: default:
break; break;
} }
return result; return result;
} }
/** /**
* , *
* @param user * ,
* @param hero * @param heroVo
* @return * @return
*/ */
public List<Integer> getHeroSkillList(User user, Hero hero) { public List<Integer> originGetHeroSkillList(HeroVo heroVo) {
List<Integer> skillList = new ArrayList<>(); List<Integer> skillList = new ArrayList<>();
SCHero tempHero = SCHero.getsCHero().get(hero.getTemplateId());
List<Integer> skillListByStar = tempHero.getSkillListByStar(hero.getStar()); int templateId = heroVo.getTemplateId();
int star = heroVo.getStar();
SCHero tempHero = SCHero.getsCHero().get(templateId);
List<Integer> skillListByStar = tempHero.getSkillListByStar(star);
if (skillListByStar != null) { if (skillListByStar != null) {
skillList.addAll(skillListByStar); skillList.addAll(skillListByStar);
} }
// 大于10星觉醒技 // 大于10星觉醒技
if (hero.getStar() > HERO_MAX_STAR) { if (star > HERO_MAX_STAR) {
skillList.addAll(tempHero.getAwakSkills(1, hero.getBreakIdByHongMeng(user.getHeroManager()))); skillList.addAll(tempHero.getAwakSkills(1, heroVo.getHMBreakId()));
skillList.addAll(tempHero.getAwakSkills(2, hero.getStarBreakId())); skillList.addAll(tempHero.getAwakSkills(2, heroVo.getStarBreakId()));
} else { } else {
skillList.addAll(tempHero.getPassiveSkills(1, hero.getBreakIdByHongMeng(user.getHeroManager()))); skillList.addAll(tempHero.getPassiveSkills(1, heroVo.getHMBreakId()));
skillList.addAll(tempHero.getPassiveSkills(2, hero.getStarBreakId())); skillList.addAll(tempHero.getPassiveSkills(2, heroVo.getStarBreakId()));
} }
// 角色初始被动 // 角色初始被动
@ -2068,21 +2071,63 @@ public class HeroLogic {
Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class); Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class);
//魂印 //魂印
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap(); Map<Integer, Integer> soulEquipByPositionMap = heroVo.getSoulEquipByPositionMap();
soulEquipByPositionMap.values().forEach(e -> { soulEquipByPositionMap.values().forEach(e -> {
Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add); Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add);
}); });
//神印 //神印
Map<Integer, Integer> godSealByPositionMap = hero.getGodSealByPositionMap(); Map<Integer, Integer> godSealByPositionMap = heroVo.getGodSealByPositionMap();
godSealByPositionMap.values().forEach(e -> { godSealByPositionMap.values().forEach(e -> {
Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add); Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add);
}); });
// 神印套装
Iterator<Map.Entry<Integer, Integer>> godSealIterator = godSealByPositionMap.entrySet().iterator();
ArrayList<SEquipConfig> godSealSuiteNumList = new ArrayList<>();
while (godSealIterator.hasNext()) {
Map.Entry<Integer, Integer> next = godSealIterator.next();
SEquipConfig sEquipConfig = config.get(next.getValue());
// 添加到套装list
godSealSuiteNumList.add(sEquipConfig);
}
Collections.sort(godSealSuiteNumList);
// 记录当前长度(位置)
int godSealNum = godSealSuiteNumList.size();
if (!godSealSuiteNumList.isEmpty()) {
// 遍历套装list
for (SEquipConfig item : godSealSuiteNumList) {
//根据星级读取配置表,为空表示不是套装
SEquipSuiteConfig sEquipSuiteConfig = SEquipSuiteConfig.config.get(item.getStar());
if (null != sEquipSuiteConfig) {
// 根据套装数量读表,为空标是套装数量不足
Integer integer = sEquipSuiteConfig.getSuiteSkills().get(godSealNum);
if (integer == null) {
godSealNum -= 1;
continue;
}
skillList.add(integer);
}
// 不管是否是套装,都要-1
godSealNum -= 1;
}
}
// 魂灵宝
Map<Integer, SJewelConfig> map = STableManager.getConfig(SJewelConfig.class);
for (Jewel jewel : heroVo.getJewelMap().values()) {
SJewelConfig jewelConfig = map.get(jewel.getEquipId());
if (jewelConfig == null){
continue;
}
SJewelRankupConfig rankUp = SJewelRankupConfig.rankupMap.get(jewelConfig.getRankupPool()).get(2).get(jewel.getBuildLevel());
skillList.add(rankUp.getPassiveSkillId());
}
//法宝技能 //法宝技能
int[] equipTalismana = tempHero.getEquipTalismana(); int[] equipTalismana = tempHero.getEquipTalismana();
if (equipTalismana.length >= 2 && hero.getStar() >= equipTalismana[0]) { if (equipTalismana.length >= 2 && star >= equipTalismana[0]) {
int especialEquipLevel = hero.getEspecialEquipLevelByHongmeng(user.getHeroManager(), hero.getId()); int especialEquipLevel = heroVo.getHMEspecialEquipLevel();
int especialEquipId = equipTalismana[1]; int especialEquipId = equipTalismana[1];
Map<Integer, SEquipTalismana> sEquipTalismana = SEquipTalismana.equipTalismanaStarMap.get(especialEquipId); Map<Integer, SEquipTalismana> sEquipTalismana = SEquipTalismana.equipTalismanaStarMap.get(especialEquipId);
sEquipTalismana.forEach((k, v) -> { sEquipTalismana.forEach((k, v) -> {
@ -2092,26 +2137,26 @@ public class HeroLogic {
}); });
} }
// 紫府神印技能 int propertyId = heroVo.getPropertyId();
Collection<PurpleMansionSeal> seals = user.getHeroManager().getPurpleMansionSeal().values();
seals.forEach(v -> {
// 使用中神印
if (v.getState() == 1) {
// 附身神印
if (v.getType() == 1) {
if (v.getSubId().equals(hero.getId())) {
getPurpleMansionSealSkill(v.getSealId(), hero.getPropertyId(), skillList);
}
}
// 通用神印
else {
getPurpleMansionSealSkill(v.getSealId(), hero.getPropertyId(), skillList);
}
}
});
Iterator<Map.Entry<Integer, Integer>> iterator = hero.getEquipByHongmengPositionMap(user.getHeroManager()).entrySet().iterator(); // 紫府神印技能
// 套装list初始化 for (PurpleMansionSeal seal : heroVo.getPurpleMansionSealMap().values()) {
// 使用中神印
if (seal.getState() != 1){
continue;
}
// 通用神印
if (seal.getType() == 0){
getPurpleMansionSealSkill(seal.getSealId(), propertyId, skillList);
}
// 附身神印
if (seal.getType() == 1 && seal.getSubId().equals(heroVo.getId())) {
getPurpleMansionSealSkill(seal.getSealId(), propertyId, skillList);
}
}
// 装备套装list初始化
Iterator<Map.Entry<Integer, Integer>> iterator = heroVo.getHMEquipPositionMap().entrySet().iterator();
ArrayList<SEquipConfig> suiteNumList = new ArrayList<>(); ArrayList<SEquipConfig> suiteNumList = new ArrayList<>();
while (iterator.hasNext()) { while (iterator.hasNext()) {
Map.Entry<Integer, Integer> next = iterator.next(); Map.Entry<Integer, Integer> next = iterator.next();
@ -2140,8 +2185,9 @@ public class HeroLogic {
num -= 1; num -= 1;
} }
} }
// 坐骑技能 // 坐骑技能
for (Map.Entry<Integer, Long> entry : user.getPlayerInfoManager().getUserMountValidTime().entrySet()) { for (Map.Entry<Integer, Long> entry : heroVo.getUserMountValidTime().entrySet()) {
if (!SPlayerHeadIcon.getHeadIconMap().containsKey(entry.getKey())) { if (!SPlayerHeadIcon.getHeadIconMap().containsKey(entry.getKey())) {
continue; continue;
} }
@ -2153,27 +2199,30 @@ public class HeroLogic {
} }
//神魂技能 //神魂技能
if (hero.getGodSoulLv() > 0) { int godSoulLv = heroVo.getGodSoulLv();
List<Integer> godSoulSkills = GetGodSoulSkill(hero.getTemplateId(), hero.getGodSoulLv()); if (godSoulLv > 0) {
List<Integer> godSoulSkills = GetGodSoulSkill(templateId, godSoulLv);
skillList.addAll(godSoulSkills); skillList.addAll(godSoulSkills);
} }
///法宝之魂共鸣技能 ///法宝之魂共鸣技能
if (user.getHeroManager().getFaBaoGongMingSkillMap().size()>0) { Map<Integer, Integer> faBaoGongMingSkillMap = heroVo.getFaBaoGongMingSkillMap();
if (faBaoGongMingSkillMap.size() > 0) {
List<Integer> faBaoSoulSkills=new ArrayList<>(); List<Integer> faBaoSoulSkills=new ArrayList<>();
for (Map.Entry<Integer, Integer> entry : user.getHeroManager().getFaBaoGongMingSkillMap().entrySet()) { for (Map.Entry<Integer, Integer> entry : faBaoGongMingSkillMap.entrySet()) {
SXiuXianSkill sXiuXianSkill= STableManager.getConfig(SXiuXianSkill.class).get(entry.getValue()); SXiuXianSkill sXiuXianSkill= STableManager.getConfig(SXiuXianSkill.class).get(entry.getValue());
if (sXiuXianSkill.getFitList()[0]==0){ if (sXiuXianSkill.getFitList()[0]==0){
for (int skillId : sXiuXianSkill.getSkillId()) { for (int skillId : sXiuXianSkill.getSkillId()) {
faBaoSoulSkills.add(skillId); faBaoSoulSkills.add(skillId);
} }
}else if(sXiuXianSkill.getFitList()[0]==1){ }else if(sXiuXianSkill.getFitList()[0]==1){
if (sXiuXianSkill.getFitList()[1]==hero.getPropertyId()){ if (sXiuXianSkill.getFitList()[1]==propertyId){
for (int skillId : sXiuXianSkill.getSkillId()) { for (int skillId : sXiuXianSkill.getSkillId()) {
faBaoSoulSkills.add(skillId); faBaoSoulSkills.add(skillId);
} }
} }
}else if(sXiuXianSkill.getFitList()[0]==2){ }else if(sXiuXianSkill.getFitList()[0]==2){
if (sXiuXianSkill.getFitList()[1]==hero.getPropertyId()){ if (sXiuXianSkill.getFitList()[1]==propertyId){
for (int skillId : sXiuXianSkill.getSkillId()) { for (int skillId : sXiuXianSkill.getSkillId()) {
faBaoSoulSkills.add(skillId); faBaoSoulSkills.add(skillId);
} }
@ -2188,6 +2237,17 @@ public class HeroLogic {
return skillList; return skillList;
} }
/**
* 使
* @param user
* @param hero
* @return
*/
public List<Integer> getHeroSkillList(User user, Hero hero) {
HeroVo heroVo = new HeroVo(user, hero);
return originGetHeroSkillList(heroVo);
}
/** /**
* *
* @param crossArenaManager * @param crossArenaManager
@ -2196,141 +2256,8 @@ public class HeroLogic {
*/ */
public StringBuilder getCrossHeroSkillStr(CrossArenaManager crossArenaManager, com.ljsd.jieling.thrift.idl.ArenaOfHero hero) { public StringBuilder getCrossHeroSkillStr(CrossArenaManager crossArenaManager, com.ljsd.jieling.thrift.idl.ArenaOfHero hero) {
List<Integer> skillList = new ArrayList<>(); HeroVo heroVo = new HeroVo(crossArenaManager, hero);
SCHero tempHero = SCHero.getsCHero().get(hero.getTemplateId()); List<Integer> skillList = originGetHeroSkillList(heroVo);
List<Integer> skillListByStar = tempHero.getSkillListByStar(hero.getStar());
if (skillListByStar != null) {
skillList.addAll(skillListByStar);
}
// 大于10星觉醒技
if (hero.getStar() > HERO_MAX_STAR) {
skillList.addAll(tempHero.getAwakSkills(1, hero.getBreakId()));
skillList.addAll(tempHero.getAwakSkills(2, hero.getStarBreakId()));
} else {
skillList.addAll(tempHero.getPassiveSkills(1, hero.getBreakId()));
skillList.addAll(tempHero.getPassiveSkills(2, hero.getStarBreakId()));
}
Map<Integer, SEquipConfig> config = STableManager.getConfig(SEquipConfig.class);
//魂印
Map<Integer, Integer> soulEquipByPositionMap = hero.getSoulEquipByPositionMap();
soulEquipByPositionMap.values().forEach(e -> {
Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add);
});
//神印
Map<Integer, Integer> godSealByPositionMap = hero.getGodSealByPositionMap();
godSealByPositionMap.values().forEach(e -> {
Arrays.stream(config.get(e).getPassiveSkill()).forEach(skillList::add);
});
//法宝技能
int[] equipTalismana = tempHero.getEquipTalismana();
if (equipTalismana.length >= 1 && hero.getStar() >= equipTalismana[0]) {
int especialEquipLevel = hero.getEspecialEquipLevel();
int especialEquipId = equipTalismana[1];
Map<Integer, SEquipTalismana> sEquipTalismana = SEquipTalismana.equipTalismanaStarMap.get(especialEquipId);
sEquipTalismana.forEach((k, v) -> {
if (k <= especialEquipLevel && v.getOpenSkillRules() != null) {
Arrays.stream(v.getOpenSkillRules()).forEach(i -> skillList.add(i));
}
});
}
// 紫府神印技能
//Collection<PurpleMansionSeal> seals = user.getHeroManager().getPurpleMansionSeal().values();
Collection<com.ljsd.jieling.thrift.idl.PurpleMansionSeal> seals = crossArenaManager.getSeals().values();
seals.forEach(v -> {
// 使用中神印
if (v.getState() == 1) {
// 附身神印
if (v.getType() == 1) {
if (v.getSubId().equals(hero.getId())) {
getPurpleMansionSealSkill(v.getSealId(), hero.getPropertyId(), skillList);
}
}
// 通用神印
else {
getPurpleMansionSealSkill(v.getSealId(), hero.getPropertyId(), skillList);
}
}
});
// 坐骑技能
for (int skill : crossArenaManager.getSkill()) {
if (!SPlayerHeadIcon.getHeadIconMap().containsKey(skill)) {
continue;
}
SPlayerHeadIcon sPlayerHeadIcon = SPlayerHeadIcon.getHeadIconMap().get(skill);
if (sPlayerHeadIcon.getSkill() == null || sPlayerHeadIcon.getSkill().length <= 0) {
continue;
}
skillList.add(sPlayerHeadIcon.getSkill()[0][0]);
//sb.append(sPlayerHeadIcon.getSkill()[0][0]).append(DIVISION);
}
Iterator<Map.Entry<Integer, Integer>> iterator = hero.getEquipByPositionMap().entrySet().iterator();
// 套装list初始化
ArrayList<SEquipConfig> suiteNumList = new ArrayList<>();
while (iterator.hasNext()) {
Map.Entry<Integer, Integer> next = iterator.next();
SEquipConfig sEquipConfig = STableManager.getConfig(SEquipConfig.class).get(next.getValue());
// 添加到套装list
suiteNumList.add(sEquipConfig);
}
Collections.sort(suiteNumList);
// 记录当前长度(位置)
int num = suiteNumList.size();
if (!suiteNumList.isEmpty()) {
// 遍历套装list
for (SEquipConfig item : suiteNumList) {
//根据星级读取配置表,为空表示不是套装
SEquipSuiteConfig sEquipSuiteConfig = SEquipSuiteConfig.config.get(item.getStar());
if (null != sEquipSuiteConfig) {
// 根据套装数量读表,为空标是套装数量不足
Integer integer = sEquipSuiteConfig.getSuiteSkills().get(num);
if (integer == null) {
num -= 1;
continue;
}
skillList.add(integer);
//sb.append(integer).append(DIVISION);
}
// 不管是否是套装,都要-1
num -= 1;
}
}
//神魂技能
if (hero.getGodSoulLv() > 0) {
List<Integer> godSoulSkills = GetGodSoulSkill(hero.getTemplateId(), hero.getGodSoulLv());
skillList.addAll(godSoulSkills);
}
///法宝之魂共鸣技能
if (crossArenaManager.getFaBaoGongMingSkillMap().size()>0) {
List<Integer> faBaoSoulSkills=new ArrayList<>();
for (Map.Entry<Integer, Integer> entry : crossArenaManager.getFaBaoGongMingSkillMap().entrySet()) {
SXiuXianSkill sXiuXianSkill= STableManager.getConfig(SXiuXianSkill.class).get(entry.getValue());
if (sXiuXianSkill.getFitList()[0]==0){
for (int skillId : sXiuXianSkill.getSkillId()) {
faBaoSoulSkills.add(skillId);
}
}else if(sXiuXianSkill.getFitList()[0]==1){
if (sXiuXianSkill.getFitList()[1]==hero.getPropertyId()){
for (int skillId : sXiuXianSkill.getSkillId()) {
faBaoSoulSkills.add(skillId);
}
}
}else if(sXiuXianSkill.getFitList()[0]==2){
if (sXiuXianSkill.getFitList()[1]==hero.getPropertyId()){
for (int skillId : sXiuXianSkill.getSkillId()) {
faBaoSoulSkills.add(skillId);
}
}
}
}
if (faBaoSoulSkills.size()>0) {
skillList.addAll(faBaoSoulSkills);
}
}
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
coverSkill(skillList); coverSkill(skillList);
@ -2345,7 +2272,6 @@ public class HeroLogic {
sb.append(skill).append(DIVISION); sb.append(skill).append(DIVISION);
} }
} }
return sb; return sb;
} }
@ -2371,13 +2297,7 @@ public class HeroLogic {
skillList.add(skillId); skillList.add(skillId);
break; break;
case 1: case 1:
// 阵营限制 case 2:// 阵营限制,职业限制
if (propertyId == fitList[1]) {
skillList.add(skillId);
}
break;
case 2:
// 职业限制
if (propertyId == fitList[1]) { if (propertyId == fitList[1]) {
skillList.add(skillId); skillList.add(skillId);
} }

View File

@ -21,6 +21,8 @@ import com.ljsd.jieling.logic.help.HelpTypeEnum;
import com.ljsd.jieling.logic.hero.HeroLogic; import com.ljsd.jieling.logic.hero.HeroLogic;
import com.ljsd.jieling.logic.home.HomeLogic; import com.ljsd.jieling.logic.home.HomeLogic;
import com.ljsd.jieling.logic.store.newRechargeInfo.NewRechargeInfo; import com.ljsd.jieling.logic.store.newRechargeInfo.NewRechargeInfo;
import com.ljsd.jieling.thrift.idl.ArenaOfHero;
import com.ljsd.jieling.thrift.idl.CrossArenaManager;
import config.*; import config.*;
import manager.STableManager; import manager.STableManager;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -1342,4 +1344,45 @@ public class CBean2Proto {
builder.setEspecialEquipLevel(hero.getEspecialEquipLevel()); builder.setEspecialEquipLevel(hero.getEspecialEquipLevel());
return builder.build(); return builder.build();
} }
/**
*
* @param crossSeals
* @return
*/
public static Map<Integer, PurpleMansionSeal> sealOfCross(Map<Integer, com.ljsd.jieling.thrift.idl.PurpleMansionSeal> crossSeals){
HashMap<Integer, PurpleMansionSeal> result = new HashMap<>();
for (Map.Entry<Integer, com.ljsd.jieling.thrift.idl.PurpleMansionSeal> entry : crossSeals.entrySet()) {
PurpleMansionSeal seal = new PurpleMansionSeal(entry.getValue());
result.put(entry.getKey(),seal);
}
return result;
}
/**
*
* @return
*/
public static Map<String, Jewel> jewelOfCross(CrossArenaManager arena, ArenaOfHero hero){
HashMap<String, Jewel> result = new HashMap<>();
for (String id : hero.getJewelInfo()) {
Jewel jewel = new Jewel(arena.getJewels().get(id));
result.put(id,jewel);
}
return result;
}
/**
*
* @return
*/
public static Map<String, Jewel> jewelOfLocal(User user, Hero hero){
HashMap<String, Jewel> result = new HashMap<>();
Map<String, PropertyItem> itemMap = user.getEquipManager().getEquipMap();
for (String id : hero.getJewelInfo()) {
Jewel jewel = (Jewel) itemMap.get(id);
result.put(id,jewel);
}
return result;
}
} }

View File

@ -12,6 +12,8 @@ public class SEquipConfig implements BaseConfig,Comparable<SEquipConfig> {
private int suiteID; private int suiteID;
private int suiteID1;
private int professionLimit; private int professionLimit;
private int position; private int position;
@ -187,6 +189,10 @@ public class SEquipConfig implements BaseConfig,Comparable<SEquipConfig> {
return suiteID; return suiteID;
} }
public int getSuiteID1() {
return suiteID1;
}
@Override @Override
public int compareTo(SEquipConfig o) { public int compareTo(SEquipConfig o) {
return this.getStar() - o.getStar(); return this.getStar() - o.getStar();

View File

@ -23,6 +23,8 @@ public class SJewelRankupConfig implements BaseConfig {
private int[][] upExpend; private int[][] upExpend;
private int passiveSkillId;
/** /**
* poolId,map * poolId,map
* type,map * type,map
@ -69,5 +71,7 @@ public class SJewelRankupConfig implements BaseConfig {
return upExpend; return upExpend;
} }
public int getPassiveSkillId() {
return passiveSkillId;
}
} }