From 0b4c74ca60babc8e1cc3a5cc2225b5705a430586 Mon Sep 17 00:00:00 2001 From: skotlex Date: Mon, 24 Jul 2006 19:01:53 +0000 Subject: - Adjusted skill_castfix_sc so that Suffragium will get consumed even on instant cast skills, but Memorize won't. - Adjusted map_countoncell to receive the BL_* defines currently used instead of 0 to signal all. - BladeStop will now end when either of the characters is moved (knocked out?) around. - Moved the Zeny penalty code from respawn to pc_dead. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7859 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index c15fca7f9..ed58ded57 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -297,16 +297,6 @@ int pc_setrestartvalue(struct map_session_data *sd,int type) { } /* removed exp penalty on spawn [Valaris] */ - if(type&2 && (sd->class_&MAPID_UPPERMASK) != MAPID_NOVICE && battle_config.zeny_penalty > 0 && !map[sd->bl.m].flag.nozenypenalty) { - int zeny = (int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.); - if(zeny < 1) zeny = 1; - if (sd->status.zeny > zeny) - sd->status.zeny -= zeny; - else - sd->status.zeny = 0; - clif_updatestatus(sd,SP_ZENY); - } - return 0; } @@ -4902,7 +4892,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) if (battle_config.death_penalty_base > 0) { switch (battle_config.death_penalty_type) { case 1: - base_penalty += (unsigned int) ((double)pc_nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000); + base_penalty = (unsigned int) ((double)pc_nextbaseexp(sd) * (double)battle_config.death_penalty_base/10000); break; case 2: base_penalty = (unsigned int) ((double)sd->status.base_exp * (double)battle_config.death_penalty_base/10000); @@ -4939,6 +4929,12 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) clif_updatestatus(sd,SP_JOBEXP); } } + if(battle_config.zeny_penalty > 0 && !map[sd->bl.m].flag.nozenypenalty) + { + base_penalty = (unsigned int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.); + if(base_penalty) + pc_payzeny(sd, base_penalty); + } } if(map[sd->bl.m].flag.pvp_nightmaredrop){ // Moved this outside so it works when PVP isnt enabled and during pk mode [Ancyker] -- cgit v1.2.3-70-g09d2