Page 1 of 1

Foil effect not shown on opened packs

PostPosted: 02 Jul 2017, 14:04
by Seravy
I've investigated this problem.

In short, these views use CardPicturePanel, which seems to fetch the image for a card (generic) instead of a card (inventory item).

The relevant part of the code looks like this (in CardPicturePanel.java):
Code: Select all
      if (displayed instanceof InventoryItem) {
            final InventoryItem item = (InventoryItem) displayed;
            return ImageCache.getOriginalImage(item.getImageKey(false), true);
        }
To fix the problem, the return value should be changed to contain a foil image of the card when applicable.

Unfortunately, I have no idea how to add the foil effect to the image, but at least I know where it goes now.

The other possible solution I see is replacing CardPicturePanel with a different class that displays cards, one that already supports foils. One such class I found is CardPanel, but I don't know the correct parameters to use it, or if it can even be used outside of a match.