corrected the mana not removing from pool correctly bug, sorry about that.

This commit is contained in:
omegablast2002@yahoo.com
2013-02-13 23:33:05 +00:00
parent 8aef74e32a
commit defb8e32c6
+4 -2
View File
@@ -2860,6 +2860,7 @@ int AARemoveMana::resolve()
{ {
ManaCost * toRemove = manaPool->Diff(player->doesntEmpty); ManaCost * toRemove = manaPool->Diff(player->doesntEmpty);
player->getManaPool()->pay(manaPool->Diff(player->doesntEmpty)); player->getManaPool()->pay(manaPool->Diff(player->doesntEmpty));
return 1;
} }
else if(!player->doesntEmpty->getConvertedCost() && player->poolDoesntEmpty->getConvertedCost()) else if(!player->doesntEmpty->getConvertedCost() && player->poolDoesntEmpty->getConvertedCost())
{ {
@@ -2871,6 +2872,7 @@ int AARemoveMana::resolve()
} }
player->getManaPool()->pay(manaPool->Diff(toSave)); player->getManaPool()->pay(manaPool->Diff(toSave));
delete(toSave); delete(toSave);
return 1;
} }
else if(player->doesntEmpty->getConvertedCost() && player->poolDoesntEmpty->getConvertedCost()) else if(player->doesntEmpty->getConvertedCost() && player->poolDoesntEmpty->getConvertedCost())
{ {
@@ -2888,12 +2890,12 @@ int AARemoveMana::resolve()
} }
player->getManaPool()->pay(manaPool->Diff(toSave));//remove the manacost equal to the difference of toSave and the manapool. player->getManaPool()->pay(manaPool->Diff(toSave));//remove the manacost equal to the difference of toSave and the manapool.
delete(toSave); delete(toSave);
return 1;
} }
manaPool->Empty();
} }
else else
manaPool->Empty(); manaPool->Empty();
} }
} }
else //remove a "standard" mana Description else //remove a "standard" mana Description