Player holds the deck, emits deckChanged(), other elements player->getDeck() to respond to changes.

Took 37 minutes
This commit is contained in:
Lukas Brübach 2025-09-09 12:28:09 +02:00
parent 57aa1abc69
commit c344b40a71
8 changed files with 61 additions and 41 deletions

View file

@ -743,7 +743,7 @@ void TabGame::loadDeckForLocalPlayer(Player *localPlayer, int playerId, ServerIn
DeckLoader newDeck(QString::fromStdString(playerInfo.deck_list()));
PictureLoader::cacheCardPixmaps(CardDatabaseManager::getInstance()->getCards(newDeck.getCardRefList()));
deckViewContainer->playerDeckView->setDeck(newDeck);
localPlayer->getPlayerInfo()->setDeck(newDeck);
localPlayer->setDeck(newDeck);
}
}