diff options
author | smokexyz <sagunkho@hotmail.com> | 2017-07-04 20:09:08 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-04 20:09:08 +0530 |
commit | dc98b569d9ea5eb396720bf68da617d81560229f (patch) | |
tree | 78ae3f5db1ea73d994d91cfe7812e41efaacdf50 | |
parent | 181b1ff7960fb7ddfc9d8519471bc2a97b6fd22b (diff) | |
parent | c27b17f0771f9cff8b9cc962b5d13dbc8b6924e1 (diff) | |
download | hercules-dc98b569d9ea5eb396720bf68da617d81560229f.tar.gz hercules-dc98b569d9ea5eb396720bf68da617d81560229f.tar.bz2 hercules-dc98b569d9ea5eb396720bf68da617d81560229f.tar.xz hercules-dc98b569d9ea5eb396720bf68da617d81560229f.zip |
Merge pull request #1773 from dastgir/bug/item-options
Item option fixes
-rw-r--r-- | db/item_options.conf | 64 | ||||
-rw-r--r-- | doc/script_commands.txt | 2 | ||||
-rw-r--r-- | src/map/script.c | 12 |
3 files changed, 44 insertions, 34 deletions
diff --git a/db/item_options.conf b/db/item_options.conf index fb0efa170..95e2316ae 100644 --- a/db/item_options.conf +++ b/db/item_options.conf @@ -726,137 +726,147 @@ item_options_db: ( { Id: 127 Name: "RACE_IGNORE_DEF_PERCENT_NOTHING" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Formless, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Formless, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 128 Name: "RACE_IGNORE_DEF_PERCENT_UNDEAD" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Undead, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Undead, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 129 Name: "RACE_IGNORE_DEF_PERCENT_ANIMAL" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Brute, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Brute, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 130 Name: "RACE_IGNORE_DEF_PERCENT_PLANT" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Plant, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Plant, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 131 Name: "RACE_IGNORE_DEF_PERCENT_INSECT" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Insect, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Insect, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 132 Name: "RACE_IGNORE_DEF_PERCENT_FISHS" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Fish, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Fish, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 133 Name: "RACE_IGNORE_DEF_PERCENT_DEVIL" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Demon, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Demon, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 134 Name: "RACE_IGNORE_DEF_PERCENT_HUMAN" - Script: <" bonus2(bIgnoreDefRaceRate, RC_DemiPlayer, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_DemiPlayer, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 135 Name: "RACE_IGNORE_DEF_PERCENT_ANGEL" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Angel, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Angel, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 136 Name: "RACE_IGNORE_DEF_PERCENT_DRAGON" - Script: <" bonus2(bIgnoreDefRaceRate, RC_Dragon, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, RC_Dragon, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 137 Name: "RACE_IGNORE_MDEF_PERCENT_NOTHING" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Formless, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Formless, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 138 Name: "RACE_IGNORE_MDEF_PERCENT_UNDEAD" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Undead, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Undead, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 139 Name: "RACE_IGNORE_MDEF_PERCENT_ANIMAL" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Brute, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Brute, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 140 Name: "RACE_IGNORE_MDEF_PERCENT_PLANT" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Plant, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Plant, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 141 Name: "RACE_IGNORE_MDEF_PERCENT_INSECT" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Insect, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Insect, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 142 Name: "RACE_IGNORE_MDEF_PERCENT_FISHS" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Fish, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Fish, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 143 Name: "RACE_IGNORE_MDEF_PERCENT_DEVIL" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Demon, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Demon, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 144 Name: "RACE_IGNORE_MDEF_PERCENT_HUMAN" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_DemiPlayer, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_DemiPlayer, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 145 Name: "RACE_IGNORE_MDEF_PERCENT_ANGEL" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Angel, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Angel, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 146 Name: "RACE_IGNORE_MDEF_PERCENT_DRAGON" - Script: <" bonus2(bIgnoreMdefRaceRate, RC_Dragon, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreMdefRate, RC_Dragon, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 147 Name: "CLASS_DAMAGE_NORMAL_TARGET" - Script: <" bonus2(bAddClass, Class_Normal, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bAddRace2, RC_NonBoss, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 148 Name: "CLASS_DAMAGE_BOSS_TARGET" - Script: <" bonus2(bAddClass, Class_Boss, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bAddRace2, RC_Boss, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 149 Name: "CLASS_DAMAGE_NORMAL_USER" - Script: <" bonus2(bSubClass, Class_Normal, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" + if (RENEWAL) + bonus2(bAddRaceTolerance, RC_NonBoss, getequippedoptioninfo(IT_OPT_VALUE)); + else + bonus2(bSubRace2, RC_NonBoss, getequippedoptioninfo(IT_OPT_VALUE)); + "> }, { Id: 150 Name: "CLASS_DAMAGE_BOSS_USER" - Script: <" bonus2(bSubClass, Class_Boss, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" + if (RENEWAL) + bonus2(bAddRaceTolerance, RC_Boss, getequippedoptioninfo(IT_OPT_VALUE)); + else + bonus2(bSubRace2, RC_Boss, getequippedoptioninfo(IT_OPT_VALUE)); + "> }, { Id: 151 Name: "CLASS_MDAMAGE_NORMAL" - Script: <" bonus2(bMagicAddClass, Class_Normal, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bMagicAddRace2, RC_NonBoss, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 152 Name: "CLASS_MDAMAGE_BOSS" - Script: <" bonus2(bMagicAddClass, Class_Boss, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bMagicAddRace2, RC_Boss, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 153 Name: "CLASS_IGNORE_DEF_PERCENT_NORMAL" - Script: <" bonus2(bIgnoreDefClassRate, Class_Normal, getequippedoptioninfo(IT_OPT_VALUE)); "> + Script: <" bonus2(bIgnoreDefRate, Class_Normal, getequippedoptioninfo(IT_OPT_VALUE)); "> }, { Id: 154 diff --git a/doc/script_commands.txt b/doc/script_commands.txt index bf403bfec..e0e9646cd 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -3212,7 +3212,7 @@ If the equip was not found or the type is invalid, -1 is returned. --------------------------------------- -*getequipoptioninfo(<equip_index>,<slot>,<type>); +*getequipoption(<equip_index>,<slot>,<type>); Gets the option information of an equipment. diff --git a/src/map/script.c b/src/map/script.c index dbeae5fbc..8184639e6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -14064,7 +14064,7 @@ BUILDIN(getequippedoptioninfo) /** * Gets the option information of an equipment. - * *getequipoptioninfo(<equip_index>,<slot>,<type>); + * *getequipoption(<equip_index>,<slot>,<type>); * * @param equip_index as the Index of the Equipment. * @param slot as the slot# of the Item Option (1 to MAX_ITEM_OPTIONS) @@ -14081,24 +14081,24 @@ BUILDIN(getequipoption) if (sd == NULL) { script_pushint(st, -1); - ShowError("buildin_getequipoptioninfo: Player not attached!\n"); + ShowError("buildin_getequipoption: Player not attached!\n"); return false; } if (slot <= 0 || slot > MAX_ITEM_OPTIONS) { script_pushint(st, -1); - ShowError("buildin_getequipoptioninfo: Invalid option slot %d (Min: 1, Max: %d) provided.\n", slot, MAX_ITEM_OPTIONS); + ShowError("buildin_getequipoption: Invalid option slot %d (Min: 1, Max: %d) provided.\n", slot, MAX_ITEM_OPTIONS); return false; } if (equip_index > 0 && equip_index <= ARRAYLENGTH(script->equip)) { if ((i = pc->checkequip(sd, script->equip[equip_index - 1])) == -1) { - ShowError("buildin_getequipoptioninfo: No equipment is equipped in the given index %d.\n", equip_index); + ShowError("buildin_getequipoption: No equipment is equipped in the given index %d.\n", equip_index); script_pushint(st, -1); return false; } } else { - ShowError("buildin_getequipoptioninfo: Invalid equipment index %d provided.\n", equip_index); + ShowError("buildin_getequipoption: Invalid equipment index %d provided.\n", equip_index); script_pushint(st, 0); return false; } @@ -14112,7 +14112,7 @@ BUILDIN(getequipoption) val = sd->status.inventory[i].option[slot-1].value; break; default: - ShowError("buildin_geteqiupoptioninfo: Invalid option data type %d provided.\n", opt_type); + ShowError("buildin_getequipoption: Invalid option data type %d provided.\n", opt_type); script_pushint(st, -1); break; } |