summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-07 23:28:31 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-07 23:28:31 +0300
commitf23f3bf2bf6270b89abdfe9cdfe5bda59e061fae (patch)
treeabd51bcc9a1045176678d629c5dfc508b1ef30d2 /src/char
parent083cf9e66217acaa46eed142f736d76c14340157 (diff)
downloadevol-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.c6
-rw-r--r--src/char/config.h2
-rw-r--r--src/char/init.c1
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);
}