[Desktop] Make ImageFetcher default to fetching card images from magiccards.info.

This commit is contained in:
Myrd
2015-12-29 04:09:13 +00:00
parent 1550a27ee9
commit 8abd786a3a
3 changed files with 47 additions and 16 deletions

View File

@@ -245,6 +245,18 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
}
return tryGetCard(request);
}
public int getCardCollectorNumber(String cardName, String reqEdition) {
CardEdition edition = editions.get(reqEdition);
if (edition == null)
return -1;
for (CardInSet card : edition.getCards()) {
if (card.name.equalsIgnoreCase(cardName)) {
return card.collectorNumber;
}
}
return -1;
}
private PaperCard tryGetCard(CardRequest request) {
Collection<PaperCard> cards = allCardsByName.get(request.cardName);