summaryrefslogtreecommitdiff
path: root/src/account-server/account.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-29 07:41:49 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2010-12-29 07:41:49 +0100
commit5f03e73484a50c9689956b32ef97630b56d2a00d (patch)
treeca6d3d7467d4582a2f64be4a45c056f55642fd17 /src/account-server/account.h
parent4ead8e0b6af924132a6fb227325a868db0df335c (diff)
downloadmanaserv-5f03e73484a50c9689956b32ef97630b56d2a00d.tar.gz
manaserv-5f03e73484a50c9689956b32ef97630b56d2a00d.tar.bz2
manaserv-5f03e73484a50c9689956b32ef97630b56d2a00d.tar.xz
manaserv-5f03e73484a50c9689956b32ef97630b56d2a00d.zip
Made the server handle properly the characters slots.
I turned the vector storing character data into a map, keeping the character's slot. Fixed a memleak along the way. Reviewed-by: Crush.
Diffstat (limited to 'src/account-server/account.h')
-rw-r--r--src/account-server/account.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/account-server/account.h b/src/account-server/account.h
index 2847a03c..5d9c5866 100644
--- a/src/account-server/account.h
+++ b/src/account-server/account.h
@@ -120,6 +120,13 @@ class Account
{ return mLevel; }
/**
+ * Tells whether a slot can be used.
+ *
+ * @param slot slot index of the character.
+ */
+ bool isSlotEmpty(unsigned int slot);
+
+ /**
* Set the characters.
*
* @param characters a list of characters.
@@ -136,9 +143,9 @@ class Account
/**
* Removes a character from the account.
*
- * @param i index of the character.
+ * @param slot slot index of the character.
*/
- void delCharacter(int i);
+ void delCharacter(unsigned int slot);
/**
* Get all the characters.