summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-18 07:52:11 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-18 07:52:11 +0000
commit611350370ef3ecf8fc939005df37a14b55a8f69c (patch)
tree1da4119c85685bed98adb79cad4cbcd144ca0ba8 /src/map/pc.c
parent15e7b5f4c91f2bd50fdaee6edcaa19ef849d3875 (diff)
downloadhercules-611350370ef3ecf8fc939005df37a14b55a8f69c.tar.gz
hercules-611350370ef3ecf8fc939005df37a14b55a8f69c.tar.bz2
hercules-611350370ef3ecf8fc939005df37a14b55a8f69c.tar.xz
hercules-611350370ef3ecf8fc939005df37a14b55a8f69c.zip
Implemented Renewal Casting System.
Fixed bugreport:2018 where CH_PALMSTRIKE deals damage to hidden targets. Fixed bugreport:6473, bugreport:6325 SC_DEADLYINFECT should now spread status ailments properly. Fixed bugreport:5541, bugreport:6179, bugreport:6281 where self buff skill is transfer to targets when doing a combo. Updated AC_VULTURE where in renewal it doesn't show the hit bonus anymore in the status window. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16661 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index bea5b5c0a..82e650111 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2599,11 +2599,11 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
break;
case SP_FIXCASTRATE:
if(sd->state.lr_flag != 2)
- sd->fixcastrate+=val;
+ sd->bonus.fixcastrate -= val;
break;
case SP_VARCASTRATE:
if(sd->state.lr_flag != 2)
- sd->varcastrate+=val;
+ sd->bonus.varcastrate -= val;
break;
default:
ShowWarning("pc_bonus: unknown type %d %d !\n",type,val);
@@ -3135,6 +3135,22 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->skillvarcast[i].val = val;
}
break;
+ case SP_VARCASTRATE:
+ if(sd->state.lr_flag == 2)
+ break;
+ ARR_FIND(0, ARRAYLENGTH(sd->skillcast), i, sd->skillcast[i].id == 0 || sd->skillcast[i].id == type2);
+ if (i == ARRAYLENGTH(sd->skillcast))
+ {
+ ShowDebug("run_script: bonus2 bVariableCastrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n",ARRAYLENGTH(sd->skillcast), type2, val);
+ break;
+ }
+ if(sd->skillcast[i].id == type2)
+ sd->skillcast[i].val -= val;
+ else {
+ sd->skillcast[i].id = type2;
+ sd->skillcast[i].val -= val;
+ }
+ break;
case SP_SKILL_USE_SP: //bonus2 bSkillUseSP,n,x;
if(sd->state.lr_flag == 2)
break;