summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-04-18 21:41:12 +0300
committerAndrei Karas <akaras@inbox.ru>2018-04-23 07:33:45 +0300
commit4cce05e9d2f1731aba08d10a9ef5a7b887a9f6af (patch)
treea32074b6336d2d663e7381788deeebf5d82174bc /src/map/pc.c
parent66a7110fd0187933fe9919473215a54cf7cd129f (diff)
downloadhercules-4cce05e9d2f1731aba08d10a9ef5a7b887a9f6af.tar.gz
hercules-4cce05e9d2f1731aba08d10a9ef5a7b887a9f6af.tar.bz2
hercules-4cce05e9d2f1731aba08d10a9ef5a7b887a9f6af.tar.xz
hercules-4cce05e9d2f1731aba08d10a9ef5a7b887a9f6af.zip
Move from pc_checkbaselevelup sc start related code into separate function.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 315d3bda1..09040e816 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6823,18 +6823,7 @@ int pc_checkbaselevelup(struct map_session_data *sd)
status_calc_pc(sd,SCO_FORCE);
status_percent_heal(&sd->bl,100,100);
- if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
- sc_start(NULL,&sd->bl,status->skill2sc(PR_KYRIE),100,1,skill->get_time(PR_KYRIE,1));
- sc_start(NULL,&sd->bl,status->skill2sc(PR_IMPOSITIO),100,1,skill->get_time(PR_IMPOSITIO,1));
- sc_start(NULL,&sd->bl,status->skill2sc(PR_MAGNIFICAT),100,1,skill->get_time(PR_MAGNIFICAT,1));
- sc_start(NULL,&sd->bl,status->skill2sc(PR_GLORIA),100,1,skill->get_time(PR_GLORIA,1));
- sc_start(NULL,&sd->bl,status->skill2sc(PR_SUFFRAGIUM),100,1,skill->get_time(PR_SUFFRAGIUM,1));
- if (sd->state.snovice_dead_flag)
- sd->state.snovice_dead_flag = 0; //Reenable steelbody resurrection on dead.
- } else if ((sd->job & MAPID_BASEMASK) == MAPID_TAEKWON) {
- sc_start(NULL,&sd->bl,status->skill2sc(AL_INCAGI),100,10,600000);
- sc_start(NULL,&sd->bl,status->skill2sc(AL_BLESSING),100,10,600000);
- }
+ pc->checkbaselevelup_sc(sd);
clif->misceffect(&sd->bl,0);
npc->script_event(sd, NPCE_BASELVUP); //LORDALFA - LVLUPEVENT
@@ -6845,6 +6834,24 @@ int pc_checkbaselevelup(struct map_session_data *sd)
return 1;
}
+void pc_checkbaselevelup_sc(struct map_session_data *sd)
+{
+ nullpo_retv(sd);
+
+ if ((sd->job & MAPID_UPPERMASK) == MAPID_SUPER_NOVICE) {
+ sc_start(NULL, &sd->bl, status->skill2sc(PR_KYRIE), 100, 1, skill->get_time(PR_KYRIE, 1));
+ sc_start(NULL, &sd->bl, status->skill2sc(PR_IMPOSITIO), 100, 1, skill->get_time(PR_IMPOSITIO, 1));
+ sc_start(NULL, &sd->bl, status->skill2sc(PR_MAGNIFICAT), 100, 1, skill->get_time(PR_MAGNIFICAT, 1));
+ sc_start(NULL, &sd->bl, status->skill2sc(PR_GLORIA), 100, 1, skill->get_time(PR_GLORIA, 1));
+ sc_start(NULL, &sd->bl, status->skill2sc(PR_SUFFRAGIUM), 100, 1, skill->get_time(PR_SUFFRAGIUM, 1));
+ if (sd->state.snovice_dead_flag)
+ sd->state.snovice_dead_flag = 0; //Reenable steelbody resurrection on dead.
+ } else if ((sd->job & MAPID_BASEMASK) == MAPID_TAEKWON) {
+ sc_start(NULL, &sd->bl, status->skill2sc(AL_INCAGI), 100, 10, 600000);
+ sc_start(NULL, &sd->bl, status->skill2sc(AL_BLESSING), 100, 10, 600000);
+ }
+}
+
void pc_baselevelchanged(struct map_session_data *sd) {
int i;
nullpo_retv(sd);
@@ -12310,6 +12317,7 @@ void pc_defaults(void) {
pc->maxbaselv = pc_maxbaselv;
pc->maxjoblv = pc_maxjoblv;
pc->checkbaselevelup = pc_checkbaselevelup;
+ pc->checkbaselevelup_sc = pc_checkbaselevelup_sc;
pc->checkjoblevelup = pc_checkjoblevelup;
pc->gainexp = pc_gainexp;
pc->nextbaseexp = pc_nextbaseexp;