summaryrefslogtreecommitdiff
path: root/src/plugins/db2sql.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-08-21 20:58:36 +0200
committerHaru <haru@dotalux.com>2017-09-17 17:48:33 +0200
commit926cff033bb9533ae3d8615f8b90e2e443d0525b (patch)
treee6c880ede4d47f6ef3a83ae666bd08d680187b84 /src/plugins/db2sql.c
parent3745f1658aab4a5ffe504a5660b76402f2e2c6d6 (diff)
downloadhercules-926cff033bb9533ae3d8615f8b90e2e443d0525b.tar.gz
hercules-926cff033bb9533ae3d8615f8b90e2e443d0525b.tar.bz2
hercules-926cff033bb9533ae3d8615f8b90e2e443d0525b.tar.xz
hercules-926cff033bb9533ae3d8615f8b90e2e443d0525b.zip
Add support for bitmask arrays in the item_db Upper field
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/plugins/db2sql.c')
-rw-r--r--src/plugins/db2sql.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/db2sql.c b/src/plugins/db2sql.c
index cb8660df9..38e5ead5d 100644
--- a/src/plugins/db2sql.c
+++ b/src/plugins/db2sql.c
@@ -297,10 +297,11 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source)
StrBuf->Printf(&buf, "'%"PRIu64"',", ui64);
// equip_upper
- if (libconfig->setting_lookup_int(entry, "Upper", &i32) && i32 >= 0)
+ if (itemdb->lookup_const_mask(entry, "Upper", &i32) && i32 >= 0)
ui32 = (uint32)i32;
else
ui32 = ITEMUPPER_ALL;
+
StrBuf->Printf(&buf, "'%u',", ui32);
// equip_genders
@@ -323,7 +324,7 @@ int itemdb2sql_sub(struct config_setting_t *entry, int n, const char *source)
// refineable
StrBuf->Printf(&buf, "'%d',", it->flag.no_refine?0:1);
-
+
// disable_options
StrBuf->Printf(&buf, "'%d',", it->flag.no_options?1:0);