summaryrefslogtreecommitdiff
path: root/src/account.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.cpp')
-rw-r--r--src/account.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/account.cpp b/src/account.cpp
index 11a1232a..b81adfe8 100644
--- a/src/account.cpp
+++ b/src/account.cpp
@@ -20,6 +20,8 @@
* $Id$
*/
+#include <cassert>
+
#include "account.h"
#include "utils/functors.h"
@@ -29,8 +31,10 @@
*/
Account::Account(const std::string& name,
const std::string& password,
- const std::string& email)
- : mName(name),
+ const std::string& email,
+ int id)
+ : mID(id),
+ mName(name),
mPassword(password),
mEmail(email),
mCharacters(),
@@ -207,3 +211,9 @@ PlayerPtr Account::getCharacter(const std::string& name)
if (it != end) return *it;
return PlayerPtr();
}
+
+void Account::setID(int id)
+{
+ assert(mID < 0);
+ mID = id;
+}