鸿蒙阵,breaId补充
parent
1bc6fe656d
commit
6dab85335f
|
@ -4,6 +4,7 @@ import com.ljsd.common.mogodb.MongoBase;
|
||||||
import com.ljsd.jieling.config.clazzStaticCfg.HeroStaticConfig;
|
import com.ljsd.jieling.config.clazzStaticCfg.HeroStaticConfig;
|
||||||
import com.ljsd.jieling.core.GlobalsDef;
|
import com.ljsd.jieling.core.GlobalsDef;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||||
import com.ljsd.jieling.logic.hero.HongMengAttributeEnum;
|
import com.ljsd.jieling.logic.hero.HongMengAttributeEnum;
|
||||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||||
import com.ljsd.jieling.util.KeyGenUtils;
|
import com.ljsd.jieling.util.KeyGenUtils;
|
||||||
|
@ -266,10 +267,15 @@ public class Hero extends MongoBase {
|
||||||
this.soulEquipByPositionMap.remove(position);
|
this.soulEquipByPositionMap.remove(position);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* breaId 鸿蒙阵
|
||||||
|
* @param heroManager
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public int getBreakIdByHongMeng(HeroManager heroManager){
|
public int getBreakIdByHongMeng(HeroManager heroManager){
|
||||||
// 英雄在共鸣池中
|
// 英雄在共鸣池中
|
||||||
if (heroManager.getResonances().values().contains(id)) {
|
if (heroManager.getResonances().values().contains(id)) {
|
||||||
|
return HeroLogic.getInstance().calRobotBreaByLevel(templateId, getLevel(heroManager));
|
||||||
}
|
}
|
||||||
return breakId;
|
return breakId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1253,6 +1253,27 @@ public class HeroLogic{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据英雄等级计算出BrealId,去除heroBuilder
|
||||||
|
* @param heroTid
|
||||||
|
* @param heroLevel
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int calRobotBreaByLevel(int heroTid,int heroLevel){
|
||||||
|
SCHero scHero = SCHero.getsCHero().get(heroTid);
|
||||||
|
int star = scHero.getStar();
|
||||||
|
Map<Integer, SCHeroRankUpConfig> scHeroRankUpConfigByType = STableManager.getFigureConfig(HeroStaticConfig.class).getScHeroRankUpConfigByShow(GlobalsDef.BREAK_TYPE,scHero.getStar());
|
||||||
|
if(scHeroRankUpConfigByType == null){
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
for(SCHeroRankUpConfig scHeroRankUpConfig : scHeroRankUpConfigByType.values()){
|
||||||
|
if (heroLevel >= scHeroRankUpConfig.getLimitLevel() && heroLevel <= scHeroRankUpConfig.getOpenLevel()){
|
||||||
|
return scHeroRankUpConfig.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
private Map<Integer,Object> getParaRate(SCHero scHero,int heroStar,int heroLevel,int heroBreakId){
|
private Map<Integer,Object> getParaRate(SCHero scHero,int heroStar,int heroLevel,int heroBreakId){
|
||||||
Map<Integer,Object> result = new HashMap<>(2);
|
Map<Integer,Object> result = new HashMap<>(2);
|
||||||
Object rankupPara=null;
|
Object rankupPara=null;
|
||||||
|
@ -1288,7 +1309,7 @@ public class HeroLogic{
|
||||||
|
|
||||||
private Map<Integer,Object> getParaForHero(User user, Hero hero){
|
private Map<Integer,Object> getParaForHero(User user, Hero hero){
|
||||||
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
SCHero scHero = SCHero.getsCHero().get(hero.getTemplateId());
|
||||||
return getParaRate(scHero, hero.getStar(), hero.getLevel(user.getHeroManager()), hero.getBreakIdByHongMeng());
|
return getParaRate(scHero, hero.getStar(), hero.getLevel(user.getHeroManager()), hero.getBreakIdByHongMeng(user.getHeroManager()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//todo
|
//todo
|
||||||
|
@ -1330,10 +1351,10 @@ public class HeroLogic{
|
||||||
}
|
}
|
||||||
// 大于10星,觉醒技
|
// 大于10星,觉醒技
|
||||||
if (hero.getStar() > HERO_MAX_STAR) {
|
if (hero.getStar() > HERO_MAX_STAR) {
|
||||||
skillList.addAll(tempHero.getAwakSkills(1, hero.getBreakId()));
|
skillList.addAll(tempHero.getAwakSkills(1, hero.getBreakIdByHongMeng(user.getHeroManager())));
|
||||||
skillList.addAll(tempHero.getAwakSkills(2, hero.getStarBreakId()));
|
skillList.addAll(tempHero.getAwakSkills(2, hero.getStarBreakId()));
|
||||||
} else {
|
} else {
|
||||||
skillList.addAll(tempHero.getPassiveSkills(1, hero.getBreakId()));
|
skillList.addAll(tempHero.getPassiveSkills(1, hero.getBreakIdByHongMeng(user.getHeroManager())));
|
||||||
skillList.addAll(tempHero.getPassiveSkills(2, hero.getStarBreakId()));
|
skillList.addAll(tempHero.getPassiveSkills(2, hero.getStarBreakId()));
|
||||||
}
|
}
|
||||||
//装备没有技能不用计算
|
//装备没有技能不用计算
|
||||||
|
|
|
@ -24,6 +24,11 @@ public class SDialRewardConfig implements BaseConfig {
|
||||||
private int extractWeight;
|
private int extractWeight;
|
||||||
|
|
||||||
private int limitNum;
|
private int limitNum;
|
||||||
|
|
||||||
|
private String showWeight;
|
||||||
|
|
||||||
|
private int maxGoalCount;
|
||||||
|
|
||||||
public static Map<Integer, SDialRewardConfig> sDialRewardConfigMap;
|
public static Map<Integer, SDialRewardConfig> sDialRewardConfigMap;
|
||||||
public static Map<Integer, Map<Integer, Set<Integer>>> sRandPosMap = new HashMap<>(); //activityid posid - ids
|
public static Map<Integer, Map<Integer, Set<Integer>>> sRandPosMap = new HashMap<>(); //activityid posid - ids
|
||||||
|
|
||||||
|
@ -88,4 +93,12 @@ public class SDialRewardConfig implements BaseConfig {
|
||||||
public static void setsRandPosMap(Map<Integer, Map<Integer, Set<Integer>>> sRandPosMap) {
|
public static void setsRandPosMap(Map<Integer, Map<Integer, Set<Integer>>> sRandPosMap) {
|
||||||
SDialRewardConfig.sRandPosMap = sRandPosMap;
|
SDialRewardConfig.sRandPosMap = sRandPosMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getShowWeight() {
|
||||||
|
return showWeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getMaxGoalCount() {
|
||||||
|
return maxGoalCount;
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue