forked from External/mage
change enum equals to == for client
This commit is contained in:
parent
a32a02b688
commit
d966c82019
9 changed files with 17 additions and 17 deletions
|
|
@ -205,9 +205,9 @@ public class CardPanelComponentImpl extends CardPanel {
|
|||
|
||||
// Ability icon
|
||||
if (newGameCard.isAbility()) {
|
||||
if (AbilityType.TRIGGERED.equals(newGameCard.getAbilityType())) {
|
||||
if (newGameCard.getAbilityType() == AbilityType.TRIGGERED) {
|
||||
setTypeIcon(ImageManagerImpl.getInstance().getTriggeredAbilityImage(), "Triggered Ability");
|
||||
} else if (AbilityType.ACTIVATED.equals(newGameCard.getAbilityType())) {
|
||||
} else if (newGameCard.getAbilityType() == AbilityType.ACTIVATED) {
|
||||
setTypeIcon(ImageManagerImpl.getInstance().getActivatedAbilityImage(), "Activated Ability");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -367,9 +367,9 @@ public abstract class CardRenderer {
|
|||
// Get a string representing the type line
|
||||
protected String getCardTypeLine() {
|
||||
if (cardView.isAbility()) {
|
||||
if (AbilityType.TRIGGERED.equals(cardView.getAbilityType())) {
|
||||
if (cardView.getAbilityType() == AbilityType.TRIGGERED) {
|
||||
return "Triggered Ability";
|
||||
} else if (AbilityType.ACTIVATED.equals(cardView.getAbilityType())) {
|
||||
} else if (cardView.getAbilityType() == AbilityType.ACTIVATED) {
|
||||
return "Activated Ability";
|
||||
} else if (cardView.getAbilityType() == null) {
|
||||
// TODO: Triggered abilities waiting to be put onto the stack have abilityType = null. Figure out why
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public class CardPluginImpl implements CardPlugin {
|
|||
@Override
|
||||
public MagePermanent getMagePermanent(PermanentView permanent, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
|
||||
CardPanel cardPanel = makePanel(permanent, gameId, loadImage, callback, false, dimension);
|
||||
boolean implemented = !permanent.getRarity().equals(Rarity.NA);
|
||||
boolean implemented = permanent.getRarity() != Rarity.NA;
|
||||
cardPanel.setShowCastingCost(implemented);
|
||||
return cardPanel;
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ public class CardPluginImpl implements CardPlugin {
|
|||
@Override
|
||||
public MagePermanent getMageCard(CardView cardView, Dimension dimension, UUID gameId, ActionCallback callback, boolean canBeFoil, boolean loadImage) {
|
||||
CardPanel cardPanel = makePanel(cardView, gameId, loadImage, callback, false, dimension);
|
||||
boolean implemented = cardView.getRarity() != null && !cardView.getRarity().equals(Rarity.NA);
|
||||
boolean implemented = cardView.getRarity() != null && cardView.getRarity() != Rarity.NA;
|
||||
cardPanel.setShowCastingCost(implemented);
|
||||
return cardPanel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue