forked from Upstream/mmocore
Fixed issue #841 related to SubclassSelect showing subclasses despite not having the required level.
This commit is contained in:
parent
ddf041aa30
commit
0f1ced9744
@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user