mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 06:22:15 -07:00
Clean up getCardFromSameSet.
Took 2 minutes
This commit is contained in:
parent
d79c94e60f
commit
e28e300612
1 changed files with 3 additions and 7 deletions
|
|
@ -334,14 +334,10 @@ ExactCard CardDatabase::getCardFromSameSet(const QString &cardName, const Printi
|
|||
|
||||
// The source card does have a printing defined, which means we can attempt to get a card from the same set.
|
||||
PrintingInfo relatedPrinting = getSpecificPrinting(cardName, otherPrinting.getSet()->getCorrectedShortName(), "");
|
||||
ExactCard relatedCard = ExactCard(guessCard({cardName}).getCardPtr(), relatedPrinting);
|
||||
ExactCard relatedCard(guessCard({cardName}).getCardPtr(), relatedPrinting);
|
||||
|
||||
// We didn't find a card from the same set, just try to find any card with the same name.
|
||||
if (!relatedCard) {
|
||||
return getCard({cardName});
|
||||
}
|
||||
|
||||
return relatedCard;
|
||||
// If we didn't find a card from the same set, just try to find any card with the same name.
|
||||
return relatedCard ? relatedCard : getCard({cardName});
|
||||
}
|
||||
|
||||
CardSetPtr CardDatabase::getSet(const QString &setName)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue