forked from External/mage
[CardRepository] replaced Sets.findCard(setCode, cardNum)
This commit is contained in:
parent
8d83251428
commit
271aaab5fd
2 changed files with 5 additions and 20 deletions
|
|
@ -28,7 +28,9 @@
|
|||
|
||||
package mage.client.util;
|
||||
|
||||
import mage.sets.Sets;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.view.CardView;
|
||||
import mage.view.CardsView;
|
||||
import mage.view.SimpleCardView;
|
||||
|
|
@ -44,9 +46,9 @@ public class CardsViewUtil {
|
|||
CardsView cards = new CardsView();
|
||||
|
||||
for (SimpleCardView simple: view.values()) {
|
||||
mage.cards.Card card = Sets.findCard(simple.getExpansionSetCode(), simple.getCardNumber());
|
||||
CardInfo cardInfo = CardRepository.instance.findCard(simple.getExpansionSetCode(), simple.getCardNumber());
|
||||
Card card = cardInfo != null ? cardInfo.getCard() : null;
|
||||
if (card != null) {
|
||||
|
||||
cards.put(simple.getId(), new CardView(card, simple.getId()));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue