summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2013-09-27 05:30:37 +0200
committerHaru <haru@dotalux.com>2013-09-27 05:30:37 +0200
commitb89f58edd8b368e2548ace86f06354bd6ea1c8d2 (patch)
tree2f30953a986a2690c333370d99232a43853a1781 /src/map/storage.c
parent17bc1fab375f8ecc951fbba058a346b1460bf783 (diff)
downloadhercules-b89f58edd8b368e2548ace86f06354bd6ea1c8d2.tar.gz
hercules-b89f58edd8b368e2548ace86f06354bd6ea1c8d2.tar.bz2
hercules-b89f58edd8b368e2548ace86f06354bd6ea1c8d2.tar.xz
hercules-b89f58edd8b368e2548ace86f06354bd6ea1c8d2.zip
Renamed iMap interface to map
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c29
1 files changed, 12 insertions, 17 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index 2fe7607c3..041c2cd72 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -321,13 +321,12 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount)
/*==========================================
* Modified By Valaris to save upon closing [massdriller]
*------------------------------------------*/
-void storage_storageclose(struct map_session_data* sd)
-{
+void storage_storageclose(struct map_session_data* sd) {
nullpo_retv(sd);
clif->storageclose(sd);
- if( iMap->save_settings&4 )
+ if( map->save_settings&4 )
chrif->save(sd,0); //Invokes the storage saving as well.
sd->state.storage_flag = 0;
@@ -336,11 +335,10 @@ void storage_storageclose(struct map_session_data* sd)
/*==========================================
* When quitting the game.
*------------------------------------------*/
-void storage_storage_quit(struct map_session_data* sd, int flag)
-{
+void storage_storage_quit(struct map_session_data* sd, int flag) {
nullpo_retv(sd);
- if (iMap->save_settings&4)
+ if (map->save_settings&4)
chrif->save(sd, flag); //Invokes the storage saving as well.
sd->state.storage_flag = 0;
@@ -684,17 +682,15 @@ int storage_guild_storagesaved(int guild_id)
}
//Close storage for sd and save it
-int storage_guild_storageclose(struct map_session_data* sd)
-{
+int storage_guild_storageclose(struct map_session_data* sd) {
struct guild_storage *stor;
nullpo_ret(sd);
nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id));
clif->storageclose(sd);
- if (stor->storage_status)
- {
- if (iMap->save_settings&4)
+ if (stor->storage_status) {
+ if (map->save_settings&4)
chrif->save(sd, 0); //This one also saves the storage. [Skotlex]
else
gstorage->save(sd->status.account_id, sd->status.guild_id,0);
@@ -705,25 +701,24 @@ int storage_guild_storageclose(struct map_session_data* sd)
return 0;
}
-int storage_guild_storage_quit(struct map_session_data* sd, int flag)
-{
+int storage_guild_storage_quit(struct map_session_data* sd, int flag) {
struct guild_storage *stor;
nullpo_ret(sd);
nullpo_ret(stor=gstorage->id2storage2(sd->status.guild_id));
- if(flag)
- { //Only during a guild break flag is 1 (don't save storage)
+ if(flag) {
+ //Only during a guild break flag is 1 (don't save storage)
sd->state.storage_flag = 0;
stor->storage_status = 0;
clif->storageclose(sd);
- if (iMap->save_settings&4)
+ if (map->save_settings&4)
chrif->save(sd,0);
return 0;
}
if(stor->storage_status) {
- if (iMap->save_settings&4)
+ if (map->save_settings&4)
chrif->save(sd,0);
else
gstorage->save(sd->status.account_id,sd->status.guild_id,1);