summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2017-04-18 21:28:39 +0800
committerJedzkie <jedzkie13@rocketmail.com>2017-04-20 18:10:30 +0800
commitce66b7e6369c95923858c48711b1022644a87f90 (patch)
tree237e4c6cf66d03bb78931da51de9d86f21a8a821 /src/map/pc.c
parent5802b22439441be1914ae9024d6ce06d51c0210f (diff)
downloadhercules-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/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index e9855c16d..c602ed4c0 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;
@@ -7703,7 +7704,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();
}
/*==========================================