diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-04 19:32:34 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-04-04 19:32:34 +0000 |
commit | 6acbd82fb5b77315853f42a9a31b7439a7e58bb9 (patch) | |
tree | 343173d795a6a7acfe990a8c0fe91b9fa3492296 /src/map/storage.c | |
parent | 26bf6b6dacd8029a1ed48255518a78dfb11b4ce4 (diff) | |
download | hercules-6acbd82fb5b77315853f42a9a31b7439a7e58bb9.tar.gz hercules-6acbd82fb5b77315853f42a9a31b7439a7e58bb9.tar.bz2 hercules-6acbd82fb5b77315853f42a9a31b7439a7e58bb9.tar.xz hercules-6acbd82fb5b77315853f42a9a31b7439a7e58bb9.zip |
Fixes for logging trades [MouseJstr]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1407 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/storage.c')
-rw-r--r-- | src/map/storage.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/map/storage.c b/src/map/storage.c index 6c4d6bea7..82ecd9321 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -233,11 +233,12 @@ int storage_storageadd(struct map_session_data *sd,int index,int amount) if( (stor->storage_amount <= MAX_STORAGE) && (stor->storage_status == 1) ) { // storage not full & storage open if(index>=0 && index<MAX_INVENTORY) { // valid index - if( (amount <= sd->status.inventory[index].amount) && (amount > 0) ) { //valid amount - if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) - // remove item from inventory - pc_delitem(sd,index,amount,0); - } // valid amount + if( (amount <= sd->status.inventory[index].amount) && (amount > 0) ) { //valid amount +// log_tostorage(sd, index, 0); + if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) + // remove item from inventory + pc_delitem(sd,index,amount,0); + } // valid amount }// valid index }// storage not full & storage open @@ -263,6 +264,7 @@ int storage_storageget(struct map_session_data *sd,int index,int amount) storage_delitem(sd,stor,index,amount); else clif_additem(sd,0,0,flag); +// log_fromstorage(sd, index, 0); } // valid amount }// valid index }// storage open @@ -510,6 +512,7 @@ int storage_guild_storageadd(struct map_session_data *sd,int index,int amount) if( (stor->storage_amount <= MAX_GUILD_STORAGE) && (stor->storage_status == 1) ) { // storage not full & storage open if(index>=0 && index<MAX_INVENTORY) { // valid index if( (amount <= sd->status.inventory[index].amount) && (amount > 0) ) { //valid amount +// log_tostorage(sd, index, 1); if(guild_storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) // remove item from inventory pc_delitem(sd,index,amount,0); @@ -536,6 +539,7 @@ int storage_guild_storageget(struct map_session_data *sd,int index,int amount) guild_storage_delitem(sd,stor,index,amount); else clif_additem(sd,0,0,flag); +// log_fromstorage(sd, index, 1); } // valid amount }// valid index }// storage open |