Task【ID1005460】【玩法需求】猎妖之路

back_recharge
zhangshanxue 2020-02-17 18:19:29 +08:00
parent 624282c742
commit f3e27888ee
2 changed files with 9 additions and 3 deletions

View File

@ -73,14 +73,14 @@ public class StartExpeditionBattleRequest extends BaseHandler<Expedition.StartEx
if (nodeInfo1.getLay() != nodeInfo.getLay()) {
return;
}
CommonProto.ExpeditionNodeInfo.Builder build = CommonProto.ExpeditionNodeInfo.newBuilder()
.setSortId(nodeInfo1.getSortId())
.setState(nodeInfo1.getState());
if (nodeInfo1.getSortId() != nodeId) {
nodeInfo1.setState(ExpeditionLogic.NODESTATE_CLOSE);
}else {
return;
}
CommonProto.ExpeditionNodeInfo.Builder build = CommonProto.ExpeditionNodeInfo.newBuilder()
.setSortId(nodeInfo1.getSortId())
.setState(nodeInfo1.getState());
nodeInfos.add(build.build());
});
//更新节点

View File

@ -210,6 +210,12 @@ public class ExpeditionLogic {
int standerFoce = (int) (user.getExpeditionManager().getForceSnap() * (minFoce / 10000f) + nodeInfo.getLay() / size * (manFoce - minFoce) / 10000f);
int randomForce = (int) (standerFoce * ((sExpeditionSetting.getMatchForceRange()[0] + (int) (Math.random() * (sExpeditionSetting.getMatchForceRange()[1] - sExpeditionSetting.getMatchForceRange()[0]))) / 10000f));
//TODO 战斗节点 不同类型 额外战力加成 走配置
if(nodeInfo.getType()==NODETYPE_ADVANCE){
randomForce+=1000;
}else if(nodeInfo.getType()==NODETYPE_BOSS){
randomForce+=3000;
}
Set<ZSetOperations.TypedTuple<String>> typedTuples = RedisUtil.getInstence().rangeByScoreWithScores(RedisKey.AREDEF_TEAM_FORCE_RANK, "", 0, randomForce);
if (typedTuples.size() == 0) {