mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 09:04:53 -07:00
Cache correct providerId cards on deck load (#5668)
* Implement new method for DeckList to return cardlist with providerId, a new carddatabase method to fetch a cardlist with name and providerId and changed PictureLoader to use providerId versions of cards for caching. --------- Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
parent
7ff43f15fc
commit
3620664a9f
7 changed files with 41 additions and 5 deletions
|
|
@ -929,8 +929,8 @@ void TabGame::eventGameStateChanged(const Event_GameStateChanged &event,
|
|||
DeckViewContainer *deckViewContainer = deckViewContainers.value(playerId);
|
||||
if (playerInfo.has_deck_list()) {
|
||||
DeckLoader newDeck(QString::fromStdString(playerInfo.deck_list()));
|
||||
PictureLoader::cacheCardPixmaps(
|
||||
CardDatabaseManager::getInstance()->getCards(newDeck.getCardList()));
|
||||
PictureLoader::cacheCardPixmaps(CardDatabaseManager::getInstance()->getCardsByNameAndProviderId(
|
||||
newDeck.getCardListWithProviderId()));
|
||||
deckViewContainer->setDeck(newDeck);
|
||||
player->setDeck(newDeck);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue