Created PumpCharacterUnload

This commit is contained in:
Kayne Ruse
2014-05-13 02:51:50 +10:00
parent eeb2400e79
commit 68475eee0f
4 changed files with 14 additions and 10 deletions
+2 -3
View File
@@ -159,13 +159,14 @@ int ServerApplication::SaveUserAccount(int uid) {
void ServerApplication::UnloadUserAccount(int uid) {
//save this user account, and then unload it
//NOTE: the associated characters are unloaded externally
SaveUserAccount(uid);
accountMap.erase(uid);
//TODO: unload this account's characters?
}
void ServerApplication::DeleteUserAccount(int uid) {
//delete a user account from the database, and remove it from memory
//NOTE: the associated characters are unloaded externally
sqlite3_stmt* statement = nullptr;
//prep
@@ -185,8 +186,6 @@ void ServerApplication::DeleteUserAccount(int uid) {
throw( std::runtime_error(std::string() + "Unknown SQL error when deleting an account: " + sqlite3_errmsg(database)) );
}
//TODO: delete this account's characters?
//finish the routine
sqlite3_finalize(statement);
accountMap.erase(uid);