diff options
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r-- | src/dalstorage.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp index bc166358..45468f86 100644 --- a/src/dalstorage.cpp +++ b/src/dalstorage.cpp @@ -204,7 +204,7 @@ DALStorage::getAccount(const std::string& userName) // load the characters associated with the account. sql = "select * from "; sql += CHARACTERS_TBL_NAME; - sql += " where id = '"; + sql += " where user_id = '"; sql += accountInfo(0, 0); sql += "';"; const RecordSet& charInfo = mDb->execSql(sql); @@ -233,6 +233,14 @@ DALStorage::getAccount(const std::string& userName) stats )); + std::stringstream ss; + ss << "select map from " + MAPS_TBL_NAME + " where id = " + << toUint(charInfo(i, 8)) << ";"; + sql = ss.str(); + // should be impossible for this to fail due to db referential integrity + const RecordSet& mapInfo = mDb->execSql(sql); + being.get()->setMap(mapInfo(0, 0)); + mCharacters.push_back(being); beings.push_back(being); } |