summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 21:24:46 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-23 21:24:46 +0000
commitc88e266dbc7745b9554f9a8c11357fc046c101b5 (patch)
tree4b5e0fac2bb46ca7a2f808b706d2d55fa8e32c5c
parent12b315593cc7f49afc3a1892e930f899deed4486 (diff)
downloadhercules-c88e266dbc7745b9554f9a8c11357fc046c101b5.tar.gz
hercules-c88e266dbc7745b9554f9a8c11357fc046c101b5.tar.bz2
hercules-c88e266dbc7745b9554f9a8c11357fc046c101b5.tar.xz
hercules-c88e266dbc7745b9554f9a8c11357fc046c101b5.zip
Save storage one last time for good measure
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@761 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--src/map/map.c1
-rw-r--r--src/map/storage.c10
-rw-r--r--src/map/storage.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/map/map.c b/src/map/map.c
index f9d14ac50..0150926d7 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1032,6 +1032,7 @@ int map_quit(struct map_session_data *sd) {
pc_makesavestatus(sd);
chrif_save(sd);
+ storage_storage_dirty(sd);
storage_storage_save(sd);
//double connect bug fix by Valaris
diff --git a/src/map/storage.c b/src/map/storage.c
index abc0a56e9..eb9da1539 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -337,6 +337,16 @@ int storage_storage_quit(struct map_session_data *sd)
return 0;
}
+void storage_storage_dirty(struct map_session_data *sd)
+{
+ struct storage *stor;
+
+ stor=numdb_search(storage_db,sd->status.account_id);
+
+ if(stor)
+ stor->dirty = 1;
+}
+
int storage_storage_save(struct map_session_data *sd)
{
struct storage *stor;
diff --git a/src/map/storage.h b/src/map/storage.h
index 489741c71..7b2ac2cbe 100644
--- a/src/map/storage.h
+++ b/src/map/storage.h
@@ -17,6 +17,7 @@ struct storage *account2storage2(int account_id);
int storage_delete(int account_id);
int storage_storage_quit(struct map_session_data *sd);
int storage_storage_save(struct map_session_data *sd);
+void storage_storage_dirty(struct map_session_data *sd);
struct guild_storage *guild2storage(int guild_id);
int guild_storage_delete(int guild_id);