summaryrefslogtreecommitdiff
path: root/src/account-server/storage.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/account-server/storage.h')
-rw-r--r--src/account-server/storage.h18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/account-server/storage.h b/src/account-server/storage.h
index 5d5d7f1a..53bdca13 100644
--- a/src/account-server/storage.h
+++ b/src/account-server/storage.h
@@ -87,7 +87,7 @@ class Storage
*
* @return the character associated to the Id.
*/
- CharacterData *getCharacter(int id, Account *owner);
+ std::unique_ptr<CharacterData> getCharacter(int id, Account *owner);
/**
* Gets a character by character name.
@@ -96,7 +96,7 @@ class Storage
*
* @return the character associated to the name
*/
- CharacterData *getCharacter(const std::string &name);
+ std::unique_ptr<CharacterData> getCharacter(const std::string &name);
/**
* Gets the id of a character by its name.
@@ -184,14 +184,6 @@ class Storage
void delCharacter(int charId) const;
/**
- * Delete a character in the database. The object itself is not touched
- * by this function!
- *
- * @param character character object.
- */
- void delCharacter(CharacterData *character) const;
-
- /**
* Removes expired bans from accounts
*/
void checkBannedAccounts();
@@ -233,7 +225,7 @@ class Storage
*
* @return true on success
*/
- bool updateCharacter(CharacterData *ptr);
+ bool updateCharacter(const CharacterData &ptr);
/**
* Add a new guild.
@@ -318,7 +310,7 @@ class Storage
*
* @param Account object to update.
*/
- void flush(const Account &);
+ void flush(Account &);
/**
* Gets the value of a quest variable.
@@ -458,7 +450,7 @@ class Storage
*
* @return the character found by the query.
*/
- CharacterData *getCharacterBySQL(Account *owner);
+ std::unique_ptr<CharacterData> getCharacterBySQL(Account *owner);
/**
* Fix improper character slots