试炼节点修改
parent
c99f1bea67
commit
52b8d83bab
|
@ -96,7 +96,7 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
||||||
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
||||||
|
|
||||||
LuaValue getFightData;
|
LuaValue getFightData;
|
||||||
if(ExpeditionLogic.isHardNode(nodeInfo.getType())){
|
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||||
int tid = deffightInfo.getUid();
|
int tid = deffightInfo.getUid();
|
||||||
List<CommonProto.FightTeamInfo> gropFightTeamInfoWithDouble = ExpeditionLogic.getGropFightTeamInfoWithDouble(tid, nodeInfo.getBossHP());
|
List<CommonProto.FightTeamInfo> gropFightTeamInfoWithDouble = ExpeditionLogic.getGropFightTeamInfoWithDouble(tid, nodeInfo.getBossHP());
|
||||||
getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, gropFightTeamInfoWithDouble);
|
getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, gropFightTeamInfoWithDouble);
|
||||||
|
|
|
@ -16,6 +16,8 @@ import com.ljsd.jieling.logic.OnlineUserManager;
|
||||||
import com.ljsd.jieling.logic.blood.BloodLogic;
|
import com.ljsd.jieling.logic.blood.BloodLogic;
|
||||||
import com.ljsd.jieling.logic.dao.*;
|
import com.ljsd.jieling.logic.dao.*;
|
||||||
import com.ljsd.jieling.logic.dao.root.User;
|
import com.ljsd.jieling.logic.dao.root.User;
|
||||||
|
import com.ljsd.jieling.logic.fight.FightUtil;
|
||||||
|
import com.ljsd.jieling.logic.fight.robot.RobotInfo;
|
||||||
import com.ljsd.jieling.logic.fight.specialparm.SpecialForTeamBuildEnum;
|
import com.ljsd.jieling.logic.fight.specialparm.SpecialForTeamBuildEnum;
|
||||||
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
||||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||||
|
@ -343,7 +345,7 @@ public class ExpeditionLogic {
|
||||||
}
|
}
|
||||||
// boss节点
|
// boss节点
|
||||||
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED||nodeInfo.getType()==ExpeditionLogic.NODETYPE_TRY){
|
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED||nodeInfo.getType()==ExpeditionLogic.NODETYPE_TRY){
|
||||||
snapOneFightInfo(nodeInfo);
|
snapOneFightInfo(nodeInfo,user);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -700,43 +702,56 @@ public class ExpeditionLogic {
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 节点英雄快照
|
* 节点英雄快照,试炼节点和贪婪节点生成节点数据
|
||||||
*/
|
*/
|
||||||
private void snapOneFightInfo(ExpeditionNodeInfo nodeInfo) throws ErrorCodeException{
|
private void snapOneFightInfo(ExpeditionNodeInfo nodeInfo,User user) throws ErrorCodeException{
|
||||||
|
|
||||||
SExpeditionNodeConfig sExpeditionNodeConfig = STableManager.getConfig(SExpeditionNodeConfig.class).get(nodeInfo.getType());
|
SExpeditionNodeConfig sExpeditionNodeConfig = STableManager.getConfig(SExpeditionNodeConfig.class).get(nodeInfo.getType());
|
||||||
int poolId = sExpeditionNodeConfig.getPoolId();
|
int poolId = sExpeditionNodeConfig.getPoolId();
|
||||||
|
SnapFightInfo fightInfo = new SnapFightInfo();
|
||||||
int tempId =ExpeditionLogic.getRandomTid(poolId,1).first();
|
int tempId =ExpeditionLogic.getRandomTid(poolId,1).first();
|
||||||
SExpeditionRecruitConfig sExpeditionRecruitConfig = STableManager.getConfig(SExpeditionRecruitConfig.class).get(tempId);
|
SExpeditionRecruitConfig sExpeditionRecruitConfig = STableManager.getConfig(SExpeditionRecruitConfig.class).get(tempId);
|
||||||
if(sExpeditionRecruitConfig==null) {
|
if(sExpeditionRecruitConfig==null) {
|
||||||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
||||||
}
|
}
|
||||||
//grop config
|
int heroId = sExpeditionRecruitConfig.getHeroId();
|
||||||
int i = sExpeditionRecruitConfig.getHeroId();
|
|
||||||
SnapFightInfo fightInfo = new SnapFightInfo();
|
|
||||||
|
|
||||||
fightInfo.setUid(i);
|
fightInfo.setUid(heroId);
|
||||||
int force = MonsterUtil.getMonsterForce(new int[]{i});
|
|
||||||
Map<String, Double> bossHP = new HashMap<>();
|
Map<String, Double> bossHP = new HashMap<>();
|
||||||
|
|
||||||
Map<String, FamilyHeroInfo> heroAllAttribute = new HashMap<>();
|
Map<String, FamilyHeroInfo> heroAllAttribute = new HashMap<>();
|
||||||
SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(i);
|
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||||
int[][] groupIds = sMonsterGroup.getContents();
|
//grop config
|
||||||
|
int force = MonsterUtil.getMonsterForce(new int[]{heroId});
|
||||||
|
|
||||||
int[] monsterIds = groupIds[0];
|
SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(heroId);
|
||||||
|
int[][] groupIds = sMonsterGroup.getContents();
|
||||||
|
|
||||||
for (int monsterId : monsterIds) {
|
int[] monsterIds = groupIds[0];
|
||||||
if(monsterId!=0){
|
|
||||||
bossHP.put(Integer.toString(monsterId), 1d);
|
for (int monsterId : monsterIds) {
|
||||||
heroAllAttribute.put(Integer.toString(monsterId), new FamilyHeroInfo());
|
if(monsterId!=0){
|
||||||
|
bossHP.put(Integer.toString(monsterId), 1d);
|
||||||
|
heroAllAttribute.put(Integer.toString(monsterId), new FamilyHeroInfo());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
fightInfo.setForce(force);
|
||||||
|
fightInfo.setPassiveSkills("");
|
||||||
|
}else{
|
||||||
|
int level = HeroLogic.getInstance().getAverageLevel(user, 6);
|
||||||
|
RobotInfo robot = FightUtil.createRobot(fightInfo.getUid(), level);
|
||||||
|
//组装
|
||||||
|
String skills = robot.getSkill() + robot.getPassiveSkill();
|
||||||
|
bossHP.put(Integer.toString(heroId),1d);
|
||||||
|
int force = HeroLogic.getInstance().calForce(robot.getRobotHeroAttribute());
|
||||||
|
fightInfo.setForce(force);
|
||||||
|
//试炼节点 放到第二个位置上
|
||||||
|
heroAllAttribute.put(Integer.toString(heroId), new FamilyHeroInfo(heroId,level,robot.getStar(),robot.getRobotHeroAttribute(),2));
|
||||||
|
fightInfo.updateHeroSkill(String.valueOf(heroId),skills.substring(0,skills.length()-1));
|
||||||
}
|
}
|
||||||
|
fightInfo.setPassiveSkills("");
|
||||||
fightInfo.setHeroAttribute(heroAllAttribute);
|
fightInfo.setHeroAttribute(heroAllAttribute);
|
||||||
fightInfo.setForce(force);
|
|
||||||
nodeInfo.setBossHP(bossHP);
|
nodeInfo.setBossHP(bossHP);
|
||||||
fightInfo.setPokenmonSkills("");
|
fightInfo.setPokenmonSkills("");
|
||||||
fightInfo.setPassiveSkills("");
|
|
||||||
nodeInfo.setSnapFightInfo(fightInfo);
|
nodeInfo.setSnapFightInfo(fightInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue