danaotiangong update
parent
8fa36b3b1a
commit
eff18fe054
|
@ -97,14 +97,14 @@ public class EndConfirmExpeditionBattleRequestHandler extends BaseHandler<Expedi
|
|||
String holySkill = passiveSkillResult.length()!=0?passiveSkillResult.substring(0,passiveSkillResult.length()-1):"";
|
||||
|
||||
LuaValue getFightData;
|
||||
if(ExpeditionLogic.isHardNode(nodeInfo.getType())){
|
||||
int tid = deffightInfo.getUid();
|
||||
List<CommonProto.FightTeamInfo> gropFightTeamInfoWithDouble = ExpeditionLogic.getGropFightTeamInfoWithDouble(tid, nodeInfo.getBossHP());
|
||||
getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, gropFightTeamInfoWithDouble);
|
||||
}else {
|
||||
// if(ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()){
|
||||
// int tid = deffightInfo.getUid();
|
||||
// List<CommonProto.FightTeamInfo> gropFightTeamInfoWithDouble = ExpeditionLogic.getGropFightTeamInfoWithDouble(tid, nodeInfo.getBossHP());
|
||||
// getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, gropFightTeamInfoWithDouble);
|
||||
// }else {
|
||||
CommonProto.FightTeamInfo deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()+holySkill),nodeInfo.getBossHP());
|
||||
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
||||
}
|
||||
// }
|
||||
|
||||
LuaValue getOptionData = FightDataUtil.getOptionData(uid+"");
|
||||
int[] checkResult = CheckFight.getInstance().checkFight(seed, maxTime, getFightData, getOptionData, GameFightType.Expediton.getFightType());
|
||||
|
|
|
@ -127,7 +127,7 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
|||
|
||||
if (resultCode != 1) {
|
||||
|
||||
if (nodeInfo.getType() == ExpeditionLogic.NODETYPE_GREED) {
|
||||
if (ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()) {
|
||||
//贪婪节点只有1次战斗机会,若战斗失败后敌人将会逃走,玩家视为通过此节点
|
||||
//updata node
|
||||
Set<CommonProto.ExpeditionNodeInfo> nodeInfos = ExpeditionLogic.openLay(user,nodeInfo.getLay(),nodeId);
|
||||
|
@ -149,7 +149,7 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
|||
//出队伍
|
||||
user.getTeamPosManager().updateTeamPosByTeamId(1001,new LinkedList<>());
|
||||
|
||||
if(ExpeditionLogic.isHardNode(nodeInfo.getType())){
|
||||
if(ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()){
|
||||
//节点血量更新
|
||||
|
||||
// nodeInfo.getSnapFightInfo().getHeroAttribute().forEach((s, familyHeroInfo) ->
|
||||
|
@ -270,26 +270,21 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
|||
|
||||
if(nodeInfo.getType() == ExpeditionLogic.NODETYPE_TRY){
|
||||
//create Hero
|
||||
int poolId = sExpeditionNodeConfig.getPoolId();
|
||||
int tempId =ExpeditionLogic.getRandomTid(poolId,1).first();
|
||||
SExpeditionRecruitConfig sExpeditionRecruitConfig = STableManager.getConfig(SExpeditionRecruitConfig.class).get(tempId);
|
||||
if(sExpeditionRecruitConfig!=null){
|
||||
int i = sExpeditionRecruitConfig.getHeroId();
|
||||
//获取最大战力hero
|
||||
String maxforceHero = user.getPlayerInfoManager().getMaxforceHero();
|
||||
if(StringUtil.isEmpty(maxforceHero)){
|
||||
HeroLogic.getInstance().calTeamTotalForce(user, 1, false);
|
||||
maxforceHero = user.getPlayerInfoManager().getMaxforceHero();
|
||||
}
|
||||
Hero hero = user.getHeroManager().getHeroMap().get(maxforceHero);
|
||||
if(hero==null){
|
||||
throw new ErrorCodeException("试炼节点英雄掉落失败");
|
||||
}
|
||||
Hero hero1 = ExpeditionLogic.createHero(i, uid, hero,-1);
|
||||
drop.addHero(CBean2Proto.getHero(hero1));
|
||||
for(Integer equipId : hero1.getEquipByPositionMap().values()){
|
||||
drop.addEquipId(CBean2Proto.getEquipProto(equipId));
|
||||
}
|
||||
int i = nodeInfo.getSnapFightInfo().getUid();
|
||||
//获取最大战力hero
|
||||
String maxforceHero = user.getPlayerInfoManager().getMaxforceHero();
|
||||
if(StringUtil.isEmpty(maxforceHero)){
|
||||
HeroLogic.getInstance().calTeamTotalForce(user, 1, false);
|
||||
maxforceHero = user.getPlayerInfoManager().getMaxforceHero();
|
||||
}
|
||||
Hero hero = user.getHeroManager().getHeroMap().get(maxforceHero);
|
||||
if(hero==null){
|
||||
throw new ErrorCodeException("试炼节点英雄掉落失败");
|
||||
}
|
||||
Hero hero1 = ExpeditionLogic.createHero(i, uid, hero,-1);
|
||||
drop.addHero(CBean2Proto.getHero(hero1));
|
||||
for(Integer equipId : hero1.getEquipByPositionMap().values()){
|
||||
drop.addEquipId(CBean2Proto.getEquipProto(equipId));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -98,12 +98,12 @@ public class StartExpeditionBattleRequest extends BaseHandler<Expedition.StartEx
|
|||
CommonProto.FightTeamInfo fightTeamInfo = ExpeditionLogic.getFightTeamInfoWithDouble(inMem,teamId,user.getExpeditionManager().getHeroHP());
|
||||
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
|
||||
CommonProto.FightTeamInfo deffightTeamInfo;
|
||||
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||
int tid = deffightInfo.getUid();
|
||||
deffightTeamInfo= ExpeditionLogic.getGropFightTeamInfoWithDouble(tid,nodeInfo.getBossHP()).get(0);
|
||||
}else {
|
||||
// if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||
// int tid = deffightInfo.getUid();
|
||||
// deffightTeamInfo= ExpeditionLogic.getGropFightTeamInfoWithDouble(tid,nodeInfo.getBossHP()).get(0);
|
||||
// }else {
|
||||
deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()),nodeInfo.getBossHP());
|
||||
}
|
||||
// }
|
||||
|
||||
int seed = (int)(System.currentTimeMillis()/1000);
|
||||
String fightInfo = nodeId + "#" +seed+ "#" + teamId;
|
||||
|
|
Loading…
Reference in New Issue