summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 5e454415c..cd00e0ffc 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -1962,6 +1962,10 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->castrate+=val;
break;
+ case SP_FIXEDCASTRATE:
+ if(sd->state.lr_flag != 2)
+ sd->fixedcastrate+=val;
+ break;
case SP_MAXHPRATE:
if(sd->state.lr_flag != 2)
sd->hprate+=val;
@@ -2009,7 +2013,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
break;
case SP_ASPD_RATE: //Stackable increase - Made it linear as per rodatazone
if(sd->state.lr_flag != 2)
- status->aspd_rate -= 10*val;
+ status->aspd_rate -= 10 * val;
break;
case SP_HP_RECOV_RATE:
if(sd->state.lr_flag != 2)
@@ -2043,6 +2047,14 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->matk_rate += val;
break;
+ case SP_WEAPON_MATK:
+ if(sd->state.lr_flag != 2)
+ sd->weapon_matk += val;
+ break;
+ case SP_EQUIPMENT_MATK:
+ if(sd->state.lr_flag != 2)
+ sd->equipment_matk += val;
+ break;
case SP_IGNORE_DEF_ELE:
if(val >= ELE_MAX) {
ShowError("pc_bonus: SP_IGNORE_DEF_ELE: Invalid element %d\n", val);
@@ -2738,6 +2750,23 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
break;
+ case SP_FIXEDCASTRATE:
+ if(sd->state.lr_flag == 2)
+ break;
+ ARR_FIND(0, ARRAYLENGTH(sd->fixedskillcast), i, sd->fixedskillcast[i].id == 0 || sd->fixedskillcast[i].id == type2);
+ if (i == ARRAYLENGTH(sd->fixedskillcast))
+ { //Better mention this so the array length can be updated. [Skotlex]
+ ShowDebug("run_script: bonus2 bFixedCastRate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->fixedskillcast), type2, val);
+ break;
+ }
+ if(sd->fixedskillcast[i].id == type2)
+ sd->fixedskillcast[i].val += val;
+ else {
+ sd->fixedskillcast[i].id = type2;
+ sd->fixedskillcast[i].val = val;
+ }
+ break;
+
case SP_HP_LOSS_RATE:
if(sd->state.lr_flag != 2) {
sd->hp_loss.value = type2;