summaryrefslogtreecommitdiff
path: root/src/emap/itemdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/emap/itemdb.c')
-rw-r--r--src/emap/itemdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c
index a689613..9b0aabb 100644
--- a/src/emap/itemdb.c
+++ b/src/emap/itemdb.c
@@ -98,6 +98,8 @@ void eitemdb_readdb_additional_fields(int *itemid,
data->dropScript = *str ? script->parse(str, source, -item->nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
if (libconfig->setting_lookup_string(it, "OnTakeScript", &str))
data->takeScript = *str ? script->parse(str, source, -item->nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
+ if (libconfig->setting_lookup_string(it, "OnInsertCardScript", &str))
+ data->insertScript = *str ? script->parse(str, source, -item->nameid, SCRIPT_IGNORE_EXTERNAL_BRACKETS, NULL) : NULL;
config_setting_t *group = libconfig->setting_get_member(it, "AllowCards");
if (group)
@@ -138,4 +140,6 @@ void edestroy_item_data(struct item_data* self, int *free_selfPtr)
script->free_code(data->dropScript);
if (data->takeScript)
script->free_code(data->takeScript);
+ if (data->insertScript)
+ script->free_code(data->insertScript);
}