diff options
-rw-r--r-- | src/account-server/storage.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp index f427a2a7..e740b103 100644 --- a/src/account-server/storage.cpp +++ b/src/account-server/storage.cpp @@ -1048,6 +1048,9 @@ void Storage::flush(Account *account) mDb->execSql(sqlInsertCharactersTable.str()); + // Update the character ID. + (*it)->setDatabaseID(mDb->getLastId()); + // Update all attributes. std::map<unsigned int, std::pair<double, double> >::const_iterator attr_it, attr_end; @@ -1059,9 +1062,6 @@ void Storage::flush(Account *account) attr_it->second.first, attr_it->second.second); - // Update the character ID. - (*it)->setDatabaseID(mDb->getLastId()); - // update the characters skill std::map<int, int>::const_iterator skill_it; for (skill_it = (*it)->mExperience.begin(); |