Refactor: removed server side objects from a client side game's data (#10788)

* Clean original values transmitted with CardView.originalObject
* Move RateCard to mage.Common, support cardView as argument.
* Clean PermanentView constructor for TestCardRenderDialog
This commit is contained in:
Susucre 2023-08-24 10:04:07 +02:00 committed by GitHub
parent ba411e0054
commit 5062c84098
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 285 additions and 149 deletions

View file

@ -28,7 +28,6 @@ import mage.game.command.Plane;
import mage.game.match.MatchType;
import mage.game.mulligan.Mulligan;
import mage.game.mulligan.MulliganType;
import mage.game.permanent.Permanent;
import mage.game.permanent.PermanentCard;
import mage.game.permanent.PermanentMeld;
import mage.game.permanent.PermanentToken;
@ -402,9 +401,9 @@ public class TestCardRenderDialog extends MageDialog {
if (main.getGameCard() instanceof PermanentView) {
// new settings must be as a new copy -- it would activate the animations
PermanentView oldPermanent = (PermanentView) main.getGameCard();
PermanentView newPermament = new PermanentView( // ???
(Permanent) oldPermanent.getOriginalCard(),
game.getCard(oldPermanent.getOriginalCard().getId()),
PermanentView newPermament = new PermanentView(
oldPermanent,
game.getCard(oldPermanent.getOriginalId()),
UUID.randomUUID(),
game
);