summaryrefslogtreecommitdiff
path: root/src/protocol.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/protocol.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/protocol.h')
-rw-r--r--src/protocol.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/protocol.h b/src/protocol.h
index 7c2e8e59..1b4a1209 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -53,15 +53,15 @@ enum {
APMSG_LOGIN_RESPONSE = 0x0012, // B error, S updatehost, S Client data URL, B Character slots
PAMSG_LOGOUT = 0x0013, // -
APMSG_LOGOUT_RESPONSE = 0x0014, // B error
- PAMSG_CHAR_CREATE = 0x0020, // S name, B hair style, B hair color, B gender, W*6 stats
+ PAMSG_CHAR_CREATE = 0x0020, // S name, B hair style, B hair color, B gender, B slot, {W stats}*
APMSG_CHAR_CREATE_RESPONSE = 0x0021, // B error
- PAMSG_CHAR_DELETE = 0x0022, // B index
+ PAMSG_CHAR_DELETE = 0x0022, // B slot
APMSG_CHAR_DELETE_RESPONSE = 0x0023, // B error
- // B index, S name, B gender, B hair style, B hair color, W level,
+ // B slot, S name, B gender, B hair style, B hair color, W level,
// W character points, W correction points,
// {D attr id, D base value (in 1/256ths) D mod value (in 256ths) }*
APMSG_CHAR_INFO = 0x0024, // ^
- PAMSG_CHAR_SELECT = 0x0026, // B index
+ PAMSG_CHAR_SELECT = 0x0026, // B slot
APMSG_CHAR_SELECT_RESPONSE = 0x0027, // B error, B*32 token, S game address, W game port, S chat address, W chat port
PAMSG_EMAIL_CHANGE = 0x0030, // S email
APMSG_EMAIL_CHANGE_RESPONSE = 0x0031, // B error
@@ -308,7 +308,8 @@ enum {
CREATE_ATTRIBUTES_TOO_LOW,
CREATE_ATTRIBUTES_OUT_OF_RANGE,
CREATE_EXISTS_NAME,
- CREATE_TOO_MUCH_CHARACTERS
+ CREATE_TOO_MUCH_CHARACTERS,
+ CREATE_INVALID_SLOT
};
// Character attribute modification specific return value