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/pc.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/pc.c')
-rw-r--r-- | src/map/pc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index b4985dd5f..2887942db 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -741,7 +741,8 @@ int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int lo sd->client_tick = client_tick; sd->state.active = 0; //to be set to 1 after player is fully authed and loaded. sd->bl.type = BL_PC; - sd->canlog_tick = timer->gettick(); + if (battle_config.prevent_logout_trigger & PLT_LOGIN) + sd->canlog_tick = timer->gettick(); //Required to prevent homunculus copuing a base speed of 0. sd->battle_status.speed = sd->base_status.speed = DEFAULT_WALK_SPEED; sd->state.warp_clean = 1; @@ -7695,7 +7696,8 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h if( sd->status.ele_id > 0 ) elemental->set_target(sd,src); - sd->canlog_tick = timer->gettick(); + if (battle_config.prevent_logout_trigger & PLT_DAMAGE) + sd->canlog_tick = timer->gettick(); } /*========================================== |