summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-18 20:29:15 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-23 07:33:44 +0300
commit0c75c27cfb93cb9102747e1bf68c1474dc6eb4d0 (patch)
treed3d46e105547324e6123a39ba767ff5596755b1c /src/map/pc.c
parentefeb386abc51baffa561f32d7d3b30868af767cd (diff)
downloadhercules-0c75c27cfb93cb9102747e1bf68c1474dc6eb4d0.tar.gz
hercules-0c75c27cfb93cb9102747e1bf68c1474dc6eb4d0.tar.bz2
hercules-0c75c27cfb93cb9102747e1bf68c1474dc6eb4d0.tar.xz
hercules-0c75c27cfb93cb9102747e1bf68c1474dc6eb4d0.zip
Split pc_addspiritball into two functions.
Move job mask related code into pc_addspiritball_sub.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index ee1fcd7da..6b947cf89 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -249,11 +249,18 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max)
memmove(sd->spirit_timer+i+1, sd->spirit_timer+i, (sd->spiritball-i)*sizeof(int));
sd->spirit_timer[i] = tid;
sd->spiritball++;
+ pc->addspiritball_sub(sd);
+
+ return 0;
+}
+
+int pc_addspiritball_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;
}
@@ -12363,6 +12370,7 @@ void pc_defaults(void) {
pc->delinvincibletimer = pc_delinvincibletimer;
pc->addspiritball = pc_addspiritball;
+ pc->addspiritball_sub = pc_addspiritball_sub;
pc->delspiritball = pc_delspiritball;
pc->addfame = pc_addfame;
pc->fame_rank = pc_fame_rank;