diff options
-rw-r--r-- | src/map/map.c | 1 | ||||
-rw-r--r-- | src/map/storage.c | 10 | ||||
-rw-r--r-- | src/map/storage.h | 1 |
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); |