summaryrefslogtreecommitdiff
path: root/src/map/storage.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-11 14:30:58 -0300
committershennetsind <ind@henn.et>2013-07-11 14:30:58 -0300
commite3761a81ba4c941ba04a2b6b1f161a6e1402ebe9 (patch)
tree2621afd903332e09ff8459796c2a01c935ae4eb2 /src/map/storage.c
parent1708b62c12693cf55cdb97092ec7ec6692e8e272 (diff)
downloadhercules-e3761a81ba4c941ba04a2b6b1f161a6e1402ebe9.tar.gz
hercules-e3761a81ba4c941ba04a2b6b1f161a6e1402ebe9.tar.bz2
hercules-e3761a81ba4c941ba04a2b6b1f161a6e1402ebe9.tar.xz
hercules-e3761a81ba4c941ba04a2b6b1f161a6e1402ebe9.zip
Fix to Bug #7434
Fixing a ancient bug where placing a item from inventory to cart when cart is full would render such item un-clickable, same for when doing so from storage to cart. Special Thanks to Yommy for all the data, jTynne for bringing this up. http://hercules.ws/board/tracker/issue-7434-weightinability-to-click-item-issue/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/storage.c')
-rw-r--r--src/map/storage.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index 7a4649a98..e0b751863 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -294,8 +294,8 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun
* 0 : fail
* 1 : success
*------------------------------------------*/
-int storage_storagegettocart(struct map_session_data* sd, int index, int amount)
-{
+int storage_storagegettocart(struct map_session_data* sd, int index, int amount) {
+ int flag = 0;
nullpo_ret(sd);
if( index < 0 || index >= MAX_STORAGE )
@@ -307,8 +307,12 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount)
if( amount < 1 || amount > sd->status.storage.items[index].amount )
return 0;
- if( pc->cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE) == 0 )
+ if( (flag = pc->cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE)) == 0 )
storage->delitem(sd,index,amount);
+ else {
+ clif->dropitem(sd, index,0);
+ clif->cart_additem_ack(sd,flag == 1?0x0:0x1);
+ }
return 1;
}