fill new profiles with a random character

This commit is contained in:
Chris Danford
2005-08-05 09:59:44 +00:00
parent f02e96b56d
commit aa832e4e4d
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -1888,10 +1888,12 @@ void Profile::BackupToDir( CString sFromDir, CString sToDir )
FileCopy( sFromDir+DONT_SHARE_SIG, sToDir+DONT_SHARE_SIG );
}
bool Profile::CreateNewProfile( CString sProfileDir, CString sName )
bool Profile::CreateNewProfile( CString sProfileDir, CString sName, bool bFillWithRandomCharacter )
{
Profile pro;
pro.m_sDisplayName = sName;
if( bFillWithRandomCharacter )
pro.m_sCharacter = GAMESTATE->GetRandomCharacter()->m_sName;
bool bResult = pro.SaveAllToDir( sProfileDir, PREFSMAN->m_bSignProfileData );
FlushDirCache();
return bResult;
+1 -1
View File
@@ -332,7 +332,7 @@ public:
void SaveStatsWebPageToDir( CString sDir ) const;
void SaveMachinePublicKeyToDir( CString sDir ) const;
static bool CreateNewProfile( CString sProfileDir, CString sName );
static bool CreateNewProfile( CString sProfileDir, CString sName, bool bFillWithRandomCharacter );
static void BackupToDir( CString sFromDir, CString sToDir );
// Lua