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:
@@ -193,6 +193,8 @@ void DeckStats::save(const std::string& filename)
|
||||
file << "MANA:" << it->second->manaColorIndex <<endl;
|
||||
}
|
||||
file.close();
|
||||
|
||||
playerDeckMeta->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user