summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.c')
-rw-r--r--src/map/map.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/map/map.c b/src/map/map.c
index 1acae20..3faf492 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -988,10 +988,10 @@ int map_quit(struct map_session_data *sd) {
pc_cleareventtimer(sd); // イベントタイマを破棄する
- if(sd->state.storage_flag)
- storage_guild_storage_quit(sd,0);
- else
+ 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);// ダンス/演奏中断
@@ -1023,8 +1023,14 @@ int map_quit(struct map_session_data *sd) {
sd->status.skill[i].flag=0;
}
}
- chrif_save(sd);
- storage_storage_save(sd);
+
+ //The storage closing routines will save the char if needed. [Skotlex]
+ if (!sd->state.storage_flag)
+ chrif_save(sd);
+ else if (sd->state.storage_flag == 1)
+ storage_storageclose(sd);
+ else if (sd->state.storage_flag == 2)
+ storage_guild_storageclose(sd);
if( sd->npc_stackbuf && sd->npc_stackbuf != NULL)
free( sd->npc_stackbuf );
@@ -1805,6 +1811,18 @@ void map_helpscreen() {
exit(1);
}
+int compare_item(struct item *a, struct item *b) {
+ return (
+ (a->nameid == b->nameid) &&
+ (a->identify == b->identify) &&
+ (a->refine == b->refine) &&
+ (a->attribute == b->attribute) &&
+ (a->card[0] == b->card[0]) &&
+ (a->card[1] == b->card[1]) &&
+ (a->card[2] == b->card[2]) &&
+ (a->card[3] == b->card[3]));
+}
+
/*======================================================
* Map-Server Init and Command-line Arguments [Valaris]
*------------------------------------------------------