CategoryScores: save NotesType as a string, so we don't lose compat
if we move NotesTypes around
This commit is contained in:
@@ -1060,7 +1060,8 @@ XNode* Profile::SaveCategoryScoresCreateNode() const
|
|||||||
if( pProfile->GetCategoryNumTimesPlayed( st ) == 0 )
|
if( pProfile->GetCategoryNumTimesPlayed( st ) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
XNode* pStepsTypeNode = pNode->AppendChild( "StepsType", st );
|
XNode* pStepsTypeNode = pNode->AppendChild( "StepsType" );
|
||||||
|
pStepsTypeNode->AppendAttr( "Type", GameManager::NotesTypeToString(st) );
|
||||||
|
|
||||||
FOREACH_RankingCategory( rc )
|
FOREACH_RankingCategory( rc )
|
||||||
{
|
{
|
||||||
@@ -1092,8 +1093,12 @@ void Profile::LoadCategoryScoresFromNode( const XNode* pNode )
|
|||||||
if( (*stepsType)->name != "StepsType" )
|
if( (*stepsType)->name != "StepsType" )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
StepsType st;
|
LPXAttr TypeAttr = (*stepsType)->GetAttr( "Type" );
|
||||||
(*stepsType)->GetValue((int&)st);
|
if( TypeAttr == NULL )
|
||||||
|
WARN_AND_CONTINUE;
|
||||||
|
StepsType st = GameManager::StringToNotesType( TypeAttr->value );
|
||||||
|
if( st == STEPS_TYPE_INVALID )
|
||||||
|
WARN_AND_CONTINUE;
|
||||||
|
|
||||||
for( XNodes::iterator radarCategory = (*stepsType)->childs.begin();
|
for( XNodes::iterator radarCategory = (*stepsType)->childs.begin();
|
||||||
radarCategory != (*stepsType)->childs.end();
|
radarCategory != (*stepsType)->childs.end();
|
||||||
|
|||||||
Reference in New Issue
Block a user