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.c45
1 files changed, 44 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4fb555d0f..6e24d7d49 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2591,11 +2591,22 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
if(sd->state.lr_flag != 2)
sd->bonus.fixcastrate -= val;
break;
+ case SP_ADD_FIXEDCAST:
+ if(sd->state.lr_flag != 2)
+ sd->bonus.add_fixcast += val;
+
+ break;
#ifdef RENEWAL_CAST
case SP_VARCASTRATE:
if(sd->state.lr_flag != 2)
sd->bonus.varcastrate -= val;
break;
+ case SP_ADD_VARIABLECAST:
+ if(sd->state.lr_flag != 2)
+
+ sd->bonus.add_varcast += val;
+
+ break;
#endif
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
@@ -2953,7 +2964,15 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2);
if (i == ARRAYLENGTH(sd->skillcast))
{ //Better mention this so the array length can be updated. [Skotlex]
- ShowDebug("run_script: bonus2 bCastRate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillcast), type2, val);
+ ShowDebug("run_script: bonus2 %s reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n",
+
+#ifndef RENEWAL_CAST
+ "bCastRate",
+#else
+ "bVariableCastrate",
+#endif
+
+ ARRAYLENGTH(sd->skillcast), type2, val);
break;
}
if(sd->skillcast[i].id == type2)
@@ -2964,6 +2983,30 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
}
break;
+ case SP_FIXCASTRATE:
+ if(sd->state.lr_flag == 2)
+ break;
+
+ ARR_FIND(0, ARRAYLENGTH(sd->skillfixcastrate), i, sd->skillfixcastrate[i].id == 0 || sd->skillfixcastrate[i].id == type2);
+
+ if (i == ARRAYLENGTH(sd->skillfixcastrate))
+
+ {
+
+ ShowDebug("run_script: bonus2 bFixedCastrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillfixcastrate), type2, val);
+ break;
+ }
+
+ if(sd->skillfixcastrate[i].id == type2)
+ sd->skillfixcastrate[i].val += val;
+
+ else {
+ sd->skillfixcastrate[i].id = type2;
+ sd->skillfixcastrate[i].val = val;
+ }
+
+ break;
+
case SP_HP_LOSS_RATE:
if(sd->state.lr_flag != 2) {
sd->hp_loss.value = type2;