summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-12-17 17:14:11 +0530
committerDastgir <dastgirpojee@rocketmail.com>2015-12-25 20:46:50 +0530
commit654e7629282b1e708e4f08b26b381e6f917b26d3 (patch)
tree6132737d98878579b56ec920c4f3badff31cd57f /src/map/status.c
parentd4460ce0fcca62cd4fe6d45b12c55eb286244fee (diff)
downloadhercules-654e7629282b1e708e4f08b26b381e6f917b26d3.tar.gz
hercules-654e7629282b1e708e4f08b26b381e6f917b26d3.tar.bz2
hercules-654e7629282b1e708e4f08b26b381e6f917b26d3.tar.xz
hercules-654e7629282b1e708e4f08b26b381e6f917b26d3.zip
Added Costume/Shadow Atk/Def refine bonus setting
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 841f9c855..ba64087e4 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2370,7 +2370,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
sd->status.inventory[index].refine = MAX_REFINE;
if(sd->inventory_data[index]->type == IT_WEAPON) {
- int r,wlv = sd->inventory_data[index]->wlv;
+ int r = sd->status.inventory[index].refine,wlv = sd->inventory_data[index]->wlv;
struct weapon_data *wd;
struct weapon_atk *wa;
if (wlv >= REFINE_TYPE_MAX)
@@ -2383,7 +2383,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
wa = &bstatus->rhw;
}
wa->atk += sd->inventory_data[index]->atk;
- if ( (r = sd->status.inventory[index].refine) )
+ if ( !battle_config.shadow_refine_atk && itemdb_is_shadowequip(sd->inventory_data[index]->equip) )
+ r = 0;
+
+ if (r)
wa->atk2 = status->dbs->refine_info[wlv].bonus[r-1] / 100;
#ifdef RENEWAL
@@ -2421,9 +2424,16 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
}
}
else if(sd->inventory_data[index]->type == IT_ARMOR) {
- int r;
- if ( (r = sd->status.inventory[index].refine) )
+ int r = sd->status.inventory[index].refine;
+
+ if ( (!battle_config.costume_refine_def && itemdb_is_costumeequip(sd->inventory_data[index]->equip)) ||
+ (!battle_config.shadow_refine_def && itemdb_is_shadowequip(sd->inventory_data[index]->equip))
+ )
+ r = 0;
+
+ if (r)
refinedef += status->dbs->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
+
if(sd->inventory_data[index]->script) {
if( i == EQI_HAND_L ) //Shield
sd->state.lr_flag = 3;