()
| 7516 | } |
| 7517 | |
| 7518 | public IPaperCard getPaperCard() { |
| 7519 | IPaperCard cp = paperCard; |
| 7520 | if (cp != null) { |
| 7521 | return cp; |
| 7522 | } |
| 7523 | |
| 7524 | final String name = getName(); |
| 7525 | final String set = getSetCode(); |
| 7526 | |
| 7527 | if (StringUtils.isNotBlank(set)) { |
| 7528 | cp = StaticData.instance().getVariantCards().getCard(name, set); |
| 7529 | if (cp != null) { |
| 7530 | return cp; |
| 7531 | } |
| 7532 | cp = StaticData.instance().getCommonCards().getCard(name, set); |
| 7533 | if (cp != null) { |
| 7534 | return cp; |
| 7535 | } |
| 7536 | } |
| 7537 | //no specific set for variant |
| 7538 | cp = StaticData.instance().getVariantCards().getCard(name); |
| 7539 | if (cp != null) { |
| 7540 | return cp; |
| 7541 | } |
| 7542 | //try to get from user preference if available |
| 7543 | CardDb.CardArtPreference cardArtPreference = StaticData.instance().getCardArtPreference(); |
| 7544 | if (cardArtPreference == null) //fallback |
| 7545 | cardArtPreference = CardArtPreference.ORIGINAL_ART_CORE_EXPANSIONS_REPRINT_ONLY; |
| 7546 | cp = StaticData.instance().getCommonCards().getCardFromEditions(name, cardArtPreference); |
| 7547 | if (cp != null) { |
| 7548 | return cp; |
| 7549 | } |
| 7550 | //lastoption |
| 7551 | return StaticData.instance().getCommonCards().getCard(name); |
| 7552 | } |
| 7553 | |
| 7554 | /** |
| 7555 | * Update Card instance for the given PaperCard if any |
no test coverage detected