Jeck - Consolidated card price functions from deckviewer/shop into PriceList. Also moved price discount hash variable. (As of around r1825, price discount has been based on (mtgid + static int randomKey) % 20. randomKey updates at the end of any won game, making prices for a given fixed between visits to the shop on the same "day")

This commit is contained in:
wagic.jeck
2010-02-08 20:13:48 +00:00
parent 907c0b7b5d
commit 251f89d7b9
7 changed files with 23 additions and 18 deletions

View File

@@ -13,12 +13,16 @@ class PriceList{
MTGAllCards * collection;
string filename;
map<int,int> prices;
static int randomKey;
public:
PriceList(const char * file, MTGAllCards * _collection);
~PriceList();
int save();
int getSellPrice(int cardid);
int getPurchasePrice(int cardid);
int getPrice(int cardId);
int setPrice(int cardId, int price);
static void updateKey() {randomKey = rand();};
};
#endif