mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-15 06:52:15 -07:00
Refactor out db queries from card db.
Took 42 minutes
This commit is contained in:
parent
141bb90011
commit
bc3de7c471
42 changed files with 468 additions and 431 deletions
|
|
@ -71,7 +71,7 @@ void DeckStatsInterface::analyzeDeck(DeckList *deck)
|
|||
void DeckStatsInterface::copyDeckWithoutTokens(DeckList &source, DeckList &destination)
|
||||
{
|
||||
auto copyIfNotAToken = [this, &destination](const auto node, const auto card) {
|
||||
CardInfoPtr dbCard = cardDatabase.getCardInfo(card->getName());
|
||||
CardInfoPtr dbCard = cardDatabase.query()->getCardInfo(card->getName());
|
||||
if (dbCard && !dbCard->getIsToken()) {
|
||||
DecklistCardNode *addedCard = destination.addCard(card->getName(), node->getName(), -1);
|
||||
addedCard->setNumber(card->getNumber());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue