added a guard against removing aloseabilities from a card which already has an active aloseabilities, we generally dont want these to remove each other...this also fixes a mem leak i created in the previous fix for an infinate loop this was creating, i left that fix in place just in case some crazy edge case would add it to a card again.

This commit is contained in:
omegablast2002@yahoo.com
2011-05-10 14:40:54 +00:00
parent 8c2c0ae8de
commit e9a2b2f495

View File

@@ -2835,6 +2835,9 @@ int ALoseAbilities::addToGame()
if (al->mObjects[i])
{
MTGAbility * currentAction = (MTGAbility *) al->mObjects[i];
ALoseAbilities * la = dynamic_cast<ALoseAbilities*> (currentAction);
if(la)
continue;
if (currentAction->source == _target)
{
storedAbilities.push_back(currentAction);