In-game downloading Part 6:

1) add Quest pet token image downloading to GuiDownloadQuestImages
(still a work in progress)
This commit is contained in:
slapshot5
2011-10-24 05:26:46 +00:00
parent f9868f6c38
commit e88d5d495b
5 changed files with 36 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ public class GuiDownloadQuestImages extends GuiDownloader {
DownloadObject[] questOpponents = readFile(QUEST.OPPONENT_ICONS, ForgeProps.getFile(QUEST.OPPONENT_DIR));
DownloadObject[] boosterImages = readFile(PICS_BOOSTER_IMAGES, ForgeProps.getFile(PICS_BOOSTER));
DownloadObject[] petIcons = readFileWithNames(QUEST.PET_SHOP_ICONS, ForgeProps.getFile(IMAGE_ICON));
DownloadObject[] questPets = readFileWithNames(QUEST.PET_TOKEN_IMAGES, ForgeProps.getFile(IMAGE_TOKEN));
ArrayList<DownloadObject> urls = new ArrayList<DownloadObject>();
File file;
@@ -65,6 +66,14 @@ public class GuiDownloadQuestImages extends GuiDownloader {
urls.add(petIcons[i]);
}
}
dir = ForgeProps.getFile(IMAGE_TOKEN);
for (int i = 0; i < questPets.length; i++) {
file = new File(dir, questPets[i].name.replace("%20", " "));
if (!file.exists()) {
urls.add(questPets[i]);
}
}
//return all card names and urls that are needed
DownloadObject[] out = new DownloadObject[urls.size()];

View File

@@ -165,6 +165,8 @@ public interface NewConstants {
String OPPONENT_DIR = "image/icon";
String PET_SHOP_ICONS = "quest/pet/icons";
String PET_TOKEN_IMAGES = "quest/pet/tokens";
}
/**