mirror of
https://github.com/magefree/mage.git
synced 2026-01-24 20:29:19 -08:00
Fix for Random booster draft iterates endless while booster generation (#1136)
This commit is contained in:
parent
b029de3ec9
commit
84d2353819
3 changed files with 8 additions and 14 deletions
|
|
@ -84,7 +84,8 @@ public class DragonsMaze extends ExpansionSet {
|
|||
savedCardsInfos = CardRepository.instance.findCards(criteria);
|
||||
savedCards.put(rarity, savedCardsInfos);
|
||||
}
|
||||
return savedCardsInfos;
|
||||
// Return a copy of the saved cards information, as not to modify the original.
|
||||
return new ArrayList<>(savedCardsInfos);
|
||||
} else {
|
||||
return super.getCardsByRarity(rarity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,9 +81,8 @@ public class FateReforged extends ExpansionSet {
|
|||
savedCardsInfos = CardRepository.instance.findCards(criteria);
|
||||
savedCards.put(rarity, savedCardsInfos);
|
||||
}
|
||||
List<CardInfo> cards = new ArrayList<>();
|
||||
cards.addAll(savedCardsInfos);
|
||||
return cards;
|
||||
// Return a copy of the saved cards information, as not to modify the original.
|
||||
return new ArrayList<>(savedCardsInfos);
|
||||
} else {
|
||||
return super.getCardsByRarity(rarity);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue