diff options
author | shennetsind <ind@henn.et> | 2013-12-14 19:17:31 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-12-14 19:17:31 -0200 |
commit | ee1290403076d39d25def09753cf20c1dd157d09 (patch) | |
tree | 32a8b66dff44752551577bbd77e7c6bdd76224d4 /src/map/buyingstore.c | |
parent | 5c4f7b9047ff14018b7c46bf1ead71765d1ff869 (diff) | |
download | hercules-ee1290403076d39d25def09753cf20c1dd157d09.tar.gz hercules-ee1290403076d39d25def09753cf20c1dd157d09.tar.bz2 hercules-ee1290403076d39d25def09753cf20c1dd157d09.tar.xz hercules-ee1290403076d39d25def09753cf20c1dd157d09.zip |
Replaced pc->get_group_level with a macro (pc_get_group_level)
Because 2 jumps to get a single value is just awful.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/buyingstore.c')
-rw-r--r-- | src/map/buyingstore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c index a9f1412ed..fc43df5bd 100644 --- a/src/map/buyingstore.c +++ b/src/map/buyingstore.c @@ -123,7 +123,7 @@ 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 ) + 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 break; } @@ -290,7 +290,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int return; } - if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc->get_group_level(sd), pc->get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) + if( sd->status.inventory[index].expire_time || (sd->status.inventory[index].bound && !pc->can_give_bound_items(sd)) || !itemdb_cantrade(&sd->status.inventory[index], pc_get_group_level(sd), pc_get_group_level(pl_sd)) || memcmp(sd->status.inventory[index].card, buyingstore->blankslots, sizeof(buyingstore->blankslots)) ) {// non-tradable item clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, nameid); return; |