diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-03 17:37:34 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-03 17:37:34 +0000 |
commit | 0c0966322b3018fa5fe3be3f52eef867da6ec779 (patch) | |
tree | 544a55ddf19a0f0cfb6499fe71540d952af5fe6e /src/account.h | |
parent | eff04b5ddb0b00eeed191382aa9d55bf0f56c2a7 (diff) | |
download | manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.tar.gz manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.tar.bz2 manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.tar.xz manaserv-0c0966322b3018fa5fe3be3f52eef867da6ec779.zip |
Simplified and sped up account flushing: only modified accounts are flushed.
Diffstat (limited to 'src/account.h')
-rw-r--r-- | src/account.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/account.h b/src/account.h index b1ba59d0..7597fdea 100644 --- a/src/account.h +++ b/src/account.h @@ -58,7 +58,8 @@ class Account */ Account(const std::string& name, const std::string& password, - const std::string& email); + const std::string& email, + int id = -1); /** @@ -195,6 +196,19 @@ class Account PlayerPtr getCharacter(const std::string& name); + /** + * Get account ID. + * + * @return the unique ID of the account, a negative number if none yet. + */ + int getID() const + { return mID; } + + /** + * Set account ID. + * The account shall not have any ID yet. + */ + void setID(int); private: Account(); @@ -203,6 +217,7 @@ class Account private: + int mID; /**< unique id */ std::string mName; /**< user name */ std::string mPassword; /**< user password (encrypted) */ std::string mEmail; /**< user email address */ |