mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
[card.plugin] Using PermanentView.hasSummoningSickness
This commit is contained in:
parent
ecd0281d81
commit
c90193a4eb
1 changed files with 3 additions and 1 deletions
|
@ -93,7 +93,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
private TransferData data = new TransferData();
|
private TransferData data = new TransferData();
|
||||||
|
|
||||||
private boolean isPermanent;
|
private boolean isPermanent;
|
||||||
private boolean hasSickness = true;
|
private boolean hasSickness;
|
||||||
|
|
||||||
public CardPanel(CardView newGameCard, UUID gameId, boolean loadImage, ActionCallback callback) {
|
public CardPanel(CardView newGameCard, UUID gameId, boolean loadImage, ActionCallback callback) {
|
||||||
this.gameCard = newGameCard;
|
this.gameCard = newGameCard;
|
||||||
|
@ -103,6 +103,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
|
|
||||||
if (isPermanent) {
|
if (isPermanent) {
|
||||||
this.gamePermanent = (PermanentView) this.gameCard;
|
this.gamePermanent = (PermanentView) this.gameCard;
|
||||||
|
this.hasSickness = this.gamePermanent.hasSummoningSickness();
|
||||||
}
|
}
|
||||||
|
|
||||||
//for container debug (don't remove)
|
//for container debug (don't remove)
|
||||||
|
@ -678,6 +679,7 @@ public class CardPanel extends MagePermanent implements MouseListener, MouseMoti
|
||||||
@Override
|
@Override
|
||||||
public void update(PermanentView card) {
|
public void update(PermanentView card) {
|
||||||
update((CardView)card);
|
update((CardView)card);
|
||||||
|
this.hasSickness = card.hasSummoningSickness();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue