- fixed card id collisions in Legends, Ravnica, Portal
- Changed Deck and Database structures with better design (a bit faster, hopefully a lot cleaner)
- updated Windows project file
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-06-06 04:46:54 +00:00
parent 01bd44025d
commit ab42e5db06
13 changed files with 166 additions and 145 deletions

View File

@@ -35,16 +35,16 @@ MTGPlayerCards::MTGPlayerCards(MTGAllCards * _collection, int * idList, int idLi
MTGPlayerCards::MTGPlayerCards(MTGAllCards * _collection,MTGDeck * deck){
init();
collection = _collection;
for (int i=0; i<deck->totalCards(); i++){
MTGCard * card = deck->collection[i];
map<int,int>::iterator it;
for (it = deck->cards.begin(); it!=deck->cards.end(); it++){
MTGCard * card = deck->getCardById(it->first);
if (card){
MTGCardInstance * newCard = NEW MTGCardInstance(card, this);
library->addCard(newCard);
for (int i = 0; i < it->second; i++){
MTGCardInstance * newCard = NEW MTGCardInstance(card, this);
library->addCard(newCard);
}
}
}
}
MTGPlayerCards::~MTGPlayerCards(){