diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-01-07 23:28:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-01-07 23:28:31 +0300 |
commit | f23f3bf2bf6270b89abdfe9cdfe5bda59e061fae (patch) | |
tree | abd51bcc9a1045176678d629c5dfc508b1ef30d2 /src/char | |
parent | 083cf9e66217acaa46eed142f736d76c14340157 (diff) | |
download | evol-hercules-f23f3bf2bf6270b89abdfe9cdfe5bda59e061fae.tar.gz evol-hercules-f23f3bf2bf6270b89abdfe9cdfe5bda59e061fae.tar.bz2 evol-hercules-f23f3bf2bf6270b89abdfe9cdfe5bda59e061fae.tar.xz evol-hercules-f23f3bf2bf6270b89abdfe9cdfe5bda59e061fae.zip |
char: add option min_char_class.
Diffstat (limited to 'src/char')
-rw-r--r-- | src/char/config.c | 6 | ||||
-rw-r--r-- | src/char/config.h | 2 | ||||
-rw-r--r-- | src/char/init.c | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/char/config.c b/src/char/config.c index cddc6b6..8665fa6 100644 --- a/src/char/config.c +++ b/src/char/config.c @@ -14,6 +14,7 @@ #include "char/config.h" char *inter_server_ip = NULL; +int min_char_class = 0; int max_char_class = 0; void config_inter_server_ip(const char *val) @@ -29,6 +30,11 @@ void config_inter_server_ip(const char *val) inter_server_ip = aStrdup(buf); } +void config_min_char_class(const char *val) +{ + min_char_class = atoi(val); +} + void config_max_char_class(const char *val) { max_char_class = atoi(val); diff --git a/src/char/config.h b/src/char/config.h index ef1cf34..fd3792d 100644 --- a/src/char/config.h +++ b/src/char/config.h @@ -6,9 +6,11 @@ void config_final(void); void config_inter_server_ip(const char *val); +void config_min_char_class(const char *val); void config_max_char_class(const char *val); extern char *inter_server_ip; +extern int min_char_class; extern int max_char_class; #endif // EVOL_CHAR_CONFIG diff --git a/src/char/init.c b/src/char/init.c index 100b28a..8e2d34a 100644 --- a/src/char/init.c +++ b/src/char/init.c @@ -71,6 +71,7 @@ HPExport void server_preinit (void) setDefaultMap(); addCharInterConf("inter_server_ip", config_inter_server_ip); + addCharConf("min_char_class", config_min_char_class); addCharConf("max_char_class", config_max_char_class); } |