forked from External/mage
* Performance: memory usage optimization for deck editor (removed bloated usage of ManaCosts -> ManaColor objects, see #7515);
This commit is contained in:
parent
c3d55ea12a
commit
275e996c08
23 changed files with 170 additions and 143 deletions
|
|
@ -1398,11 +1398,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
}
|
||||
// Casting cost
|
||||
if (!s) {
|
||||
String mc = "";
|
||||
for (String m : card.getManaCost()) {
|
||||
mc += m;
|
||||
}
|
||||
s |= mc.toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
s |= card.getManaCostStr().toLowerCase(Locale.ENGLISH).contains(searchStr);
|
||||
}
|
||||
// Rules
|
||||
if (!s) {
|
||||
|
|
@ -1473,10 +1469,7 @@ public class DragCardGrid extends JPanel implements DragCardSource, DragCardTarg
|
|||
}
|
||||
|
||||
// Mana Cost
|
||||
String mc = "";
|
||||
for (String m : card.getManaCost()) {
|
||||
mc += m;
|
||||
}
|
||||
String mc = card.getManaCostStr();
|
||||
mc = mc.replaceAll("\\{([WUBRG]).([WUBRG])\\}", "{$1}{$2}");
|
||||
mc = mc.replaceAll("\\{", "#");
|
||||
mc = mc.replaceAll("#2\\/", "#");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue