this must be copy

This commit is contained in:
Anthony Calosa
2016-08-13 17:39:11 +08:00
parent 8530292fef
commit 71aedfd96d

View File

@@ -985,8 +985,8 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
string type = ""; string type = "";
ManaCost * original = NEW ManaCost(); ManaCost * original = NEW ManaCost();
ManaCost * excess = NEW ManaCost(); ManaCost * excess = NEW ManaCost();
original->changeCostTo(Data); original->copy(Data);
Cost->changeCostTo(original); Cost->copy(original);
if (Cost->extraCosts) if (Cost->extraCosts)
{ {
for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++) for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++)
@@ -1018,7 +1018,7 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
{ {
original->removeHybrid(excess); original->removeHybrid(excess);
} }
Cost->changeCostTo(original); Cost->copy(original);
if (Cost->extraCosts) if (Cost->extraCosts)
{ {
for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++) for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++)
@@ -1109,7 +1109,7 @@ ManaCost * MTGCardInstance::computeNewCost(MTGCardInstance * card,ManaCost * Cos
type = "creature"; type = "creature";
} }
Cost->changeCostTo(original); Cost->copy(original);
if (Cost->extraCosts) if (Cost->extraCosts)
{ {
for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++) for (unsigned int i = 0; i < Cost->extraCosts->costs.size(); i++)