mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Performance: memory usage optimization for deck editor (part 2 of removed bloated usage of ManaCosts -> ManaColor objects, see #7515);
This commit is contained in:
parent
c1dea5b21e
commit
10e557b873
25 changed files with 164 additions and 113 deletions
|
|
@ -178,7 +178,7 @@ public class DeckGeneratorPool
|
|||
* @return if all the mana symbols fit the chosen colors.
|
||||
*/
|
||||
private boolean cardFitsChosenColors(Card card) {
|
||||
for (String symbol : card.getManaCost().getSymbols()) {
|
||||
for (String symbol : card.getManaCostSymbols()) {
|
||||
boolean found = false;
|
||||
symbol = symbol.replace("{", "").replace("}", "");
|
||||
if (isColoredManaSymbol(symbol)) {
|
||||
|
|
@ -218,7 +218,7 @@ public class DeckGeneratorPool
|
|||
|
||||
List<Card> fixedSpells = getFixedSpells();
|
||||
for(Card spell: fixedSpells) {
|
||||
for (String symbol : spell.getManaCost().getSymbols()) {
|
||||
for (String symbol : spell.getManaCostSymbols()) {
|
||||
symbol = symbol.replace("{", "").replace("}", "");
|
||||
if (isColoredManaSymbol(symbol)) {
|
||||
for (ColoredManaSymbol allowed : allowedColors) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue