[Mobile] preload ItemPool and fix Planar Conquest new game

This commit is contained in:
Anthony Calosa
2021-04-01 02:34:14 +08:00
parent d9571f3c4d
commit c0af1fa1eb
4 changed files with 36 additions and 7 deletions

View File

@@ -282,7 +282,10 @@ public final class CardDb implements ICardDatabase, IDeckGenPool {
private void reIndex() {
uniqueCardsByName.clear();
for (Entry<String, Collection<PaperCard>> kv : getAllCardsByName().asMap().entrySet()) {
uniqueCardsByName.put(kv.getKey(), getFirstWithImage(kv.getValue()));
PaperCard pc = getFirstWithImage(kv.getValue());
if (!loadNonLegalCards && (editions.get(pc.getEdition()).getType() == CardEdition.Type.FUNNY || editions.get(pc.getEdition()).getBorderColor() == CardEdition.BorderColor.SILVER))
continue;
uniqueCardsByName.put(kv.getKey(), pc);
}
}