diff --git a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java index 1ff47e10a24..b4eb379e814 100644 --- a/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java +++ b/Mage.Client/src/main/java/mage/client/plugins/adapters/MageActionCallback.java @@ -102,7 +102,7 @@ public class MageActionCallback implements ActionCallback { Point parent = SwingUtilities.getRoot(data.component).getLocationOnScreen(); Point me = new Point(data.locationOnScreen); me.translate(-parent.x, -parent.y); - UUID uuid = data.card.getId(); + UUID uuid = data.card.getParentId(); for (PlayAreaPanel pa : session.getGame().getPlayers().values()) { MagePermanent permanent = pa.getBattlefieldPanel().getPermanents().get(uuid); if (permanent != null) { diff --git a/Mage.Common/src/mage/view/CardView.java b/Mage.Common/src/mage/view/CardView.java index 4957c881838..4116c281214 100644 --- a/Mage.Common/src/mage/view/CardView.java +++ b/Mage.Common/src/mage/view/CardView.java @@ -53,6 +53,7 @@ import mage.target.Targets; public class CardView implements Serializable { protected UUID id; + protected UUID parentId; protected String name; protected List rules; protected String power; @@ -242,9 +243,19 @@ public class CardView implements Serializable { } public void overrideId(UUID id) { + if (parentId == null) { + parentId = this.id; + } this.id = id; } + public UUID getParentId() { + if (parentId != null) { + return parentId; + } + return id; + } + public void setAbility(CardView ability) { this.ability = ability; }