summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 19:01:53 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-24 19:01:53 +0000
commit0b4c74ca60babc8e1cc3a5cc2225b5705a430586 (patch)
tree1ee9ffddee70be1397d153ec29d62aab958be559 /src/map/pc.c
parentf8ebb28853a8a9c51725778688af0c4bb54d31e0 (diff)
downloadhercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.tar.gz
hercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.tar.bz2
hercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.tar.xz
hercules-0b4c74ca60babc8e1cc3a5cc2225b5705a430586.zip
- 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
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c18
1 files changed, 7 insertions, 11 deletions
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]