Merge branch 'master_prb_gn' into master_test_gn
commit
8a5712fdb2
|
@ -781,18 +781,27 @@ public class ItemLogic {
|
|||
}
|
||||
|
||||
public static TreeSet<String> getJewelEquipWithLeve(User user, int type, int rance, int leve) {
|
||||
return user.getEquipManager().getEquipMap().entrySet().stream().filter(stringEquipEntry ->
|
||||
StringUtil.isEmpty(stringEquipEntry.getValue().getHeroId())
|
||||
).filter(stringPropertyItemEntry -> stringPropertyItemEntry.getValue() instanceof Jewel).filter(stringPropertyItemEntry -> {
|
||||
if (((Jewel) stringPropertyItemEntry.getValue()).getBuildLevel() != 0 || stringPropertyItemEntry.getValue().getLevel() != 0) {
|
||||
return false;
|
||||
}
|
||||
TreeSet<String> strings = new TreeSet<>();
|
||||
for (Map.Entry<String, PropertyItem> stringPropertyItemEntry : user.getEquipManager().getEquipMap().entrySet()) {
|
||||
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(stringPropertyItemEntry.getValue().getEquipId());
|
||||
if (config == null) {
|
||||
return false;
|
||||
continue;
|
||||
}
|
||||
return config.getLocation() == type && config.getRace() == rance && config.getLevel() == leve;
|
||||
}).map(Map.Entry::getKey).collect(Collectors.toCollection(TreeSet::new));
|
||||
if (config.getLocation() != type || config.getRace() != rance || config.getLevel() != leve) {
|
||||
continue;
|
||||
}
|
||||
if (!StringUtil.isEmpty(stringPropertyItemEntry.getValue().getHeroId())) {
|
||||
Hero hero = user.getHeroManager().getHero(stringPropertyItemEntry.getValue().getHeroId());
|
||||
if (hero != null && hero.getJewelInfo().contains(stringPropertyItemEntry.getKey())) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (((Jewel) stringPropertyItemEntry.getValue()).getBuildLevel() != 0 || stringPropertyItemEntry.getValue().getLevel() != 0) {
|
||||
continue;
|
||||
}
|
||||
strings.add(stringPropertyItemEntry.getValue().getId());
|
||||
}
|
||||
return strings;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue