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:
@@ -2835,6 +2835,9 @@ int ALoseAbilities::addToGame()
|
|||||||
if (al->mObjects[i])
|
if (al->mObjects[i])
|
||||||
{
|
{
|
||||||
MTGAbility * currentAction = (MTGAbility *) al->mObjects[i];
|
MTGAbility * currentAction = (MTGAbility *) al->mObjects[i];
|
||||||
|
ALoseAbilities * la = dynamic_cast<ALoseAbilities*> (currentAction);
|
||||||
|
if(la)
|
||||||
|
continue;
|
||||||
if (currentAction->source == _target)
|
if (currentAction->source == _target)
|
||||||
{
|
{
|
||||||
storedAbilities.push_back(currentAction);
|
storedAbilities.push_back(currentAction);
|
||||||
|
|||||||
Reference in New Issue
Block a user