summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ca395d955..7774680f7 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5172,10 +5172,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
if(base_penalty) {
if (battle_config.pk_mode && src && src->type==BL_PC)
base_penalty*=2;
- if(sd->status.base_exp < base_penalty)
- sd->status.base_exp = 0;
- else
- sd->status.base_exp -= base_penalty;
+ sd->status.base_exp -= min(sd->status.base_exp, base_penalty);
clif_updatestatus(sd,SP_BASEEXP);
}
}
@@ -5193,10 +5190,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
if(base_penalty) {
if (battle_config.pk_mode && src && src->type==BL_PC)
base_penalty*=2;
- if(sd->status.job_exp < base_penalty)
- sd->status.job_exp = 0;
- else
- sd->status.job_exp -= base_penalty;
+ sd->status.job_exp -= min(sd->status.job_exp, base_penalty);
clif_updatestatus(sd,SP_JOBEXP);
}
}