diff --git a/Mage.Client/src/main/java/mage/client/game/BattlefieldPanel.java b/Mage.Client/src/main/java/mage/client/game/BattlefieldPanel.java index 71d62a6c78..adceda009b 100644 --- a/Mage.Client/src/main/java/mage/client/game/BattlefieldPanel.java +++ b/Mage.Client/src/main/java/mage/client/game/BattlefieldPanel.java @@ -56,6 +56,7 @@ import mage.client.cards.BigCard; import mage.client.cards.Permanent; import mage.client.plugins.impl.Plugins; import mage.client.util.Config; +import mage.game.permanent.Battlefield; import mage.view.PermanentView; /** @@ -69,9 +70,8 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane { private BigCard bigCard; private Map ui = new HashMap(); - protected static Map battlefield; - protected static List threads = new ArrayList(); - private static Dimension cardDimension; + protected Map battlefield; + private Dimension cardDimension; /** Creates new form BattlefieldPanel */ public BattlefieldPanel(JScrollPane jScrollPane) { @@ -127,17 +127,12 @@ public class BattlefieldPanel extends javax.swing.JLayeredPane { } if (changed) { - BattlefieldPanel.battlefield = battlefield; + this.battlefield = battlefield; sortLayout(); - synchronized (this) { - for (Thread t : threads) { - t.start(); - } - threads.clear(); - } } } - + + //TODO: review sorting stuff public void sortLayout() { Plugins.getInstance().sortPermanents(ui, permanents.values()); if (battlefield == null) {return;} diff --git a/Mage.Plugins/Mage.Card.Plugin/src/main/java/org/mage/plugins/card/CardPluginImpl.java b/Mage.Plugins/Mage.Card.Plugin/src/main/java/org/mage/plugins/card/CardPluginImpl.java index a78fbc18a0..44963cf794 100644 --- a/Mage.Plugins/Mage.Card.Plugin/src/main/java/org/mage/plugins/card/CardPluginImpl.java +++ b/Mage.Plugins/Mage.Card.Plugin/src/main/java/org/mage/plugins/card/CardPluginImpl.java @@ -487,7 +487,7 @@ public class CardPluginImpl implements CardPlugin { @Override public void onRemoveCard(MagePermanent card, int count) { if (card != null) { - Animation.hideCard((CardPanel) card, count > 0 ? count : 1); + Animation.hideCard(card, count > 0 ? count : 1); try { while ((card).getAlpha() - 0.05f > 0) { Thread.sleep(30);