diff options
Diffstat (limited to 'src/map/buyingstore.c')
-rw-r--r-- | src/map/buyingstore.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index 80264b30d..626d102a3 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -126,8 +126,9 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha break; } - if( !id->flag.buyingstore || !itemdb->cantrade_sub(id, pc_get_group_level(sd), pc_get_group_level(sd)) || ( idx = pc->search_inventory(sd, nameid) ) == -1 ) - {// restrictions: allowed, no character-bound items and at least one must be owned + if (!id->flag.buyingstore || !itemdb->cantrade_sub(id, pc_get_group_level(sd), pc_get_group_level(sd)) + || (idx = pc->search_inventory(sd, nameid)) == INDEX_NOT_FOUND + ) { // restrictions: allowed, no character-bound items and at least one must be owned break; } |