Refix on issue 634. Calling EndInstance() on the DeckManager wasn't the right fix here, as it blows away all the instance data and basically nullifies the advantage of caching all the stats data. From what I could see, the problem was more a case of when a new deck was targetted, if no stats file was already present for the new deck, the old values from the previous player deck would persist. Now we clear these up before attempting to assign new values, so if the stat info doesn't exist, it'll show 0 matches / victories /etc instead of stale data belonging to another player deck.

This commit is contained in:
wrenczes@gmail.com
2011-05-28 05:00:40 +00:00
parent 15fa0e6c34
commit 68cffde7de
3 changed files with 9 additions and 1 deletions

View File

@@ -193,6 +193,8 @@ void DeckStats::save(const std::string& filename)
file << "MANA:" << it->second->manaColorIndex <<endl;
}
file.close();
playerDeckMeta->Invalidate();
}
}