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):"";
|
String holySkill = passiveSkillResult.length()!=0?passiveSkillResult.substring(0,passiveSkillResult.length()-1):"";
|
||||||
|
|
||||||
LuaValue getFightData;
|
LuaValue getFightData;
|
||||||
if(ExpeditionLogic.isHardNode(nodeInfo.getType())){
|
// if(ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()){
|
||||||
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);
|
||||||
}else {
|
// }else {
|
||||||
CommonProto.FightTeamInfo deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()+holySkill),nodeInfo.getBossHP());
|
CommonProto.FightTeamInfo deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()+holySkill),nodeInfo.getBossHP());
|
||||||
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
||||||
}
|
// }
|
||||||
|
|
||||||
LuaValue getOptionData = FightDataUtil.getOptionData(uid+"");
|
LuaValue getOptionData = FightDataUtil.getOptionData(uid+"");
|
||||||
int[] checkResult = CheckFight.getInstance().checkFight(seed, maxTime, getFightData, getOptionData, GameFightType.Expediton.getFightType());
|
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 (resultCode != 1) {
|
||||||
|
|
||||||
if (nodeInfo.getType() == ExpeditionLogic.NODETYPE_GREED) {
|
if (ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()) {
|
||||||
//贪婪节点只有1次战斗机会,若战斗失败后敌人将会逃走,玩家视为通过此节点
|
//贪婪节点只有1次战斗机会,若战斗失败后敌人将会逃走,玩家视为通过此节点
|
||||||
//updata node
|
//updata node
|
||||||
Set<CommonProto.ExpeditionNodeInfo> nodeInfos = ExpeditionLogic.openLay(user,nodeInfo.getLay(),nodeId);
|
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<>());
|
user.getTeamPosManager().updateTeamPosByTeamId(1001,new LinkedList<>());
|
||||||
|
|
||||||
if(ExpeditionLogic.isHardNode(nodeInfo.getType())){
|
if(ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()){
|
||||||
//节点血量更新
|
//节点血量更新
|
||||||
|
|
||||||
// nodeInfo.getSnapFightInfo().getHeroAttribute().forEach((s, familyHeroInfo) ->
|
// nodeInfo.getSnapFightInfo().getHeroAttribute().forEach((s, familyHeroInfo) ->
|
||||||
|
@ -270,11 +270,7 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
||||||
|
|
||||||
if(nodeInfo.getType() == ExpeditionLogic.NODETYPE_TRY){
|
if(nodeInfo.getType() == ExpeditionLogic.NODETYPE_TRY){
|
||||||
//create Hero
|
//create Hero
|
||||||
int poolId = sExpeditionNodeConfig.getPoolId();
|
int i = nodeInfo.getSnapFightInfo().getUid();
|
||||||
int tempId =ExpeditionLogic.getRandomTid(poolId,1).first();
|
|
||||||
SExpeditionRecruitConfig sExpeditionRecruitConfig = STableManager.getConfig(SExpeditionRecruitConfig.class).get(tempId);
|
|
||||||
if(sExpeditionRecruitConfig!=null){
|
|
||||||
int i = sExpeditionRecruitConfig.getHeroId();
|
|
||||||
//获取最大战力hero
|
//获取最大战力hero
|
||||||
String maxforceHero = user.getPlayerInfoManager().getMaxforceHero();
|
String maxforceHero = user.getPlayerInfoManager().getMaxforceHero();
|
||||||
if(StringUtil.isEmpty(maxforceHero)){
|
if(StringUtil.isEmpty(maxforceHero)){
|
||||||
|
@ -290,7 +286,6 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
|
||||||
for(Integer equipId : hero1.getEquipByPositionMap().values()){
|
for(Integer equipId : hero1.getEquipByPositionMap().values()){
|
||||||
drop.addEquipId(CBean2Proto.getEquipProto(equipId));
|
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());
|
CommonProto.FightTeamInfo fightTeamInfo = ExpeditionLogic.getFightTeamInfoWithDouble(inMem,teamId,user.getExpeditionManager().getHeroHP());
|
||||||
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
|
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
|
||||||
CommonProto.FightTeamInfo deffightTeamInfo;
|
CommonProto.FightTeamInfo deffightTeamInfo;
|
||||||
if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
// if(nodeInfo.getType()==ExpeditionLogic.NODETYPE_GREED){
|
||||||
int tid = deffightInfo.getUid();
|
// int tid = deffightInfo.getUid();
|
||||||
deffightTeamInfo= ExpeditionLogic.getGropFightTeamInfoWithDouble(tid,nodeInfo.getBossHP()).get(0);
|
// deffightTeamInfo= ExpeditionLogic.getGropFightTeamInfoWithDouble(tid,nodeInfo.getBossHP()).get(0);
|
||||||
}else {
|
// }else {
|
||||||
deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()),nodeInfo.getBossHP());
|
deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()),nodeInfo.getBossHP());
|
||||||
}
|
// }
|
||||||
|
|
||||||
int seed = (int)(System.currentTimeMillis()/1000);
|
int seed = (int)(System.currentTimeMillis()/1000);
|
||||||
String fightInfo = nodeId + "#" +seed+ "#" + teamId;
|
String fightInfo = nodeId + "#" +seed+ "#" + teamId;
|
||||||
|
|
Loading…
Reference in New Issue