Erwan
- changed "putInPlay" to return "NULL" if the card cannot be found in the "from" zone. The behavior of the function before that prevented to see that we broke the "alternate" cost feature (see test Vine Dryad) - Fixed some memory leaks introduced in r2922
This commit is contained in:
@@ -1371,6 +1371,7 @@ public:
|
||||
{
|
||||
if(!starfound.empty())
|
||||
{
|
||||
SAFE_DELETE(multiplier);
|
||||
multiplier = NEW WParsedInt(starfound, NULL, (MTGCardInstance *)source);
|
||||
}
|
||||
for (int i = 0; i < multiplier->getValue(); ++i)
|
||||
@@ -1523,17 +1524,14 @@ public:
|
||||
ATokenCreator * clone() const
|
||||
{
|
||||
ATokenCreator * a = NEW ATokenCreator(*this);
|
||||
a->multiplier = NEW WParsedInt(*(multiplier));
|
||||
a->isClone = 1;
|
||||
return a;
|
||||
}
|
||||
|
||||
~ATokenCreator()
|
||||
{
|
||||
if (!isClone)
|
||||
{
|
||||
if(multiplier != NULL)
|
||||
delete (multiplier);
|
||||
}
|
||||
SAFE_DELETE(multiplier);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user