diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 19 | ||||
-rw-r--r-- | src/map/pc.h | 1 |
2 files changed, 15 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 6b947cf89..1dac01109 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -294,14 +294,22 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type) sd->spirit_timer[i] = INVALID_TIMER; } - if(!type) { - if ((sd->job & MAPID_THIRDMASK) == MAPID_ROYAL_GUARD) - clif->millenniumshield(&sd->bl,sd->spiritball); - else - clif->spiritball(&sd->bl); + if (!type) { + pc->delspiritball_sub(sd); } return 0; } + +int pc_delspiritball_sub(struct map_session_data *sd) +{ + nullpo_ret(sd); + if ((sd->job & MAPID_THIRDMASK) == MAPID_ROYAL_GUARD) + clif->millenniumshield(&sd->bl,sd->spiritball); + else + clif->spiritball(&sd->bl); + return 0; +} + int pc_check_banding(struct block_list *bl, va_list ap) { int *c, *b_sd; @@ -12372,6 +12380,7 @@ void pc_defaults(void) { pc->addspiritball = pc_addspiritball; pc->addspiritball_sub = pc_addspiritball_sub; pc->delspiritball = pc_delspiritball; + pc->delspiritball_sub = pc_delspiritball_sub; pc->addfame = pc_addfame; pc->fame_rank = pc_fame_rank; pc->famelist_type = pc_famelist_type; diff --git a/src/map/pc.h b/src/map/pc.h index 4422a0e1a..5fea4234b 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -1042,6 +1042,7 @@ END_ZEROED_BLOCK; /* End */ int (*addspiritball) (struct map_session_data *sd,int interval,int max); int (*addspiritball_sub) (struct map_session_data *sd); int (*delspiritball) (struct map_session_data *sd,int count,int type); + int (*delspiritball_sub) (struct map_session_data *sd); int (*getmaxspiritball) (struct map_session_data *sd, int min); void (*addfame) (struct map_session_data *sd, int ranktype, int count); int (*fame_rank) (int char_id, int ranktype); |