summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-04 20:47:58 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-04 20:47:58 +0300
commit14d9db5229186a56ce6f270f0b3e5aee1a92a650 (patch)
treea72934a05abfbbe74412f3b16826c2f60b3a20f0 /src/char/char.c
parentb83f07275fb87c61f4664a384f3de2a4938ab76c (diff)
downloadevol-hercules-14d9db5229186a56ce6f270f0b3e5aee1a92a650.tar.gz
evol-hercules-14d9db5229186a56ce6f270f0b3e5aee1a92a650.tar.bz2
evol-hercules-14d9db5229186a56ce6f270f0b3e5aee1a92a650.tar.xz
evol-hercules-14d9db5229186a56ce6f270f0b3e5aee1a92a650.zip
char: read max char class from char server config.
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/char/char.c b/src/char/char.c
index fcb4535..4b59b67 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -48,6 +48,12 @@ void echar_parse_char_create_new_char(int *fdPtr, struct char_session_data* sd)
chr->mmo_char_fromsql(result, &char_dat, false); //Only the short data is needed.
const uint16 race = RFIFOW(fd, 31);
+ if (race > max_char_class)
+ {
+ chr->creation_failed(fd, 10);
+ hookStop();
+ return;
+ }
char_dat.class_ = race;
chr->mmo_char_tosql(result, &char_dat);