Skip to content

Commit

Permalink
Fixed Storage AddItem Bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
shennetsind committed Oct 4, 2013
1 parent a49787f commit 24556fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/map/storage.c
Expand Up @@ -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 )
Expand All @@ -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;
}
Expand Down

0 comments on commit 24556fb

Please sign in to comment.