diff options
author | Haru <haru@dotalux.com> | 2016-08-14 17:57:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-14 17:57:35 +0200 |
commit | a737812d7ceadb8ee02dae88131b968f459c0fe3 (patch) | |
tree | 6ca3bf5dd7272a54843962b8ed6c9b81fd8338f5 /src/map/atcommand.c | |
parent | 4693faa69c40fb3f202351558ed5fce2866496ae (diff) | |
parent | b3df179f705b0a4fe99b0d6e81878251692843f1 (diff) | |
download | hercules-a737812d7ceadb8ee02dae88131b968f459c0fe3.tar.gz hercules-a737812d7ceadb8ee02dae88131b968f459c0fe3.tar.bz2 hercules-a737812d7ceadb8ee02dae88131b968f459c0fe3.tar.xz hercules-a737812d7ceadb8ee02dae88131b968f459c0fe3.zip |
Merge pull request #1396 from Emistry/on_pc_event
Enable @b/joblvl trigger OnPCLvUpEvent
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 5b337e759..8d4aa317f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -1398,6 +1398,7 @@ ACMD(baselevelup) sd->status.base_level -= level; clif->message(fd, msg_fd(fd,22)); // Base level lowered. status_calc_pc(sd, SCO_FORCE); + level *= -1; } sd->status.base_exp = 0; clif->updatestatus(sd, SP_STATUSPOINT); @@ -1407,6 +1408,10 @@ ACMD(baselevelup) pc->baselevelchanged(sd); if(sd->status.party_id) party->send_levelup(sd); + + if (level > 0 && battle_config.atcommand_levelup_events) + npc->script_event(sd, NPCE_BASELVUP); // Trigger OnPCBaseLvUpEvent + return true; } @@ -1448,6 +1453,7 @@ ACMD(joblevelup) else sd->status.skill_point -= level; clif->message(fd, msg_fd(fd,25)); // Job level lowered. + level *= -1; } sd->status.job_exp = 0; clif->updatestatus(sd, SP_JOBLEVEL); @@ -1456,6 +1462,9 @@ ACMD(joblevelup) clif->updatestatus(sd, SP_SKILLPOINT); status_calc_pc(sd, SCO_FORCE); + if (level > 0 && battle_config.atcommand_levelup_events) + npc->script_event(sd, NPCE_JOBLVUP); // Trigger OnPCJobLvUpEvent + return true; } |