diff options
author | Haru <haru@dotalux.com> | 2017-08-21 22:46:05 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-09-17 17:48:41 +0200 |
commit | 78a007d2371dc0a46f5e66b776fdf57f04658447 (patch) | |
tree | 459c7678230c9e05380d70721d12b58e18ffee75 /src/map | |
parent | a7a8efb326fe6bb82e83a37ce43b97bc89f74848 (diff) | |
download | hercules-78a007d2371dc0a46f5e66b776fdf57f04658447.tar.gz hercules-78a007d2371dc0a46f5e66b776fdf57f04658447.tar.bz2 hercules-78a007d2371dc0a46f5e66b776fdf57f04658447.tar.xz hercules-78a007d2371dc0a46f5e66b776fdf57f04658447.zip |
Add support for bitmask arrays in the item_db Loc field
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/itemdb.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 0ace20984..96eced725 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -2047,7 +2047,7 @@ int itemdb_readdb_libconfig_sub(struct config_setting_t *it, int n, const char * else if( !inherit ) id.sex = 2; - if( itemdb->lookup_const(it, "Loc", &i32) && i32 >= 0 ) + if (itemdb->lookup_const_mask(it, "Loc", &i32) && i32 >= 0) id.equip = i32; if( itemdb->lookup_const(it, "WeaponLv", &i32) && i32 >= 0 ) diff --git a/src/map/script.c b/src/map/script.c index f29ce4104..7dcebd6f6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -24459,6 +24459,15 @@ void script_hardcoded_constants(void) script->set_constant("EQP_SHADOW_SHOES", EQP_SHADOW_SHOES, false, false); script->set_constant("EQP_SHADOW_ACC_R", EQP_SHADOW_ACC_R, false, false); script->set_constant("EQP_SHADOW_ACC_L", EQP_SHADOW_ACC_L, false, false); + // Synonyms and combined values + script->set_constant("EQP_WEAPON", EQP_WEAPON, false, false); + script->set_constant("EQP_SHIELD", EQP_SHIELD, false, false); + script->set_constant("EQP_ARMS", EQP_ARMS, false, false); + script->set_constant("EQP_HELM", EQP_HELM, false, false); + script->set_constant("EQP_ACC", EQP_ACC, false, false); + script->set_constant("EQP_COSTUME", EQP_COSTUME, false, false); + script->set_constant("EQP_SHADOW_ACC", EQP_SHADOW_ACC, false, false); + script->set_constant("EQP_SHADOW_ARMS", EQP_SHADOW_ARMS, false, false); script->constdb_comment("Item Option Types"); script->set_constant("IT_OPT_INDEX", IT_OPT_INDEX, false, false); |