From e07b2da8d90f955dbe01737e9bfdb73ddaa3bd83 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 28 Jun 2006 16:09:13 +0000 Subject: - Cleaned up a bit the code for @item - Fixed character/storage being sent to be saved TWICE when you logged out while the storage is opened. - Added save_settings map config. Specifies after which events do characters get saved (defaults to all): 1 - Trade successful, 2 - Vending transaction, 4 - Closing storage/guild storage, 8 - hatching a pet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7375 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/map.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index 0270b509d..98af550c2 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -168,6 +168,7 @@ int map_num = 0; int map_port=0; int autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; +int save_settings = 0xFFFF; int charsave_method = 0; //Default 'OLD' Save method (SQL ONLY!) [Sirius] int agit_flag = 0; int night_flag = 0; // 0=day, 1=night [Yor] @@ -1664,6 +1665,8 @@ int map_quit(struct map_session_data *sd) { npc_timerevent_quit(sd); if (sd->state.event_disconnect) npc_script_event(sd, NPCE_LOGOUT); + + sd->state.waitingdisconnect = 1; if (sd->pd) unit_free(&sd->pd->bl); unit_free(&sd->bl); chrif_save(sd,1); @@ -3306,6 +3309,8 @@ int map_config_read(char *cfgName) { autosave_interval = atoi(w2) * 1000; if (autosave_interval <= 0) autosave_interval = DEFAULT_AUTOSAVE_INTERVAL; + } else if (strcmpi(w1, "save_settings") == 0) { + save_settings = atoi(w2); } else if (strcmpi(w1, "motd_txt") == 0) { strcpy(motd_txt, w2); } else if (strcmpi(w1, "help_txt") == 0) { -- cgit v1.2.3-60-g2f50