Fixed memory leaks and refactored a bit the ManaCost class while I was at it.
This commit is contained in:
@@ -331,7 +331,9 @@ int Spell::resolve()
|
||||
observer->getResourceManager()->PlaySample(source->getSample());
|
||||
}
|
||||
if(this->cost)
|
||||
source->getManaCost()->manaUsedToCast = NEW ManaCost(this->cost);
|
||||
{
|
||||
source->getManaCost()->setManaUsedToCast(NEW ManaCost(this->cost));
|
||||
}
|
||||
AbilityFactory af(observer);
|
||||
af.addAbilities(observer->mLayers->actionLayer()->getMaxId(), this);
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user