Fixed issue #841 related to SubclassSelect showing subclasses despite not having the required level.

This commit is contained in:
Ka0rX 2023-05-29 09:21:13 +01:00
parent ddf041aa30
commit 0f1ced9744

View File

@ -93,7 +93,12 @@ public class SubclassSelect extends EditableInventory {
@Override
public boolean canDisplay(SubclassSelectionInventory inv) {
return inv.getPlayerData().getProfess().hasSubclass(playerClass);
return inv.getPlayerData()
.getProfess()
.getSubclasses()
.stream()
.anyMatch(subclass -> subclass.getLevel() <= inv.getPlayerData().getLevel()
&& subclass.getProfess().getId().equals(playerClass.getId()));
}
}