试炼节点修改
parent
c99f1bea67
commit
52b8d83bab
|
@ -96,7 +96,7 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
|||
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
||||
|
||||
LuaValue getFightData;
|
||||
if(ExpeditionLogic.isHardNode(nodeInfo.getType())){
|
||||
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||
int tid = deffightInfo.getUid();
|
||||
List<CommonProto.FightTeamInfo> gropFightTeamInfoWithDouble = ExpeditionLogic.getGropFightTeamInfoWithDouble(tid, nodeInfo.getBossHP());
|
||||
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.dao.*;
|
||||
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.hero.HeroAttributeEnum;
|
||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
||||
|
@ -343,7 +345,7 @@ public class ExpeditionLogic {
|
|||
}
|
||||
// boss节点
|
||||
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED||nodeInfo.getType()==ExpeditionLogic.NODETYPE_TRY){
|
||||
snapOneFightInfo(nodeInfo);
|
||||
snapOneFightInfo(nodeInfo,user);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
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());
|
||||
int poolId = sExpeditionNodeConfig.getPoolId();
|
||||
SnapFightInfo fightInfo = new SnapFightInfo();
|
||||
int tempId =ExpeditionLogic.getRandomTid(poolId,1).first();
|
||||
SExpeditionRecruitConfig sExpeditionRecruitConfig = STableManager.getConfig(SExpeditionRecruitConfig.class).get(tempId);
|
||||
if(sExpeditionRecruitConfig==null) {
|
||||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
||||
}
|
||||
//grop config
|
||||
int i = sExpeditionRecruitConfig.getHeroId();
|
||||
SnapFightInfo fightInfo = new SnapFightInfo();
|
||||
int heroId = sExpeditionRecruitConfig.getHeroId();
|
||||
|
||||
fightInfo.setUid(i);
|
||||
int force = MonsterUtil.getMonsterForce(new int[]{i});
|
||||
fightInfo.setUid(heroId);
|
||||
Map<String, Double> bossHP = new HashMap<>();
|
||||
|
||||
Map<String, FamilyHeroInfo> heroAllAttribute = new HashMap<>();
|
||||
SMonsterGroup sMonsterGroup = SMonsterGroup.getsMonsterGroupMap().get(i);
|
||||
int[][] groupIds = sMonsterGroup.getContents();
|
||||
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||
//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) {
|
||||
if(monsterId!=0){
|
||||
bossHP.put(Integer.toString(monsterId), 1d);
|
||||
heroAllAttribute.put(Integer.toString(monsterId), new FamilyHeroInfo());
|
||||
int[] monsterIds = groupIds[0];
|
||||
|
||||
for (int monsterId : monsterIds) {
|
||||
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.setForce(force);
|
||||
nodeInfo.setBossHP(bossHP);
|
||||
fightInfo.setPokenmonSkills("");
|
||||
fightInfo.setPassiveSkills("");
|
||||
nodeInfo.setSnapFightInfo(fightInfo);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue