|
@@ -34,7 +34,7 @@ class SpellMenu extends JPopupMenu {
|
|
|
mntmCast.addActionListener(e -> {
|
|
mntmCast.addActionListener(e -> {
|
|
|
final DDSpellbook book = dclass.getSpellBook().get();
|
|
final DDSpellbook book = dclass.getSpellBook().get();
|
|
|
if (book.numSpellsPerDayRemainingAtLevel(spellLevel) == 0) {
|
|
if (book.numSpellsPerDayRemainingAtLevel(spellLevel) == 0) {
|
|
|
- JOptionPane.showMessageDialog(null, "Cannot cast any more spells");
|
|
|
|
|
|
|
+ JOptionPane.showMessageDialog(this, "Cannot cast any more spells", "Error", JOptionPane.ERROR_MESSAGE);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
book.castSpell(spellLevel, spell);
|
|
book.castSpell(spellLevel, spell);
|