From 78a007d2371dc0a46f5e66b776fdf57f04658447 Mon Sep 17 00:00:00 2001 From: Haru Date: Mon, 21 Aug 2017 22:46:05 +0200 Subject: Add support for bitmask arrays in the item_db Loc field Signed-off-by: Haru --- src/map/itemdb.c | 2 +- src/map/script.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3-70-g09d2