Regeneration of non-creature permanents
Moderators: FranAvalon, Marek14, CCGHQ Admins
Regeneration of non-creature permanents
by travolter » 16 Nov 2012, 20:43
Regenerating non-creature permanents causes exception error.
Thats because CTargetRegenerationSpell::ResolveCard casts CCard to the CCreatureCard pointer.
Code:
CCreatureCard* pCreatureCard = (CCreatureCard*)pCard;
pCreatureCard->AddRegenerationShield();
Affected cards: Welding Jar, Reknit.
The solution can be moving the regeneration code from CCreatureCard to CCard.
Thats because CTargetRegenerationSpell::ResolveCard casts CCard to the CCreatureCard pointer.
Code:
CCreatureCard* pCreatureCard = (CCreatureCard*)pCard;
pCreatureCard->AddRegenerationShield();
Affected cards: Welding Jar, Reknit.
The solution can be moving the regeneration code from CCreatureCard to CCard.
1 post
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 15 guests