summaryrefslogtreecommitdiff
path: root/src/account-server/account.hpp
diff options
context:
space:
mode:
authorRogier Polak <rogier.l.a.polak@gmail.com>2007-03-05 03:32:59 +0000
committerRogier Polak <rogier.l.a.polak@gmail.com>2007-03-05 03:32:59 +0000
commitd811a539474a6eeb4439a4204f3d96551a5b7c1e (patch)
tree66b2482085965598845a0e58fa04d1bcdb6dd5a1 /src/account-server/account.hpp
parentf0d969eba1840362daad9debc93907c270b22ea5 (diff)
downloadmanaserv-d811a539474a6eeb4439a4204f3d96551a5b7c1e.tar.gz
manaserv-d811a539474a6eeb4439a4204f3d96551a5b7c1e.tar.bz2
manaserv-d811a539474a6eeb4439a4204f3d96551a5b7c1e.tar.xz
manaserv-d811a539474a6eeb4439a4204f3d96551a5b7c1e.zip
Added an abstrart base class for characterdata, in order to use the same serialize and deserialize functions on both the accountserver and the gameserver.
Diffstat (limited to 'src/account-server/account.hpp')
-rw-r--r--src/account-server/account.hpp28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/account-server/account.hpp b/src/account-server/account.hpp
index e717e118..50129579 100644
--- a/src/account-server/account.hpp
+++ b/src/account-server/account.hpp
@@ -26,21 +26,10 @@
#include <string>
#include "defines.h"
-#include "playerdata.hpp"
+#include "account-server/characterdata.hpp"
#include "utils/countedptr.h"
/**
- * Type definition for a smart pointer to PlayerData.
- */
-typedef utils::CountedPtr< PlayerData > PlayerPtr;
-
-/**
- * Type definition for a list of Players.
- */
-typedef std::vector< PlayerPtr > Players;
-
-
-/**
* Notes:
* - change from the previous implementation: this class does not encrypt
* passwords anymore and will just store the passwords as they are
@@ -52,9 +41,8 @@ typedef std::vector< PlayerPtr > Players;
* encrypt the password twice).
*/
-
/**
- * A player account.
+ * A player's account.
*/
class Account
{
@@ -83,7 +71,7 @@ class Account
Account(const std::string& name,
const std::string& password,
const std::string& email,
- const Players& characters);
+ const Characters& characters);
/**
@@ -170,7 +158,7 @@ class Account
* @param characters a list of characters.
*/
void
- setCharacters(const Players& characters);
+ setCharacters(const Characters& characters);
/**
@@ -179,7 +167,7 @@ class Account
* @param character the new character.
*/
void
- addCharacter(PlayerPtr character);
+ addCharacter(CharacterPtr character);
/**
* Remove a character.
@@ -195,7 +183,7 @@ class Account
*
* @return all the characters.
*/
- Players&
+ Characters&
getCharacters();
/**
@@ -203,7 +191,7 @@ class Account
*
* @return the character if found, NULL otherwise.
*/
- PlayerPtr
+ CharacterPtr
getCharacter(const std::string& name);
/**
@@ -231,7 +219,7 @@ class Account
std::string mName; /**< user name */
std::string mPassword; /**< user password (encrypted) */
std::string mEmail; /**< user email address */
- Players mCharacters; /**< player data */
+ Characters mCharacters; /**< Character data */
AccountLevel mLevel; /**< account level */
};