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.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index f4f2b5044..08fbae7ea 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -8088,8 +8088,8 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
}
// changed penalty options, added death by player if pk_mode [Valaris]
- if( battle_config.death_penalty_type
- && (sd->job & MAPID_UPPERMASK) != MAPID_NOVICE // only novices will receive no penalty
+ if (battle_config.death_penalty_type
+ && pc->isDeathPenaltyJob(sd->job)
&& !map->list[sd->bl.m].flag.noexppenalty && !map_flag_gvg2(sd->bl.m)
&& !sd->sc.data[SC_BABY] && !sd->sc.data[SC_CASH_DEATHPENALTY]
) {
@@ -8237,6 +8237,11 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) {
return 1;
}
+bool pc_isDeathPenaltyJob(uint16 job)
+{
+ return (job & MAPID_UPPERMASK) != MAPID_NOVICE; // only novices will receive no penalty
+}
+
void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) {
nullpo_retv(sd);
if(hp) clif->updatestatus(sd,SP_HP);
@@ -12517,4 +12522,6 @@ void pc_defaults(void) {
pc->have_magnifier = pc_have_magnifier;
pc->check_basicskill = pc_check_basicskill;
+
+ pc->isDeathPenaltyJob = pc_isDeathPenaltyJob;
}