summaryrefslogtreecommitdiff
path: root/src/emap/itemdb.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-14 17:58:29 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-14 17:58:29 +0300
commit2ed4142dfcde097648857f41f8064b0a19c350c7 (patch)
tree5777014a74b30081ac39cda28ea9c64280cbebb5 /src/emap/itemdb.c
parentf8b3342f690816022d26038389431002e9cf3648 (diff)
downloadevol-hercules-2ed4142dfcde097648857f41f8064b0a19c350c7.tar.gz
evol-hercules-2ed4142dfcde097648857f41f8064b0a19c350c7.tar.bz2
evol-hercules-2ed4142dfcde097648857f41f8064b0a19c350c7.tar.xz
evol-hercules-2ed4142dfcde097648857f41f8064b0a19c350c7.zip
Add basic support for charm items (If item present in inventory it give own bonuses)
For char item in items.conf need add attribute "Charm: true"
Diffstat (limited to 'src/emap/itemdb.c')
-rw-r--r--src/emap/itemdb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/emap/itemdb.c b/src/emap/itemdb.c
index 34905a9..54003ba 100644
--- a/src/emap/itemdb.c
+++ b/src/emap/itemdb.c
@@ -78,6 +78,8 @@ void eitemdb_readdb_additional_fields(int *itemid,
data->requiredDef = i32;
if (libconfig->setting_lookup_int(it, "RequiredMDef", &i32) && i32 >= 0)
data->requiredMDef = i32;
+ if (libconfig->setting_lookup_bool(it, "Charm", &i32) && i32 >= 0)
+ data->charmItem = i32 ? true : false;
if (itemdb->lookup_const(it, "UseEffect", &i32))
data->useEffect = i32;