From 036bbfd9ae5a4a77031fb33a87264e58214c2ba0 Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 27 Jun 2006 14:54:01 +0000 Subject: - Fixed indentation on int_pet.c (how did it got messed up?) - Added mapflag "loadevent", now load-map script events will ONLY trigger on maps with this mapflag on, rather than every map. - High Jump can now be used in all versus maps. - Added Kaite's opt3 value, taken from jA - Added state dirty == 2 to storages. Signals when a storage was sent for final saving. Said storage is removed from memory after the ack from the char-server, and they are sent to save if the map/char servers reconnect before the act arrives. In short: they are guaranteed to be saved after a char logs out. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7358 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/chrif.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index 5b7dee2de..be0b2a25f 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -189,7 +189,7 @@ int chrif_save(struct map_session_data *sd, int flag) return -1; //Refuse to save a char already tagged for final saving. [Skotlex] //For data sync if (sd->state.storage_flag == 1) - storage_storage_save(sd->status.account_id); + storage_storage_save(sd->status.account_id, flag); else if (sd->state.storage_flag == 2) storage_guild_storagesave(sd->status.account_id, sd->status.guild_id); @@ -218,10 +218,8 @@ int chrif_save(struct map_session_data *sd, int flag) #ifndef TXT_ONLY } #endif - if (flag) {//Remove the storage from memory. - storage_delete(sd->status.account_id); + if (flag) sd->state.finalsave = 1; //Mark the last save as done. - } return 0; } -- cgit v1.2.3-60-g2f50