summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-18 20:36:15 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-23 07:33:44 +0300
commitab54c46a7fb4c527bf19a0ea019c6592cc504660 (patch)
tree6fee3195892f6f0ff887c2bafeb68485c7c87848 /src/map/pc.c
parent0c75c27cfb93cb9102747e1bf68c1474dc6eb4d0 (diff)
downloadhercules-ab54c46a7fb4c527bf19a0ea019c6592cc504660.tar.gz
hercules-ab54c46a7fb4c527bf19a0ea019c6592cc504660.tar.bz2
hercules-ab54c46a7fb4c527bf19a0ea019c6592cc504660.tar.xz
hercules-ab54c46a7fb4c527bf19a0ea019c6592cc504660.zip
Split pc_delspiritball into two functions.
Move job mask related code into pc_delspiritball_sub.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c19
1 files changed, 14 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;