* Split constants file to have them in a single place.
This commit is contained in:
jean.chalard
2009-01-06 13:07:28 +00:00
parent 9024cf7cf5
commit 3bb2c431c9
33 changed files with 512 additions and 597 deletions

View File

@@ -34,7 +34,7 @@ ShopItem::ShopItem(int id, JLBFont *font, int _cardid, int x, int y, bool hasFoc
card = collection->getCardById(_cardid);
quantity = 1;
if (card->getRarity() == RARITY_L) quantity = 50;
if (card->getRarity() == Constants::RARITY_L) quantity = 50;
quad = NULL;
thumb = NULL;
}
@@ -229,14 +229,14 @@ void ShopItems::ButtonPressed(int controllerId, int controlId){
int curNbcards = playerdata->collection->totalCards();
if (showPriceDialog == 0){
//Starter Deck
playerdata->collection->addRandomCards(3,setId,RARITY_R,NULL);
playerdata->collection->addRandomCards(9, setId,RARITY_U,NULL);
playerdata->collection->addRandomCards(48, setId,RARITY_C,NULL);
playerdata->collection->addRandomCards(3,setId,Constants::RARITY_R,NULL);
playerdata->collection->addRandomCards(9, setId,Constants::RARITY_U,NULL);
playerdata->collection->addRandomCards(48, setId,Constants::RARITY_C,NULL);
}else{
//Booster
playerdata->collection->addRandomCards(1, setId,RARITY_R);
playerdata->collection->addRandomCards(3, setId,RARITY_U);
playerdata->collection->addRandomCards(11, setId,RARITY_C);
playerdata->collection->addRandomCards(1, setId,Constants::RARITY_R);
playerdata->collection->addRandomCards(3, setId,Constants::RARITY_U);
playerdata->collection->addRandomCards(11, setId,Constants::RARITY_C);
}
int newNbCards = playerdata->collection->totalCards();;
for (int i = curNbcards; i < newNbCards ; i++){