合成宝物bug
parent
9d90b6b6bf
commit
252208e6fb
|
@ -781,18 +781,27 @@ public class ItemLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TreeSet<String> getJewelEquipWithLeve(User user, int type, int rance, int leve) {
|
public static TreeSet<String> getJewelEquipWithLeve(User user, int type, int rance, int leve) {
|
||||||
return user.getEquipManager().getEquipMap().entrySet().stream().filter(stringEquipEntry ->
|
TreeSet<String> strings = new TreeSet<>();
|
||||||
StringUtil.isEmpty(stringEquipEntry.getValue().getHeroId())
|
for (Map.Entry<String, PropertyItem> stringPropertyItemEntry : user.getEquipManager().getEquipMap().entrySet()) {
|
||||||
).filter(stringPropertyItemEntry -> stringPropertyItemEntry.getValue() instanceof Jewel).filter(stringPropertyItemEntry -> {
|
|
||||||
if (((Jewel) stringPropertyItemEntry.getValue()).getBuildLevel() != 0 || stringPropertyItemEntry.getValue().getLevel() != 0) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(stringPropertyItemEntry.getValue().getEquipId());
|
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(stringPropertyItemEntry.getValue().getEquipId());
|
||||||
if (config == null) {
|
if (config == null) {
|
||||||
return false;
|
continue;
|
||||||
}
|
}
|
||||||
return config.getLocation() == type && config.getRace() == rance && config.getLevel() == leve;
|
if (config.getLocation() != type || config.getRace() != rance || config.getLevel() != leve) {
|
||||||
}).map(Map.Entry::getKey).collect(Collectors.toCollection(TreeSet::new));
|
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