diff options
author | Haru <haru@dotalux.com> | 2017-04-23 03:04:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-23 03:04:24 +0200 |
commit | 1bc4994db3b611dd489d6bde0a218b232ca785f5 (patch) | |
tree | 7bc40dd54c94a37994d3dc65f1bbd6e5460693c6 /src/map/unit.c | |
parent | a4e270959babb7f56d7cf216f731a33695ba0adb (diff) | |
parent | ce66b7e6369c95923858c48711b1022644a87f90 (diff) | |
download | hercules-1bc4994db3b611dd489d6bde0a218b232ca785f5.tar.gz hercules-1bc4994db3b611dd489d6bde0a218b232ca785f5.tar.bz2 hercules-1bc4994db3b611dd489d6bde0a218b232ca785f5.tar.xz hercules-1bc4994db3b611dd489d6bde0a218b232ca785f5.zip |
Merge pull request #1697 from Jedzkie/9-PreventLogout
Made prevent_logout effect on log-in optional
Diffstat (limited to 'src/map/unit.c')
-rw-r--r-- | src/map/unit.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c index 7d68bef66..79abb8c6a 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1667,6 +1667,9 @@ int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill_id, ui } else skill->castend_id(ud->skilltimer,tick,src->id,0); + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_SKILL) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -1813,6 +1816,10 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, ui ud->skilltimer = INVALID_TIMER; skill->castend_pos(ud->skilltimer,tick,src->id,0); } + + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_SKILL) + sd->canlog_tick = timer->gettick(); + return 1; } @@ -2253,6 +2260,9 @@ int unit_attack_timer_sub(struct block_list* src, int tid, int64 tick) ud->attacktimer = timer->add(ud->attackabletime,unit->attack_timer,src->id,0); } + if (sd != NULL && battle_config.prevent_logout_trigger & PLT_ATTACK) + sd->canlog_tick = timer->gettick(); + return 1; } |