fix deck loading problem (wrong editions were shown)

This commit is contained in:
Maxmtg
2014-01-25 21:30:56 +00:00
parent dbf77d8548
commit dfebb08e1e
5 changed files with 26 additions and 15 deletions

View File

@@ -162,11 +162,11 @@ public class CEditorDraftingProcess extends ACEditorBase<PaperCard, DeckGroup> {
final int numArt = Singletons.getMagicDb().getCommonCards().getArtCount(landName, landSet);
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
for (int i = 0; i < numArt; i++) {
for (int i = 1; i <= numArt; i++) {
deck.get(DeckSection.Sideboard).add(landName, landSet, i, numArt > 1 ? landsCount : 30);
}
} else {
deck.get(DeckSection.Sideboard).add(landName, landSet, numArt > 1 ? MyRandom.getRandom().nextInt(numArt) : 0, 30);
deck.get(DeckSection.Sideboard).add(landName, landSet, 30);
}
}

View File

@@ -178,11 +178,11 @@ public enum CSubmenuSealed implements ICDoc {
final int numArt = Singletons.getMagicDb().getCommonCards().getArtCount(element, sd.getLandSetCode());
if (Singletons.getModel().getPreferences().getPrefBoolean(FPref.UI_RANDOM_ART_IN_POOLS)) {
for (int i = 0; i < numArt; i++) {
for (int i = 1; i <= numArt; i++) {
deck.get(DeckSection.Sideboard).add(element, sd.getLandSetCode(), i, numArt > 1 ? landsCount : 30);
}
} else {
deck.get(DeckSection.Sideboard).add(element, sd.getLandSetCode(), numArt > 1 ? MyRandom.getRandom().nextInt(numArt) : 0, 30);
deck.get(DeckSection.Sideboard).add(element, sd.getLandSetCode(), 30);
}
}