* Fix the mana consume event so as to consume the right number of manas
This commit is contained in:
jean.chalard
2009-08-26 14:25:55 +00:00
parent 4d3c6394a8
commit 5e18cdb25d

View File

@@ -159,7 +159,7 @@ int GuiMana::receiveEventMinus(WEvent* e)
if (WEventConsumeMana *event = dynamic_cast<WEventConsumeMana*>(e))
{
for (vector<ManaIcon*>::iterator it = manas.begin(); it != manas.end(); ++it)
if (event->color == (*it)->color) { (*it)->Wither(); return 1; }
if ((event->color == (*it)->color) && (ManaIcon::ALIVE == (*it)->mode)) { (*it)->Wither(); return 1; }
return 1;
}
else if (WEventPhaseChange *event = dynamic_cast<WEventPhaseChange*>(e))