Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dont create dummy card infos for unkown cards #3708

Merged
merged 1 commit into from
May 5, 2019

Conversation

ctrlaltca
Copy link
Contributor

Related Ticket(s)

Short roundup of the initial problem

The change in #3589 added the ability to retrieve a card picture even if the card is not present in the card database, by creating an empty card info (aka a card database entry) for these cards.
A good use case is during a game, when we receive from the server a card name of a card that another player put on the game but that is not present in our card database.
We can still create a dummy card info with just the card name and try to get a picture for it.
Unfortunately the empty card info is created also for card that are unknown "by design", eg. facedown cards in a player's deck. These cards can be easily recognized by the fact that they have no name and a server id of -1.

What will change with this Pull Request?

The dummy card info won't be created if the name is empty.
This restores the old behavior where the card back is shown.

Copy link
Member

@ebbit1q ebbit1q left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and simple fix.

@ctrlaltca ctrlaltca merged commit 95d6efc into Cockatrice:master May 5, 2019
@ctrlaltca ctrlaltca deleted the cardinfos branch May 5, 2019 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Card image display goes blank when mouse crosses the library
2 participants