summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@inspircd.org>2009-06-24 22:19:17 +0200
committerDennis Friis <peavey@inspircd.org>2009-06-25 01:13:21 +0200
commit4f99e5d5f04cc89d69fa407360b3597f31ca7215 (patch)
treefbc1204a182da32b75cc1674713d9fc2c70bc692
parentdb1d9700317340a9f7b878f803ea6487ef1c140b (diff)
downloadtmwa-4f99e5d5f04cc89d69fa407360b3597f31ca7215.tar.gz
tmwa-4f99e5d5f04cc89d69fa407360b3597f31ca7215.tar.bz2
tmwa-4f99e5d5f04cc89d69fa407360b3597f31ca7215.tar.xz
tmwa-4f99e5d5f04cc89d69fa407360b3597f31ca7215.zip
Some fixing on storage saving on map change. derived from ea stable.
-rw-r--r--src/map/map.c9
-rw-r--r--src/map/pc.c7
2 files changed, 4 insertions, 12 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 3faf492..5cc742d 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -988,11 +988,6 @@ int map_quit(struct map_session_data *sd) {
pc_cleareventtimer(sd); // イベントタイマを破棄する
- if(sd->state.storage_flag == 1)
- storage_storage_quit(sd); // 倉庫を開いてるなら保存する
- else if(sd->state.storage_flag == 2)
- storage_guild_storage_quit(sd,0);
-
skill_castcancel(&sd->bl,0); // 詠唱を中断する
skill_stop_dancing(&sd->bl,1);// ダンス/演奏中断
@@ -1028,9 +1023,9 @@ int map_quit(struct map_session_data *sd) {
if (!sd->state.storage_flag)
chrif_save(sd);
else if (sd->state.storage_flag == 1)
- storage_storageclose(sd);
+ storage_storage_quit(sd);
else if (sd->state.storage_flag == 2)
- storage_guild_storageclose(sd);
+ storage_guild_storage_quit(sd,1);
if( sd->npc_stackbuf && sd->npc_stackbuf != NULL)
free( sd->npc_stackbuf );
diff --git a/src/map/pc.c b/src/map/pc.c
index 2a36438..630a15b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -3489,12 +3489,9 @@ int pc_setpos(struct map_session_data *sd,char *mapname_org,int x,int y,int clrt
if (!sd->state.storage_flag)
chrif_save(sd);
else if (sd->state.storage_flag == 1)
- {
- storage_storageclose(sd);
- storage_delete(sd->status.account_id);
- }
+ storage_storage_quit(sd);
else if (sd->state.storage_flag == 2)
- storage_guild_storageclose(sd);
+ storage_guild_storage_quit(sd,1);
chrif_changemapserver(sd, mapname, x, y, ip, port);
return 0;