summaryrefslogtreecommitdiff
path: root/src/ecommon/init.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-30 19:16:19 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-30 19:16:19 +0300
commitf4d5fe642248dd9fe943d30b06b26556e717615a (patch)
tree31091eeb4834a2d89068a4cd5c972b924c3b050c /src/ecommon/init.c
parentae99c9c0850b24dc7302e1384b6773eb2c4f93f1 (diff)
downloadevol-hercules-f4d5fe642248dd9fe943d30b06b26556e717615a.tar.gz
evol-hercules-f4d5fe642248dd9fe943d30b06b26556e717615a.tar.bz2
evol-hercules-f4d5fe642248dd9fe943d30b06b26556e717615a.tar.xz
evol-hercules-f4d5fe642248dd9fe943d30b06b26556e717615a.zip
Add constants validation function.
Diffstat (limited to 'src/ecommon/init.c')
-rw-r--r--src/ecommon/init.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ecommon/init.c b/src/ecommon/init.c
index 372e5ad..d91792e 100644
--- a/src/ecommon/init.c
+++ b/src/ecommon/init.c
@@ -33,3 +33,19 @@ void commonClean(void)
aFree(mapindex->default_map);
mapindex->default_map = NULL;
}
+
+#define checkVar(name, value) \
+ if (name != value) \
+ { \
+ ShowError(#name" wrong value. Found %d but must be %d.\n", \
+ name, \
+ value); \
+ }
+
+void common_online(void)
+{
+ checkVar(MAX_SKILL, 1500);
+ checkVar(MAX_SKILL_ID, 10037);
+ checkVar(SC_MAX, 647);
+ checkVar(SI_MAX, 971);
+}