-fixed shop refresh method problem (would not save correctly)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-07-26 06:08:39 +00:00
parent ada385d358
commit 129334b93f
10 changed files with 41 additions and 22 deletions

View File

@@ -8,12 +8,18 @@ DeckDataWrapper::DeckDataWrapper(MTGDeck * deck){
for (int i = 0; i <= Constants::MTG_NB_COLORS; i++){
colors[i] = 0;
}
Add(deck);
currentColor = -1;
}
int DeckDataWrapper::Add(MTGDeck * deck){
map<int,int>::iterator it;
for (it = deck->cards.begin(); it!=deck->cards.end(); it++){
MTGCard * card = deck->getCardById(it->first);
Add(card,it->second);
}
currentColor = -1;
return 1;
}
void DeckDataWrapper::save(){