summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorMichieru <Michieru@users.noreply.github.com>2014-08-06 15:07:26 +0100
committerMichieru <Michieru@users.noreply.github.com>2014-08-06 15:07:26 +0100
commit356a83b11ae56778992b27b0c9b358d7d79722cd (patch)
treef113b57f6276ff0ed4c26c9042b7e41c11382e51 /src/map/pc.c
parent254f47e4f04141f6ceeb68d0dbbb4a0001d01a24 (diff)
downloadhercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.gz
hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.bz2
hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.xz
hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.zip
- Fix 3rd class skills on pre-renewal.
- When under Mind Break Matk Effect and Mdef reduction should not show on ALT Q(bug:7915) - Plagiarism should not copy New 3rd class skills. Thanks to OmegaRed (bug:8118) - Update Runstone Lux Anima to official formula (bug:8285) - Add official formula for Demonic Fire - Update damage formula for Unlimit, apply Def and Mdef to 1 during the skill and adjust the cooldown to official. (bug:8227) - Flash Combo should not consume hp-sp and the skill not ignore the distance. - Fix a bug with Full Throttle that not consuming sp correctly and adjust the cooldown to official. - All WoE items are inactive outside WoE or PVP - Add bonus3 bSPVanishRate for Vellum Items. - Script Vellum Items. - Add 2 new bonus bSetDefRace and bSetMDefRace for the Vellum Items. (rAthena c046668034) - Fixed Bowling Bash, Brandish Spear, Grand Darkness and Meteor Assault reducing def during cast; the only skill that does this officially is Grand Cross (rAthena 694719048e) - Implemented official Bowling Bash with all its special behaviors including the gutter line * As many servers probably want to remove the gutter line problem, it is configurable; just adjust the bowling_bash_area setting in skill.conf (Bug:4209) - Sonic Blow now has a fixed range of 1, even for monsters; a monster can't use this skill if you tank it from farther away (rAthena a15cee063d)
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c46
1 files changed, 39 insertions, 7 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 8b84ee3bc..58a066edf 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -2945,11 +2945,12 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
sd->left_weapon.sp_drain[RC_BOSS].type = val;
}
break;
- case SP_SP_VANISH_RATE:
- if(sd->state.lr_flag != 2) {
- sd->bonus.sp_vanish_rate += type2;
- sd->bonus.sp_vanish_per += val;
- }
+ case SP_SP_VANISH_RATE:
+ if(sd->state.lr_flag != 2) {
+ sd->bonus.sp_vanish_rate += type2;
+ sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per,val);
+ sd->bonus.sp_vanish_trigger=0;
+ }
break;
case SP_GET_ZENY_NUM:
if(sd->state.lr_flag != 2 && sd->bonus.get_zeny_rate < val) {
@@ -3434,6 +3435,13 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val)
if (sd->state.lr_flag != 2)
pc_bonus_subele(sd, (unsigned char)type2, type3, val);
break;
+ case SP_SP_VANISH_RATE:
+ if(sd->state.lr_flag != 2) {
+ sd->bonus.sp_vanish_rate += type2;
+ sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per,type3);
+ sd->bonus.sp_vanish_trigger=val;
+ }
+ break;
default:
ShowWarning("pc_bonus3: unknown type %d %d %d %d!\n",type,type2,type3,val);
@@ -3468,13 +3476,37 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4
case SP_ADDEFF_ONSKILL:
if( type2 > SC_MAX ) {
- ShowWarning("pc_bonus3 (Add Effect on skill): %d is not supported.\n", type2);
+ ShowWarning("pc_bonus4 (Add Effect on skill): %d is not supported.\n", type2);
break;
}
if( sd->state.lr_flag != 2 )
pc->bonus_addeff_onskill(sd->addeff3, ARRAYLENGTH(sd->addeff3), (sc_type)type3, type4, type2, val);
break;
+ case SP_SET_DEF_RACE: //bonus4 bSetDefRace,n,x,r,y;
+ if( type2 > RC_MAX ) {
+ ShowWarning("pc_bonus4 (DEF_SET): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag == 2)
+ break;
+ sd->def_set_race[type2].rate = type3;
+ sd->def_set_race[type2].tick = type4;
+ sd->def_set_race[type2].value = val;
+ break;
+
+ case SP_SET_MDEF_RACE: //bonus4 bSetMDefRace,n,x,r,y;
+ if( type2 > RC_MAX ) {
+ ShowWarning("pc_bonus4 (MDEF_SET): %d is not supported.\n", type2);
+ break;
+ }
+ if(sd->state.lr_flag == 2)
+ break;
+ sd->mdef_set_race[type2].rate = type3;
+ sd->mdef_set_race[type2].tick = type4;
+ sd->mdef_set_race[type2].value = val;
+ break;
+
default:
ShowWarning("pc_bonus4: unknown type %d %d %d %d %d!\n",type,type2,type3,type4,val);
break;
@@ -9519,7 +9551,7 @@ int map_night_timer(int tid, int64 tick, int id, intptr_t data) {
void pc_setstand(struct map_session_data *sd) {
nullpo_retv(sd);
-
+
status_change_end(&sd->bl, SC_TENSIONRELAX, INVALID_TIMER);
clif->sc_end(&sd->bl,sd->bl.id,SELF,SI_SIT);
//Reset sitting tick.