From 3f13598714f2d6cecb1c1e5c382592a904798624 Mon Sep 17 00:00:00 2001 From: Jedzkie Date: Thu, 24 Dec 2015 10:43:11 +0800 Subject: Item Update: - Fix items that uses SPVanishRate bonus are not working properly. - Fix Velum Katzbalger item effect. - Added HPVanishRate bonus. --- src/map/pc.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 157f7faab..59232cc7b 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3168,11 +3168,18 @@ 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_HP_VANISH_RATE: + if (sd->state.lr_flag != 2) { + sd->bonus.hp_vanish_rate += type2; + sd->bonus.hp_vanish_per = max(sd->bonus.hp_vanish_per, val); + sd->bonus.hp_vanish_trigger = 0; + } + break; case SP_SP_VANISH_RATE: - if(sd->state.lr_flag != 2) { + 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; + sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per, val); + sd->bonus.sp_vanish_trigger = 0; } break; case SP_GET_ZENY_NUM: @@ -3812,11 +3819,18 @@ int pc_bonus3(struct map_session_data *sd,int type,int type2,int type3,int val) } } break; + case SP_HP_VANISH_RATE: + if (sd->state.lr_flag != 2) { + sd->bonus.hp_vanish_rate += type2; + sd->bonus.hp_vanish_per = max(sd->bonus.hp_vanish_per, type3); + sd->bonus.hp_vanish_trigger = val; + } + break; case SP_SP_VANISH_RATE: - if(sd->state.lr_flag != 2) { + 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; + sd->bonus.sp_vanish_per = max(sd->bonus.sp_vanish_per, type3); + sd->bonus.sp_vanish_trigger = val; } break; -- cgit v1.2.3-60-g2f50