diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/account-server/storage.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/account-server/storage.cpp b/src/account-server/storage.cpp index 766864ba..b17a4c2d 100644 --- a/src/account-server/storage.cpp +++ b/src/account-server/storage.cpp @@ -490,7 +490,8 @@ Character *Storage::getCharacterBySQL(Account *owner) try { std::ostringstream sql; - sql << " select * from " << CHAR_EQUIPS_TBL_NAME + sql << " select slot_type, inventory_slot from " + << CHAR_EQUIPS_TBL_NAME << " where owner_id = '" << character->getDatabaseID() << "' order by slot_type desc;"; @@ -498,8 +499,8 @@ Character *Storage::getCharacterBySQL(Account *owner) if (!equipInfo.isEmpty()) for (int k = 0, size = equipInfo.rows(); k < size; ++k) poss.equipSlots.insert(std::pair<unsigned int, unsigned int>( - toUint(equipInfo(k, 3)), - toUint(equipInfo(k, 2)))); + toUint(equipInfo(k, 0)), + toUint(equipInfo(k, 1)))); } catch (const dal::DbSqlQueryExecFailure &e) { |