mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
QuestMode crashed with old decks (no difficulty and displayname metadata in dck files), doesn't crash now at least.
This commit is contained in:
@@ -7,6 +7,8 @@ import forge.quest.data.QuestEvent;
|
|||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -63,13 +65,12 @@ public class QuestBattle extends QuestSelectablePanel {
|
|||||||
|
|
||||||
ImageIcon icon;
|
ImageIcon icon;
|
||||||
// If non-default icon defined, use it
|
// If non-default icon defined, use it
|
||||||
if(oppIconAddress.equals("")) {
|
if (StringUtils.isBlank(oppIconAddress)) {
|
||||||
icon = GuiUtils.getIconFromFile(oppName + ".jpg");
|
icon = GuiUtils.getIconFromFile(oppName + ".jpg");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
icon = GuiUtils.getIconFromFile(oppIconAddress + ".jpg");
|
icon = GuiUtils.getIconFromFile(oppIconAddress + ".jpg");
|
||||||
|
|
||||||
|
|
||||||
// Add to list of current quest opponents.
|
// Add to list of current quest opponents.
|
||||||
opponentList.add(
|
opponentList.add(
|
||||||
new QuestBattle(oppName, oppDeckName, oppDiff, oppDesc, icon)
|
new QuestBattle(oppName, oppDeckName, oppDiff, oppDesc, icon)
|
||||||
|
|||||||
Reference in New Issue
Block a user