summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorDennis Friis <peavey@inspircd.org>2009-06-23 00:22:39 +0200
committerDennis Friis <peavey@inspircd.org>2009-06-25 01:13:20 +0200
commit4b825f68fa8e8ec86d6aa1694f629ed348fe50f1 (patch)
tree54c4567fb51f8b1edb2cde224ea2ef6e7d994053 /src/map/pc.c
parent353fd0ec49222512a4292fb1452c2c82c8e3a38d (diff)
downloadtmwa-4b825f68fa8e8ec86d6aa1694f629ed348fe50f1.tar.gz
tmwa-4b825f68fa8e8ec86d6aa1694f629ed348fe50f1.tar.bz2
tmwa-4b825f68fa8e8ec86d6aa1694f629ed348fe50f1.tar.xz
tmwa-4b825f68fa8e8ec86d6aa1694f629ed348fe50f1.zip
Redo storage, derived from ea stable.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 4ad09a3..537e978 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3485,8 +3485,16 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
sd->bl.y=y;
sd->state.waitingdisconnect=1;
pc_makesavestatus(sd);
- chrif_save(sd);
- storage_storage_save(sd);
+ //The storage close routines save the char data. [Skotlex]
+ if (!sd->state.storage_flag)
+ chrif_save(sd);
+ else if (sd->state.storage_flag == 1)
+ {
+ storage_storageclose(sd);
+ storage_delete(sd->status.account_id);
+ }
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageclose(sd);
chrif_changemapserver(sd, mapname, x, y, ip, port);
return 0;
}
@@ -7180,7 +7188,6 @@ static int pc_autosave_sub(struct map_session_data *sd,va_list ap)
pc_makesavestatus(sd);
chrif_save(sd);
- storage_storage_save(sd);
for(i=0;i<MAX_GUILDCASTLE;i++){
gc=guild_castle_search(i);