diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-06-28 22:08:54 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-06-30 02:32:10 +0300 |
commit | 7c21376f8dea2b438cb9470f74acc157a1929f06 (patch) | |
tree | 396829d37d642103dbd98e39b00bed7b8e875461 /src/map/vending.c | |
parent | 48064104f599a2dfa57440a1fda861c27bd55401 (diff) | |
download | hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.tar.gz hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.tar.bz2 hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.tar.xz hercules-7c21376f8dea2b438cb9470f74acc157a1929f06.zip |
Use item attribute as flags varible. Now only ATTR_BROKEN flag exists.
Diffstat (limited to 'src/map/vending.c')
-rw-r--r-- | src/map/vending.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/vending.c b/src/map/vending.c index e3a62bea7..3ae1017f8 100644 --- a/src/map/vending.c +++ b/src/map/vending.c @@ -276,7 +276,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, const || pc->cartitem_amount(sd, index, amount) < 0 // invalid item or insufficient quantity //NOTE: official server does not do any of the following checks! || !sd->status.cart[index].identify // unidentified item - || sd->status.cart[index].attribute == 1 // broken item + || (sd->status.cart[index].attribute & ATTR_BROKEN) != 0 // broken item || sd->status.cart[index].expire_time // It should not be in the cart but just in case || (sd->status.cart[index].bound && !pc_can_give_bound_items(sd)) // can't trade bound items w/o permission || !itemdb_cantrade(&sd->status.cart[index], pc_get_group_level(sd), pc_get_group_level(sd)) ) // untradeable item |