summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authorai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-09 23:18:03 +0000
committerai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec>2010-12-09 23:18:03 +0000
commit18ec7de528b88d581e3ad10c03f6b8244b207630 (patch)
tree2587521b2a35c6d1bd8953de589a1fbe27607873 /src/map/storage.c
parent91d87f7a903545b70e23e3aa0edbd2e3ee2b67bc (diff)
downloadhercules-18ec7de528b88d581e3ad10c03f6b8244b207630.tar.gz
hercules-18ec7de528b88d581e3ad10c03f6b8244b207630.tar.bz2
hercules-18ec7de528b88d581e3ad10c03f6b8244b207630.tar.xz
hercules-18ec7de528b88d581e3ad10c03f6b8244b207630.zip
* Removed some of the duplicate, storage-related packet code.
- Removed clif_guildstoragelist and adjusted clif_storagelist to be able to handle any kind of storage. - Removed clif_guildstorageitemadded in favor of clif_storageitemadded. - This also fixes clif_guildstorageitemadded sending old update packet for clients prior 20090603, although packet 0x1c4 (ZC_ADD_ITEM_TO_STORE2) was added before PACKETVER 5 (before 2003-11-03aSakexe, exact addition date unknown) (since r14286). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14571 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index 8960f7203..2e668f08d 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -104,7 +104,7 @@ int storage_storageopen(struct map_session_data *sd)
}
sd->state.storage_flag = 1;
- clif_storagelist(sd,&sd->status.storage);
+ clif_storagelist(sd, sd->status.storage.items, ARRAYLENGTH(sd->status.storage.items));
clif_updatestorageamount(sd,sd->status.storage.storage_amount);
return 0;
}
@@ -380,7 +380,7 @@ int storage_guild_storageopen(struct map_session_data* sd)
gstor->storage_status = 1;
sd->state.storage_flag = 2;
- clif_guildstoragelist(sd,gstor);
+ clif_storagelist(sd, gstor->storage_, ARRAYLENGTH(gstor->storage_));
clif_updateguildstorageamount(sd,gstor->storage_amount);
return 0;
}
@@ -410,7 +410,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
if(stor->storage_[i].amount+amount > MAX_AMOUNT)
return 1;
stor->storage_[i].amount+=amount;
- clif_guildstorageitemadded(sd,&stor->storage_[i],i,amount);
+ clif_storageitemadded(sd,&stor->storage_[i],i,amount);
stor->dirty = 1;
if(log_config.enable_logs&0x1000)
log_pick_pc(sd, "G", item_data->nameid, -amount, item_data);
@@ -427,7 +427,7 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
memcpy(&stor->storage_[i],item_data,sizeof(stor->storage_[0]));
stor->storage_[i].amount=amount;
stor->storage_amount++;
- clif_guildstorageitemadded(sd,&stor->storage_[i],i,amount);
+ clif_storageitemadded(sd,&stor->storage_[i],i,amount);
clif_updateguildstorageamount(sd,stor->storage_amount);
stor->dirty = 1;
if(log_config.enable_logs&0x1000)