猎妖之路 通关流程修改
parent
93a48fc5f7
commit
3944abddeb
|
@ -100,4 +100,7 @@ public interface GlobalsDef {
|
|||
int RECHARGE_UNLOCK_PRIVILEGE = 4;
|
||||
|
||||
|
||||
//特殊商店id
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -44,8 +44,17 @@ public class GetExpeditionRequestHandler extends BaseHandler<Expedition.GetExped
|
|||
|
||||
User user = UserManager.getUser(iSession.getUid());
|
||||
ExpeditionManager manager = user.getExpeditionManager();
|
||||
if(leve!=manager.getExpeditionLeve()&&(manager.getExpeditionLeve()!=-1)){
|
||||
throw new ErrorCodeException("阶段不正确 current"+manager.getExpeditionLeve());
|
||||
if(leve!=manager.getExpeditionLeve()){
|
||||
if(leve!=manager.getExpeditionLeve()+1&&manager.getExpeditionLeve()!=-1){
|
||||
throw new ErrorCodeException("阶段不正确 current"+manager.getExpeditionLeve());
|
||||
}
|
||||
Map<Integer, ExpeditionNodeInfo> expeditionNodeInfos = manager.getExpeditionNodeInfos();
|
||||
ExpeditionNodeInfo nodeInfo = manager.getExpeditionNodeInfos().get(expeditionNodeInfos.size());
|
||||
//奖励节点未通过
|
||||
if(nodeInfo.getState()!=ExpeditionLogic.NODESTATE_NOT_GET){
|
||||
throw new ErrorCodeException("阶段不正确 current"+manager.getExpeditionLeve()+"上一层奖励节点未通过");
|
||||
}
|
||||
manager.clearExpeditionNodeInfos();
|
||||
}
|
||||
|
||||
SExpeditionSetting sExpeditionSetting = STableManager.getConfig(SExpeditionSetting.class).get(1);
|
||||
|
|
|
@ -104,21 +104,15 @@ public class TakeLayRewardHandler extends BaseHandler<Expedition.TakeExpeditionB
|
|||
int score;
|
||||
if(expeditionManager.getExpeditionLeve()==2){
|
||||
objects.add(3);
|
||||
expeditionManager.setExpeditionLeve(expeditionManager.getExpeditionLeve()+1);
|
||||
// 困难模式开启
|
||||
if(expeditionManager.getPassTimes()==-1||expeditionManager.getPassTimes()>=fourthOpenRule[0][1]||user.getPlayerInfoManager().getMaxForce()>=fourthOpenRule[1][1]){
|
||||
expeditionManager.setExpeditionLeve(-1);
|
||||
expeditionManager.setPassTimes(-1);//记录下
|
||||
objects.add(4);
|
||||
}
|
||||
ExpeditionManager manager = user.getExpeditionManager();
|
||||
manager.clearExpeditionNodeInfos();
|
||||
score= taskScore[1][1];
|
||||
}else if(expeditionManager.getExpeditionLeve()==1){
|
||||
expeditionManager.setExpeditionLeve(expeditionManager.getExpeditionLeve()+1);
|
||||
objects.add(2);
|
||||
ExpeditionManager manager = user.getExpeditionManager();
|
||||
manager.clearExpeditionNodeInfos();
|
||||
score= taskScore[0][1];
|
||||
}else {
|
||||
score= taskScore[2][1];
|
||||
|
|
|
@ -191,8 +191,13 @@ public class ExpeditionLogic {
|
|||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//最后的奖励节点 前端显示跳转入口用
|
||||
if(nodeInfo1.getType()==ExpeditionLogic.NODETYPE_REWARD){
|
||||
nodeInfo1.setState(ExpeditionLogic.NODESTATE_NOT_GET);
|
||||
}
|
||||
|
||||
});
|
||||
//updata lay
|
||||
user.getExpeditionManager().setLay(newlay);
|
||||
|
@ -689,7 +694,7 @@ public class ExpeditionLogic {
|
|||
//返回猎妖之路下一个阶段sortId;
|
||||
public static List<Integer> getNextNodeId(int sortId,int size){
|
||||
LinkedList<Integer> integers= new LinkedList<>();
|
||||
boolean b = sortId >= size - 2;
|
||||
boolean b = sortId >= size - 2;//是否是boss节点 节点从2开始计算
|
||||
if(b){
|
||||
integers.add(sortId+1);
|
||||
return integers;
|
||||
|
|
Loading…
Reference in New Issue