猎妖数据过大
parent
9f8c1006e2
commit
6d4134f2b1
|
|
@ -144,7 +144,11 @@ public class ExpeditionLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//移除已经删除的hero
|
//移除已经删除的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);
|
removeId.forEach(heroHP::remove);
|
||||||
Set<CommonProto.ExpeditionSimpleHeroInfo> heroInfoSet = new HashSet<>();
|
Set<CommonProto.ExpeditionSimpleHeroInfo> heroInfoSet = new HashSet<>();
|
||||||
for (Map.Entry<String, Double> entry : heroHP.entrySet()) {
|
for (Map.Entry<String, Double> entry : heroHP.entrySet()) {
|
||||||
|
|
@ -214,7 +218,7 @@ public class ExpeditionLogic {
|
||||||
}
|
}
|
||||||
int minFoce = sExpeditionSetting.getMatchForce()[0];
|
int minFoce = sExpeditionSetting.getMatchForce()[0];
|
||||||
int manFoce = sExpeditionSetting.getMatchForce()[1];
|
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));
|
float randomForce = (standerFoce * ((sExpeditionSetting.getMatchForceRange()[0] + (int) (Math.random() * (sExpeditionSetting.getMatchForceRange()[1] - sExpeditionSetting.getMatchForceRange()[0]))) / 10000f));
|
||||||
|
|
||||||
if(nodeInfo.getType()==NODETYPE_ADVANCE){
|
if(nodeInfo.getType()==NODETYPE_ADVANCE){
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue