summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-10-04 16:31:38 -0300
committershennetsind <ind@henn.et>2013-10-04 16:31:38 -0300
commit24556fbd5969a6cc2806a46b853e6252b5d7cd06 (patch)
tree16a71355fe861e44fb465608ff48c913b7ff3b6c /src
parenta49787ff1589d86efa87263676761ddcbecd64ce (diff)
downloadhercules-24556fbd5969a6cc2806a46b853e6252b5d7cd06.tar.gz
hercules-24556fbd5969a6cc2806a46b853e6252b5d7cd06.tar.bz2
hercules-24556fbd5969a6cc2806a46b853e6252b5d7cd06.tar.xz
hercules-24556fbd5969a6cc2806a46b853e6252b5d7cd06.zip
Fixed Storage AddItem Bug
Fixed a ancient bug where trying to add a item to a full storage would render the item un-draggable (server was failing to respond properly). Thanks to Sanasol for bringing it up. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src')
-rw-r--r--src/map/storage.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index 91515dfe1..cc1100d28 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -196,8 +196,7 @@ int storage_delitem(struct map_session_data* sd, int n, int amount)
* 0 : fail
* 1 : success
*------------------------------------------*/
-int storage_storageadd(struct map_session_data* sd, int index, int amount)
-{
+int storage_storageadd(struct map_session_data* sd, int index, int amount) {
nullpo_ret(sd);
if( sd->status.storage.storage_amount > MAX_STORAGE )
@@ -214,6 +213,8 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount)
if( storage->additem(sd,&sd->status.inventory[index],amount) == 0 )
pc->delitem(sd,index,amount,0,4,LOG_TYPE_STORAGE);
+ else
+ clif->dropitem(sd, index,0);
return 1;
}