summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorkenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-21 22:15:28 +0000
committerkenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-21 22:15:28 +0000
commit653ba172167466374794140277e34969ae544eaf (patch)
treef3ed3c317454c35609fdaca79245fc1243a5c778 /src/map/pc.c
parentee6ca5d682f79c8946fa778802cd709f1110f7fb (diff)
downloadhercules-653ba172167466374794140277e34969ae544eaf.tar.gz
hercules-653ba172167466374794140277e34969ae544eaf.tar.bz2
hercules-653ba172167466374794140277e34969ae544eaf.tar.xz
hercules-653ba172167466374794140277e34969ae544eaf.zip
Renamed bUseSPrateSkill to bSkillUseSPrate.
Added bSkillUseSP. Added documentation for bSkillUseSPrate(bUseSPrateSkill), bSkillUseSP, bSkillCooldown, bSkillFixedCast, bSkillVariableCast, bSkillFixedCast and bVariableCastrate. (bugreport:6193) Fixed Enriched White PotionZs (#12428) and Enrich Celermine Juices (#12437) bonus script. (bugreport:5790) Fixed Mental Sticks (#1654) bonus script. (bugreport:6071) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16466 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 138bc0828..459f6ef99 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3064,19 +3064,19 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
if(sd->state.lr_flag != 2)
sd->hp_gain_race_attack[type2] = cap_value(sd->hp_gain_race_attack[type2] + val, 0, INT16_MAX);
break;
- case SP_SP_RATE_SKILL: //bonus2 bUseSPrateSkill,n,x;
+ case SP_SKILL_USE_SP_RATE: //bonus2 bSkillUseSPrate,n,x;
if(sd->state.lr_flag == 2)
break;
- ARR_FIND(0, ARRAYLENGTH(sd->sprateskill), i, sd->sprateskill[i].id == 0 || sd->sprateskill[i].id == type2);
- if (i == ARRAYLENGTH(sd->sprateskill)) {
- ShowDebug("run_script: bonus2 bUseSPrateSkill reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->sprateskill), type2, val);
+ ARR_FIND(0, ARRAYLENGTH(sd->skillusesprate), i, sd->skillusesprate[i].id == 0 || sd->skillusesprate[i].id == type2);
+ if (i == ARRAYLENGTH(sd->skillusesprate)) {
+ ShowDebug("run_script: bonus2 bSkillUseSPrate reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesprate), type2, val);
break;
}
- if (sd->sprateskill[i].id == type2)
- sd->sprateskill[i].val += val;
+ if (sd->skillusesprate[i].id == type2)
+ sd->skillusesprate[i].val += val;
else {
- sd->sprateskill[i].id = type2;
- sd->sprateskill[i].val = val;
+ sd->skillusesprate[i].id = type2;
+ sd->skillusesprate[i].val = val;
}
break;
case SP_SKILL_COOLDOWN:
@@ -3127,6 +3127,21 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->skillvarcast[i].val = val;
}
break;
+ case SP_SKILL_USE_SP: //bonus2 bSkillUseSP,n,x;
+ if(sd->state.lr_flag == 2)
+ break;
+ ARR_FIND(0, ARRAYLENGTH(sd->skillusesp), i, sd->skillusesp[i].id == 0 || sd->skillusesp[i].id == type2);
+ if (i == ARRAYLENGTH(sd->skillusesp)) {
+ ShowDebug("run_script: bonus2 bSkillUseSP reached it's limit (%d skills per character), bonus skill %d (+%d%%) lost.\n", ARRAYLENGTH(sd->skillusesp), type2, val);
+ break;
+ }
+ if (sd->skillusesp[i].id == type2)
+ sd->skillusesp[i].val += val;
+ else {
+ sd->skillusesp[i].id = type2;
+ sd->skillusesp[i].val = val;
+ }
+ break;
default:
ShowWarning("pc_bonus2: unknown type %d %d %d!\n",type,type2,val);
break;