summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c11
-rw-r--r--src/map/pc.h1
2 files changed, 10 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;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index 77bc795d6..62a829734 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -1143,6 +1143,7 @@ END_ZEROED_BLOCK; /* End */
bool (*process_chat_message) (struct map_session_data *sd, const char *message);
void (*check_supernovice_call) (struct map_session_data *sd, const char *message);
bool (*check_basicskill) (struct map_session_data *sd, int level);
+ bool (*isDeathPenaltyJob) (uint16 job);
};
#ifdef HERCULES_CORE