- A bit more cleanup in the previous fix.

This commit is contained in:
Agetian
2016-02-01 05:41:51 +00:00
parent f28e42efd5
commit f248236469

View File

@@ -704,22 +704,21 @@ public class QuestEventDraft {
public String getName() {
if (edition != null) {
String blockName = "";
if (block == null) {
// try to determine the block name for this edition if it exists
// to avoid situations where the block name would be different from the first set name
// (e.g. Urza vs. Urza's Saga, Masques vs. Mercadian Masques etc.).
// determine the block name if possible (to avoid cases where the block name is different from the first edition,
// e.g. Urza vs. Urza's Saga, Masques vs. Mercadian Masques, Kamigawa vs. Champions of Kamigawa, etc.)
String blockName = "";
for (CardBlock cb : FModel.getBlocks()) {
if (cb.getSets().contains(edition)) {
blockName = cb.getName();
break;
}
}
}
if (!blockName.isEmpty() && blockName != edition.getName()) {
return blockName;
if (!blockName.isEmpty() && blockName != edition.getName()) {
return blockName;
}
}
return edition.getName();