diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2017-04-18 21:28:39 +0800 |
---|---|---|
committer | Jedzkie <jedzkie13@rocketmail.com> | 2017-04-20 18:10:30 +0800 |
commit | ce66b7e6369c95923858c48711b1022644a87f90 (patch) | |
tree | 237e4c6cf66d03bb78931da51de9d86f21a8a821 /src/map/unit.c | |
parent | 5802b22439441be1914ae9024d6ce06d51c0210f (diff) | |
download | hercules-ce66b7e6369c95923858c48711b1022644a87f90.tar.gz hercules-ce66b7e6369c95923858c48711b1022644a87f90.tar.bz2 hercules-ce66b7e6369c95923858c48711b1022644a87f90.tar.xz hercules-ce66b7e6369c95923858c48711b1022644a87f90.zip |
Made prevent_logout effect on log-in optional
kRO does not prevent players from logging out after connecting to its zone servers.
Credits to @secretdataz of rAthena
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; } |