mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- A bit more cleanup in the previous fix.
This commit is contained in:
@@ -704,23 +704,22 @@ public class QuestEventDraft {
|
|||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (edition != null) {
|
if (edition != null) {
|
||||||
String blockName = "";
|
|
||||||
if (block == null) {
|
if (block == null) {
|
||||||
|
// 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 = "";
|
||||||
|
|
||||||
// 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.).
|
|
||||||
for (CardBlock cb : FModel.getBlocks()) {
|
for (CardBlock cb : FModel.getBlocks()) {
|
||||||
if (cb.getSets().contains(edition)) {
|
if (cb.getSets().contains(edition)) {
|
||||||
blockName = cb.getName();
|
blockName = cb.getName();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!blockName.isEmpty() && blockName != edition.getName()) {
|
if (!blockName.isEmpty() && blockName != edition.getName()) {
|
||||||
return blockName;
|
return blockName;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return edition.getName();
|
return edition.getName();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user