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

back_recharge
zhangshanxue 2020-02-20 09:34:08 +08:00
parent 44c00e9fcb
commit 4afff38ff3
3 changed files with 7 additions and 8 deletions

View File

@ -74,7 +74,7 @@ public abstract class BaseHandler<T extends GeneratedMessage> {
@SuppressWarnings("unchecked")
private boolean getTClassIsNull() {
Type superClass = this.getClass().getGenericSuperclass();
if (superClass instanceof ParameterizedType) {
if (superClass instanceof ParameterizedType) {//带<>的类型
ParameterizedType parameterizedType = (ParameterizedType) superClass;
protoClazz = (Class<T>) parameterizedType.getActualTypeArguments()[0];
return null == protoClazz;

View File

@ -86,7 +86,7 @@ public class EndExpeditionBattleRequest extends BaseHandler<Expedition.EndExpedi
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
//TODO 添加被动技能
//添加被动技能
ExpeditionManager expeditionManager = user.getExpeditionManager();
Set<SExpeditionHolyConfig> expeditionHolyConfigs = ExpeditionLogic.getFirstRankHoly(expeditionManager);

View File

@ -197,7 +197,7 @@ public class ExpeditionLogic {
*/
private void reSetNode(User user) throws Exception {
//创建节点数据
//创建节点束河
Set<ExpeditionNodeInfo> nodeSets = createNodeSet();
//存储并设置英雄快照
@ -214,13 +214,12 @@ public class ExpeditionLogic {
int minFoce = sExpeditionSetting.getMatchForce()[0];
int manFoce = sExpeditionSetting.getMatchForce()[1];
int standerFoce = (int) (user.getExpeditionManager().getForceSnap() * (minFoce / 10000f) + nodeInfo.getLay() / size * (manFoce - minFoce));
int randomForce = (int) (standerFoce * ((sExpeditionSetting.getMatchForceRange()[0] + (int) (Math.random() * (sExpeditionSetting.getMatchForceRange()[1] - sExpeditionSetting.getMatchForceRange()[0]))) / 10000f));
float randomForce = (standerFoce * ((sExpeditionSetting.getMatchForceRange()[0] + (int) (Math.random() * (sExpeditionSetting.getMatchForceRange()[1] - sExpeditionSetting.getMatchForceRange()[0]))) / 10000f));
//TODO 战斗节点 不同类型 额外战力加成 走配置
if(nodeInfo.getType()==NODETYPE_ADVANCE){
randomForce+=1000;
randomForce*=(sExpeditionSetting.getPowerfulForce()[1][1]/10000f+1);
}else if(nodeInfo.getType()==NODETYPE_BOSS){
randomForce+=3000;
randomForce*=(sExpeditionSetting.getPowerfulForce()[2][1]/10000f+1);
}
Set<ZSetOperations.TypedTuple<String>> typedTuples = RedisUtil.getInstence().rangeByScoreWithScores(RedisKey.AREDEF_TEAM_FORCE_RANK, "", 0, randomForce);
@ -232,7 +231,7 @@ public class ExpeditionLogic {
//// }
// int robotId = set.iterator().next();
//提前战力排序 支持战力查找机器人
int robotId= SArenaRobotStaticConfig.getFloorForce2robotId(randomForce);
int robotId= SArenaRobotStaticConfig.getFloorForce2robotId((int)randomForce);
SArenaRobotConfig sArenaRobotConfig = SArenaRobotConfig.getsArenaRobotConfigById(robotId);
snapOneFightInfo(nodeInfo, sArenaRobotConfig);
} else {