correct how collectorNumber is located

The existing logic will always return the first match for a given card
name, even if there are multiple different printings of the same card
name within a set. This change aligns the collectorNumber with the
alternate art index.

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
This commit is contained in:
Jamin W. Collins
2020-03-03 21:18:38 -07:00
parent e325f42ca8
commit ff31718839
2 changed files with 8 additions and 3 deletions

View File

@@ -50,8 +50,9 @@ public abstract class ImageFetcher {
setDownload.append(ImageUtil.getDownloadUrl(paperCard, backFace));
downloadUrls.add(setDownload.toString());
int artIndex = Integer.parseInt(imageKey.split("\\|")[2]);
final StaticData data = StaticData.instance();
final String cardNum = data.getCommonCards().getCardCollectorNumber(paperCard.getName(), paperCard.getEdition());
final String cardNum = data.getCommonCards().getCardCollectorNumber(paperCard.getName(), paperCard.getEdition(), artIndex);
if (cardNum != null) {
String suffix = "";
if (paperCard.getRules().getOtherPart() != null) {