summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-12-13 22:51:42 -0500
committerMadCamel <madcamel@gmail.com>2009-12-13 22:51:42 -0500
commit79fa54ff8b0e50fe2b70f36573ed5e2cd22eedda (patch)
tree69b42ef52ae8edf74936389528b809a921b79f00 /src
parent91ffbdb8eccdfcb5adc68838d807e0c296e9ce35 (diff)
downloadtmwa-79fa54ff8b0e50fe2b70f36573ed5e2cd22eedda.tar.gz
tmwa-79fa54ff8b0e50fe2b70f36573ed5e2cd22eedda.tar.bz2
tmwa-79fa54ff8b0e50fe2b70f36573ed5e2cd22eedda.tar.xz
tmwa-79fa54ff8b0e50fe2b70f36573ed5e2cd22eedda.zip
Unequip items when adding to storage
Diffstat (limited to 'src')
-rw-r--r--src/map/storage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index 53b5bc7..25ecd90 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -251,9 +251,11 @@ int storage_storageadd(struct map_session_data *sd,int index,int amount)
return 0;
// log_tostorage(sd, index, 0);
- if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0)
+ if(storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) {
// remove item from inventory
+ pc_unequipinvyitem(sd,index,1);
pc_delitem(sd,index,amount,0);
+ }
return 1;
}