From f3449592deb2fe9e4d896858b96c12a5916aab10 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Fri, 22 Oct 2010 14:53:39 +0000 Subject: [PATCH] Fixed a bug where "Maxglee" cheat was adding token workaround cards to the collection. also, removed subtype search "nothing" from the Wfilters...before anyone jumps on me, there are over 18000s MTG cards, NOT a single ones of those cards have subtype="nothing" or any variations of "nothing" --- projects/mtg/src/MTGDeck.cpp | 9 +++++++++ projects/mtg/src/WGui.cpp | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/projects/mtg/src/MTGDeck.cpp b/projects/mtg/src/MTGDeck.cpp index c8d799154..1043f281b 100644 --- a/projects/mtg/src/MTGDeck.cpp +++ b/projects/mtg/src/MTGDeck.cpp @@ -691,9 +691,17 @@ int MTGDeck::complete() { or collection has at least 4 of every implemented card. Does not change the number of cards of which already 4 or more are present. */ int id, n; + bool StypeIsNothing; size_t databaseSize = database->ids.size(); for (size_t it = 0 ; it < databaseSize ; it++) { id = database->ids[it]; + StypeIsNothing = false; + if(database->getCardById(id)->data->hasType("nothing")) + { + StypeIsNothing = true; + } + if(!StypeIsNothing == true) + { if(cards.find(id) == cards.end()){ cards[id] = 4; total_cards += 4; @@ -705,6 +713,7 @@ int MTGDeck::complete() { } } } + } return 1; } diff --git a/projects/mtg/src/WGui.cpp b/projects/mtg/src/WGui.cpp index 9e0c0d04f..280ecfac0 100644 --- a/projects/mtg/src/WGui.cpp +++ b/projects/mtg/src/WGui.cpp @@ -1676,7 +1676,11 @@ void WGuiFilterItem::updateValue(){ string s = Subtypes::subtypesList->find(i); if(s == "") break; if(s.find(" ") != string::npos) continue; + if(s == "Nothing") + {//dont add "nothing" to the search filters. + }else{ stlist.push_back(s); + } } std::sort(stlist.begin(),stlist.end()); for(size_t t=0;t