Fixed logging out on newer clients (#5302)
Fixes #5215 Thanks to @4144, @mazvi and @attackjom
This commit is contained in:
parent
223153116e
commit
84223d5e22
@ -149,3 +149,8 @@ ping_time: 20
|
|||||||
// Show skill scale for clients 2015-12-23 and newer? (Note 1)
|
// Show skill scale for clients 2015-12-23 and newer? (Note 1)
|
||||||
// Official: yes
|
// Official: yes
|
||||||
show_skill_scale: yes
|
show_skill_scale: yes
|
||||||
|
|
||||||
|
// Should the connection be dropped on server side after a player disconnection request was received? (Note 1)
|
||||||
|
// Note: Enabling this is known to cause problems on clients that make use of REST API calls.
|
||||||
|
// Official: no
|
||||||
|
drop_connection_on_quit: no
|
||||||
|
@ -9000,6 +9000,7 @@ static const struct _battle_data {
|
|||||||
{ "at_logout_event", &battle_config.at_logout_event, 1, 0, 1, },
|
{ "at_logout_event", &battle_config.at_logout_event, 1, 0, 1, },
|
||||||
{ "homunculus_starving_rate", &battle_config.homunculus_starving_rate, 10, 0, 100, },
|
{ "homunculus_starving_rate", &battle_config.homunculus_starving_rate, 10, 0, 100, },
|
||||||
{ "homunculus_starving_delay", &battle_config.homunculus_starving_delay, 20000, 0, INT_MAX, },
|
{ "homunculus_starving_delay", &battle_config.homunculus_starving_delay, 20000, 0, INT_MAX, },
|
||||||
|
{ "drop_connection_on_quit", &battle_config.drop_connection_on_quit, 0, 0, 1, },
|
||||||
|
|
||||||
#include "../custom/battle_config_init.inc"
|
#include "../custom/battle_config_init.inc"
|
||||||
};
|
};
|
||||||
|
@ -687,6 +687,7 @@ struct Battle_Config
|
|||||||
int at_logout_event;
|
int at_logout_event;
|
||||||
int homunculus_starving_rate;
|
int homunculus_starving_rate;
|
||||||
int homunculus_starving_delay;
|
int homunculus_starving_delay;
|
||||||
|
int drop_connection_on_quit;
|
||||||
|
|
||||||
#include "../custom/battle_config_struct.inc"
|
#include "../custom/battle_config_struct.inc"
|
||||||
};
|
};
|
||||||
|
@ -11181,9 +11181,12 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd)
|
|||||||
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] && !sd->sc.data[SC_NEWMOON] &&
|
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] && !sd->sc.data[SC_NEWMOON] &&
|
||||||
(!battle_config.prevent_logout || sd->canlog_tick == 0 || 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);
|
pc_damage_log_clear(sd,0);
|
||||||
clif_disconnect_ack(sd, 0);
|
clif_disconnect_ack(sd, 0);
|
||||||
|
flush_fifo( fd );
|
||||||
|
if( battle_config.drop_connection_on_quit ){
|
||||||
|
set_eof( fd );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
clif_disconnect_ack(sd, 1);
|
clif_disconnect_ack(sd, 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user