diff options
author | Haru <haru@dotalux.com> | 2018-04-07 16:29:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-07 16:29:14 +0200 |
commit | 6e0a40288326495b97e6e5a1435a624defb8ed92 (patch) | |
tree | 77d6e12809290f7c0b54bf2e403b863303368a1b /src/map/pc.c | |
parent | b2f92713a6f0449d4ca319ab178d6391c021f57c (diff) | |
parent | 408982006d7e5695405b043142989a2ecdb9ffbd (diff) | |
download | hercules-6e0a40288326495b97e6e5a1435a624defb8ed92.tar.gz hercules-6e0a40288326495b97e6e5a1435a624defb8ed92.tar.bz2 hercules-6e0a40288326495b97e6e5a1435a624defb8ed92.tar.xz hercules-6e0a40288326495b97e6e5a1435a624defb8ed92.zip |
Merge pull request #1868 from Jedzkie/2017-StorageFix
Fixes #1806
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 4404101b9..dd9a7126f 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4902,11 +4902,6 @@ int pc_isUseitem(struct map_session_data *sd,int n) return 0; // You cannot use this item while sitting. } - if (sd->state.storage_flag != STORAGE_FLAG_CLOSED && item->type != IT_CASH) { - clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd,1475)); - return 0; // You cannot use this item while storage is open. - } - switch( nameid ) { // TODO: Is there no better way to handle this, other than hardcoding item IDs? case ITEMID_ANODYNE: if (map_flag_gvg2(sd->bl.m)) @@ -5093,6 +5088,11 @@ int pc_useitem(struct map_session_data *sd,int n) { return 0; } + if (battle_config.storage_use_item == 1 && sd->state.storage_flag != STORAGE_FLAG_CLOSED) { + clif->messagecolor_self(sd->fd, COLOR_RED, msg_sd(sd, 1475)); + return 0; // You cannot use this item while storage is open. + } + if( sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 ) return 0; |