猎妖数据过大

back_recharge
zhangshanxue 2020-03-17 17:12:46 +08:00
parent 9f8c1006e2
commit 6d4134f2b1
1 changed files with 6 additions and 2 deletions

View File

@ -144,7 +144,11 @@ public class ExpeditionLogic {
}
}
//移除已经删除的hero
Set<String> removeId = heroHP.keySet().stream().filter(k -> !heroMap.keySet().contains(k)).collect(Collectors.toSet());
Set<String> removeId = heroHP.keySet().stream().filter(k -> {
if(!heroMap.keySet().contains(k))
return true;
return heroMap.get(k).getLevel()<20;
}).collect(Collectors.toSet());
removeId.forEach(heroHP::remove);
Set<CommonProto.ExpeditionSimpleHeroInfo> heroInfoSet = new HashSet<>();
for (Map.Entry<String, Double> entry : heroHP.entrySet()) {
@ -214,7 +218,7 @@ public class ExpeditionLogic {
}
int minFoce = sExpeditionSetting.getMatchForce()[0];
int manFoce = sExpeditionSetting.getMatchForce()[1];
int standerFoce = (int) (user.getPlayerInfoManager().getMaxForce() * (minFoce / 10000f) + nodeInfo.getLay() / size * (manFoce - minFoce));
int standerFoce = (int) (user.getPlayerInfoManager().getMaxForce() * ((minFoce / 10000f) + ((float) nodeInfo.getLay()) / size * ((float) (manFoce - minFoce)/10000f)));
float randomForce = (standerFoce * ((sExpeditionSetting.getMatchForceRange()[0] + (int) (Math.random() * (sExpeditionSetting.getMatchForceRange()[1] - sExpeditionSetting.getMatchForceRange()[0]))) / 10000f));
if(nodeInfo.getType()==NODETYPE_ADVANCE){