fixed a memleak introduced in r3639..

i also changed the logic behind wololo "ueot " instant ability creator...instead of sending it directly to genericinstantability i created a new class called AGenericInstantWrapper...which handles the adding, cloning, removel ect, exactly how we have always handled "instant abilities"...this should correct any further "odd edge case" issues with the new "ueot " code...

later i will varify if it works with every single ability we current build with a wrapper class...and see if i cant remove them all and convert "ueot " into the NEW until end of turn handling method....lets cross our fingers as it would remove ALOT of extra code if successful....
This commit is contained in:
omegablast2002@yahoo.com
2011-05-10 18:52:51 +00:00
parent 5a1540e0a1
commit 2c9d029bdc
3 changed files with 48 additions and 2 deletions

View File

@@ -909,7 +909,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
if (!a1)
return NULL;
return NEW GenericInstantAbility(1, card, (Damageable *) target, a1);
return NEW AGenericInstantWrapper(1, card, (Damageable *) target, a1);
}
//Upkeep Cost