summaryrefslogtreecommitdiff
path: root/src/account-server/storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/account-server/storage.cpp')
-rw-r--r--src/account-server/storage.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp
index c39bfc5d..353dc8ed 100644
--- a/src/account-server/storage.cpp
+++ b/src/account-server/storage.cpp
@@ -429,26 +429,26 @@ Character *Storage::getCharacterBySQL(Account *owner)
s.clear();
s.str("");
- // Load the skills of the char from CHAR_SKILLS_TBL_NAME
- s << "select status_id, status_time FROM "
- << CHAR_STATUS_EFFECTS_TBL_NAME
+ // Load skills.
+ s << "SELECT skill_id, skill_exp "
+ << "FROM " << CHAR_SKILLS_TBL_NAME
<< " WHERE char_id = " << character->getDatabaseID();
const dal::RecordSet &skillInfo = mDb->execSql(s.str());
if (!skillInfo.isEmpty())
{
const unsigned int nRows = skillInfo.rows();
- for (unsigned int row = 0; row < nRows; row++)
+ for (unsigned int row = 0; row < nRows; ++row)
{
- character->setExperience(
- toUint(skillInfo(row, 0)), // Skill Id
- toUint(skillInfo(row, 1))); // Experience
+ unsigned int id = toUint(skillInfo(row, 0));
+ character->setExperience(id, toInt(skillInfo(row, 1)));
}
}
- // Load the status effect
s.clear();
s.str("");
+
+ // Load the status effects
s << "select status_id, status_time FROM "
<< CHAR_STATUS_EFFECTS_TBL_NAME
<< " WHERE char_id = " << character->getDatabaseID();