forked from External/mage
Increased performance function for finding a card in DB with a specific set. Cube from deck (custom cube) now respects chosen set for a given card.
This commit is contained in:
parent
d55c82adf4
commit
8c46f23e02
3 changed files with 20 additions and 6 deletions
|
|
@ -107,11 +107,7 @@ public abstract class DraftCube {
|
|||
if (!cardId.getName().isEmpty()) {
|
||||
CardInfo cardInfo = null;
|
||||
if (!cardId.getExtension().isEmpty()) {
|
||||
CardCriteria criteria = new CardCriteria().name(cardId.getName()).setCodes(cardId.extension);
|
||||
List<CardInfo> cardList = CardRepository.instance.findCards(criteria);
|
||||
if (cardList != null && !cardList.isEmpty()) {
|
||||
cardInfo = cardList.get(0);
|
||||
}
|
||||
cardInfo = CardRepository.instance.findCardWPreferredSet(cardId.getName(), cardId.getExtension(), false);
|
||||
} else {
|
||||
cardInfo = CardRepository.instance.findPreferedCoreExpansionCard(cardId.getName(), false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue