summaryrefslogtreecommitdiff
path: root/src/dalstorage.cpp
diff options
context:
space:
mode:
authorAaron Marks <nymacro@gmail.com>2005-07-26 13:05:08 +0000
committerAaron Marks <nymacro@gmail.com>2005-07-26 13:05:08 +0000
commit9603167e6b7c364e1a979f5a23420b6289026f46 (patch)
treee4a9c104c12057ab737ce592e64f31a25e18ae76 /src/dalstorage.cpp
parent0a7f92741ee87b35d30ccc351fe892e090b1d31a (diff)
downloadmanaserv-9603167e6b7c364e1a979f5a23420b6289026f46.tar.gz
manaserv-9603167e6b7c364e1a979f5a23420b6289026f46.tar.bz2
manaserv-9603167e6b7c364e1a979f5a23420b6289026f46.tar.xz
manaserv-9603167e6b7c364e1a979f5a23420b6289026f46.zip
Added shell for GameHandler (core game message handler).
Updated PostgreSQL tables -- now another unknown error results after various operations. Updated Item class (now inherits from Object).
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r--src/dalstorage.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp
index 38e61397..938b06a9 100644
--- a/src/dalstorage.cpp
+++ b/src/dalstorage.cpp
@@ -410,7 +410,9 @@ DALStorage::_addAccount(const AccountPtr& account)
// insert the account.
std::ostringstream sql1;
- sql1 << "insert into " << ACCOUNTS_TBL_NAME << " values (null, '"
+ sql1 << "insert into " << ACCOUNTS_TBL_NAME
+ << " (username, password, email, level, banned)"
+ << " values ('"
<< account->getName() << "', '"
<< account->getPassword() << "', '"
<< account->getEmail() << "', "
@@ -443,7 +445,9 @@ DALStorage::_addAccount(const AccountPtr& account)
for (; it != it_end; ++it) {
RawStatistics& stats = (*it)->getRawStatistics();
std::ostringstream sql3;
- sql3 << "insert into " << CHARACTERS_TBL_NAME << " values (null, "
+ sql3 << "insert into " << CHARACTERS_TBL_NAME
+ << " (name, gender, level, money, x, y, map_id, str, agi, int, dex luck)"
+ << " values ("
<< (account_it->second).id << ", '"
<< (*it)->getName() << "', '"
<< (*it)->getGender() << "', "
@@ -527,8 +531,9 @@ DALStorage::_updAccount(const AccountPtr& account)
std::ostringstream sql3;
if (charInfo.rows() == 0) {
- sql3 << "insert into " << CHARACTERS_TBL_NAME
- << " values (null, "
+ sql3 << "inpsert into " << CHARACTERS_TBL_NAME
+ << " (name, gender, level, money, x, y, map_id, str, agi, vit, int, dex, luck)"
+ << " values ("
<< (account_it->second).id << ", '"
<< (*it)->getName() << "', "
<< (*it)->getGender() << ", "