mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Fixed tooltips not displayed for tokens.
This commit is contained in:
parent
8e788f3b32
commit
78bc920ba7
2 changed files with 116 additions and 113 deletions
|
|
@ -93,7 +93,7 @@ public class CardView implements Serializable {
|
|||
this.manaCost = card.getManaCost().getSymbols();
|
||||
this.convertedManaCost = card.getManaCost().convertedManaCost();
|
||||
if (card instanceof PermanentToken) {
|
||||
this.rarity = Rarity.NA;
|
||||
this.rarity = Rarity.COMMON;
|
||||
} else {
|
||||
this.rarity = card.getRarity();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package org.mage.plugins.card.info;
|
|||
|
||||
import mage.Constants;
|
||||
import mage.components.CardInfoPane;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.utils.CardUtil;
|
||||
import mage.utils.ThreadUtils;
|
||||
import mage.view.CardView;
|
||||
|
|
@ -39,6 +38,7 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
|
||||
ThreadUtils.threadPool.submit(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
if (!card.equals(currentCard)) return;
|
||||
|
||||
String manaCost = "";
|
||||
|
|
@ -55,7 +55,7 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
|
||||
List<String> rules = card.getRules();
|
||||
List<String> rulings = new ArrayList<String>(rules);
|
||||
try {
|
||||
|
||||
if (card instanceof PermanentView) {
|
||||
List<CounterView> counters = ((PermanentView) card).getCounters();
|
||||
int count = counters != null ? counters.size() : 0;
|
||||
|
|
@ -76,9 +76,7 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
rulings.add(sb.toString());
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
boolean smallImages = true;
|
||||
int fontSize = 11;
|
||||
|
|
@ -122,7 +120,9 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
break;
|
||||
}
|
||||
String rarity = card.getRarity().getCode();
|
||||
if (card.getExpansionSetCode() != null) {
|
||||
buffer.append(ManaSymbols.replaceSetCodeWithHTML(card.getExpansionSetCode().toUpperCase(), rarity));
|
||||
}
|
||||
buffer.append("</td></tr></table>");
|
||||
|
||||
String pt = "";
|
||||
|
|
@ -153,7 +153,6 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
}
|
||||
|
||||
|
||||
|
||||
if (legal.length() > 0) {
|
||||
//buffer.append("<br>");
|
||||
legal = legal.replaceAll("\\{this\\}", card.getName());
|
||||
|
|
@ -172,6 +171,10 @@ public class CardInfoPaneImpl extends JEditorPane implements CardInfoPane {
|
|||
//ThreadUtils.sleep(300);
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue