Jeck - Fixes to deck-viewer loading.
This commit is contained in:
@@ -1418,11 +1418,17 @@ int GameStateDeckViewer::loadDeck(int deckid){
|
|||||||
MTGCard * current = myDeck->getCard(i);
|
MTGCard * current = myDeck->getCard(i);
|
||||||
int howmanyinDeck = myDeck->count(current);
|
int howmanyinDeck = myDeck->count(current);
|
||||||
for (int i = myCollection->count(current); i < howmanyinDeck; i++){
|
for (int i = myCollection->count(current); i < howmanyinDeck; i++){
|
||||||
if(cheatmode) //Are we cheating?
|
if(cheatmode){ //Are we cheating?
|
||||||
playerdata->collection->add(current); //Yup, add it to collection.
|
playerdata->collection->add(current); //Yup, add it to collection permanently.
|
||||||
else
|
myCollection->Add(current);
|
||||||
|
}
|
||||||
|
else{
|
||||||
myDeck->Remove(current); //Nope. Remove it from deck.
|
myDeck->Remove(current); //Nope. Remove it from deck.
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
myCollection->Remove(current,myDeck->count(current));
|
||||||
}
|
}
|
||||||
currentCard = NULL;
|
currentCard = NULL;
|
||||||
// Load deck statistics
|
// Load deck statistics
|
||||||
|
|||||||
Reference in New Issue
Block a user