Cleanups and state reduction.

This mainly moves datamembers around and tries to avoid caching of
results of calculations when the calculations are cheap.
This commit is contained in:
Tobias Loose
2013-12-07 12:58:20 +01:00
parent 4514725aba
commit 14c164364e
10 changed files with 167 additions and 150 deletions

View File

@@ -259,8 +259,8 @@ void GameStateShop::cancelCard(int controlId)
break;
}
price = price - (rnd * price) / 100;
if (price < pricelist->getPrice(c->getMTGId())) //filters have a tendancy to increase the price instead of lowering it!
pricelist->setPrice(c->getMTGId(), price);
if (price < pricelist->getPrice(c)) //filters have a tendancy to increase the price instead of lowering it!
pricelist->setPrice(c, price);
//Prices do not immediately go down when you ignore something.
return;
}