summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2014-02-09 15:42:35 +0100
committerHaru <haru@dotalux.com>2014-02-09 15:42:35 +0100
commit7b19f964b88dffcfdc8c12648d5e4ee8a26a9504 (patch)
tree0c8a5bb1dc15d107db3ef2fac8d12822511bcdec /src/map/itemdb.c
parent51805d1f2cedc084fea6cc390ca23a24291edbec (diff)
downloadhercules-7b19f964b88dffcfdc8c12648d5e4ee8a26a9504.tar.gz
hercules-7b19f964b88dffcfdc8c12648d5e4ee8a26a9504.tar.bz2
hercules-7b19f964b88dffcfdc8c12648d5e4ee8a26a9504.tar.xz
hercules-7b19f964b88dffcfdc8c12648d5e4ee8a26a9504.zip
Improved script case check reports to include more accurate source info.
- Fixes bugreport:8013, thanks to Dastgir Pojee http://hercules.ws/board/tracker/issue-8013-script-add-str-problem/ Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 527972516..bfcc6f795 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1164,6 +1164,9 @@ void itemdb_read_chains(void) {
CREATE(itemdb->chains, struct item_chain, libconfig->setting_length(item_chain_conf.root));
itemdb->chain_count = (unsigned short)libconfig->setting_length(item_chain_conf.root);
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = config_filename;
+#endif // ENABLE_CASE_CHECK
while( (itc = libconfig->setting_get_elem(item_chain_conf.root,i++)) ) {
struct item_data *data = NULL;
struct item_chain_entry *prev = NULL;
@@ -1197,6 +1200,9 @@ void itemdb_read_chains(void) {
count++;
}
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = NULL;
+#endif // ENABLE_CASE_CHECK
libconfig->destroy(&item_chain_conf);
@@ -2230,8 +2236,14 @@ void itemdb_name_constants(void) {
DBIterator *iter = db_iterator(itemdb->names);
struct item_data *data;
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = "Item Database (Likely an invalid or conflicting AegisName)";
+#endif // ENABLE_CASE_CHECK
for( data = dbi_first(iter); dbi_exists(iter); data = dbi_next(iter) )
script->set_constant2(data->name,data->nameid,0);
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = NULL;
+#endif // ENABLE_CASE_CHECK
dbi_destroy(iter);
}