summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/itemdb.c2
-rw-r--r--src/map/script.c10
-rw-r--r--src/plugins/db2sql.c5
3 files changed, 14 insertions, 3 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 7a2c967fb..0ace20984 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -2037,7 +2037,7 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char *
itemdb->jobmask2mapid(id.class_base, UINT64_MAX);
}
- if( itemdb->lookup_const(it, "Upper", &i32) && i32 >= 0 )
+ if (itemdb->lookup_const_mask(it, "Upper", &i32) && i32 >= 0)
id.class_upper = (unsigned int)i32;
else if( !inherit )
id.class_upper = ITEMUPPER_ALL;
diff --git a/src/map/script.c b/src/map/script.c
index 5ce581db6..f29ce4104 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -24572,6 +24572,16 @@ void script_hardcoded_constants(void)
script->set_constant("A_CANNONBALL", A_CANNONBALL, false, false);
script->set_constant("A_THROWWEAPON", A_THROWWEAPON, false, false);
+ script->constdb_comment("Item Upper Masks");
+ script->set_constant("ITEMUPPER_NONE", ITEMUPPER_NONE, false, false);
+ script->set_constant("ITEMUPPER_NORMAL", ITEMUPPER_NORMAL, false, false);
+ script->set_constant("ITEMUPPER_UPPER", ITEMUPPER_UPPER, false, false);
+ script->set_constant("ITEMUPPER_BABY", ITEMUPPER_BABY, false, false);
+ script->set_constant("ITEMUPPER_THIRD", ITEMUPPER_THIRD, false, false);
+ script->set_constant("ITEMUPPER_THIRDUPPER", ITEMUPPER_THIRDUPPER, false, false);
+ script->set_constant("ITEMUPPER_THIRDBABY", ITEMUPPER_THIRDBABY, false, false);
+ script->set_constant("ITEMUPPER_ALL", ITEMUPPER_ALL, false, false);
+
script->constdb_comment("Renewal");
#ifdef RENEWAL
script->set_constant("RENEWAL", 1, false, false);
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);