mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
[Desktop] Make ImageFetcher default to fetching card images from magiccards.info.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user