summaryrefslogtreecommitdiff
path: root/src/map/vending.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-12-15 19:28:03 -0200
committershennetsind <ind@henn.et>2013-12-15 19:28:03 -0200
commitf6daed397dee844234cacd90d395c0b74c404598 (patch)
tree1d240f974dab6dc751cef88cca32aa8819bab99b /src/map/vending.c
parentee1290403076d39d25def09753cf20c1dd157d09 (diff)
downloadhercules-f6daed397dee844234cacd90d395c0b74c404598.tar.gz
hercules-f6daed397dee844234cacd90d395c0b74c404598.tar.bz2
hercules-f6daed397dee844234cacd90d395c0b74c404598.tar.xz
hercules-f6daed397dee844234cacd90d395c0b74c404598.zip
Replaced pc->pc_has_permission/can_give_items/can_give_bound_items with equivalent macros
Because 2/3 jumps to perform such a operation is just awful Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/vending.c')
-rw-r--r--src/map/vending.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/vending.c b/src/map/vending.c
index dc22499dd..7d248351c 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -53,7 +53,7 @@ void vending_vendinglistreq(struct map_session_data* sd, unsigned int id) {
if( !vsd->state.vending )
return; // not vending
- if (!pc->can_give_items(sd) || !pc->can_give_items(vsd)) { //check if both GMs are allowed to trade
+ if (!pc_can_give_items(sd) || !pc_can_give_items(vsd)) { //check if both GMs are allowed to trade
// GM is not allowed to trade
clif->message(sd->fd, msg_txt(246));
return;
@@ -257,7 +257,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, const
|| !sd->status.cart[index].identify // unidentified item
|| sd->status.cart[index].attribute == 1 // 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
+ || (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
continue;