Fixed memory leaks and refactored a bit the ManaCost class while I was at it.

This commit is contained in:
Xawotihs@gmail.com
2013-10-19 14:29:17 +00:00
parent b5794ad328
commit 98861dd916
9 changed files with 109 additions and 76 deletions

View File

@@ -47,8 +47,8 @@ CardPrimitive::CardPrimitive(CardPrimitive * source)
manaCost.copy(source->getManaCost());
//reducedCost.copy(source->getReducedManaCost());
//increasedCost.copy(source->getIncreasedManaCost());
if(source->getManaCost()->alternative)
manaCost.alternative->alternativeName = source->getManaCost()->alternative->alternativeName;
if(source->getManaCost()->getAlternative())
manaCost.getAlternative()->alternativeName = source->getManaCost()->getAlternative()->alternativeName;
text = source->text;
formattedText = source->formattedText;