mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Merge pull request #3048 from kevlahnota/newmaster2
try to fix older gauntlet/tournament saves.
This commit is contained in:
@@ -213,7 +213,11 @@ public class GauntletIO {
|
||||
final boolean foil = "1".equals(reader.getAttribute("foil"));
|
||||
PaperCard card = FModel.getMagicDb().getOrLoadCommonCard(name, set, index, foil);
|
||||
if (null == card) {
|
||||
throw new RuntimeException("Unsupported card found in gauntlet save: " + name + " from edition " + set);
|
||||
//get same replacement card from any edition due to Edition updates/changes if it exists (ie Ugin, the Ineffable from edition PSLD, Mana Crypt from edition FS, Timeless Lotus from edition ???).
|
||||
card = FModel.getMagicDb().getCommonCards().getCard(name);
|
||||
if (card == null) //if the card is not found, notify via log instead of crashing
|
||||
System.err.println("Warning: Unsupported card found in gauntlet save: " + name + " from edition " + set +". It will be removed from the gauntlet save.");
|
||||
//throw new RuntimeException("Unsupported card found in gauntlet save: " + name + " from edition " + set);
|
||||
}
|
||||
return card;
|
||||
}
|
||||
|
||||
@@ -188,7 +188,11 @@ public class TournamentIO {
|
||||
final boolean foil = "1".equals(reader.getAttribute("foil"));
|
||||
PaperCard card = FModel.getMagicDb().getOrLoadCommonCard(name, set, index, foil);
|
||||
if (null == card) {
|
||||
throw new RuntimeException("Unsupported card found in quest save: " + name + " from edition " + set);
|
||||
//get same replacement card from any edition due to Edition updates/changes if it exists (ie Ugin, the Ineffable from edition PSLD, Mana Crypt from edition FS, Timeless Lotus from edition ???).
|
||||
card = FModel.getMagicDb().getCommonCards().getCard(name);
|
||||
if (card == null) //if the card is not found, notify via log instead of crashing
|
||||
System.err.println("Warning: Unsupported card found in quest save: " + name + " from edition " + set +". It will be removed from the quest save.");
|
||||
//throw new RuntimeException("Unsupported card found in quest save: " + name + " from edition " + set);
|
||||
}
|
||||
return card;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user