Skip to content

Commit

Permalink
Follow up to 9f4587a
Browse files Browse the repository at this point in the history
Fixes #1877
Thanks to @Tokeiburu and @Everade for their help.
  • Loading branch information
Lemongrass3110 committed Jan 13, 2017
1 parent 6de7aa8 commit f5c4332
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -1829,6 +1829,7 @@ static int clif_delayquit(int tid, unsigned int tick, int id, intptr_t data)
*------------------------------------------*/
void clif_quitsave(int fd,struct map_session_data *sd) {
if (!battle_config.prevent_logout ||
sd->canlog_tick == 0 ||
DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout)
map_quit(sd);
else if (sd->fd) {
Expand Down Expand Up @@ -10637,7 +10638,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd)
/* Rovert's prevent logout option fixed [Valaris] */
//int type = RFIFOW(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]);
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] &&
(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
(!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
{
set_eof(fd);
pc_damage_log_clear(sd,0);
Expand Down Expand Up @@ -10984,7 +10985,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd)
case 0x01:
/* Rovert's Prevent logout option - Fixed [Valaris] */
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] &&
(!battle_config.prevent_logout || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
(!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
{ //Send to char-server for character selection.
pc_damage_log_clear(sd,0);
chrif_charselectreq(sd, session[fd]->client_addr);
Expand Down

0 comments on commit f5c4332

Please sign in to comment.