Fix card attributes being set to the wrong card; fix #2332 #2650
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Ticket(s)
Short roundup of the initial problem
If a card changed owner while being put on the table, its attributes could be set on the wrong card.
What will change with this Pull Request?
Fix the problem
I've been able to reproduce a card collision id and check that the attributes are now set to the correct card:
game log
I've created a "Arlinn Kord (emblem)" token with card_id = 75
Then, put a "Goblin Rabblemaster" on the stack, card_id = 6
Then moved the goblin from the stack to the opponent's table; the goblin received a new card id of 75, colliding with the token
The 2/2 PT has been assigned correctly to the Goblin (player_id: 1, zone_name: table, card_id: 75) instead of the token (player_id: 0, zone_name: table, card_id: 75)
Note: this is a server side change