summaryrefslogtreecommitdiff
path: root/src/map/buyingstore.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/buyingstore.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/buyingstore.c')
-rw-r--r--src/map/buyingstore.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/buyingstore.c b/src/map/buyingstore.c
index fc43df5bd..2a15e66fc 100644
--- a/src/map/buyingstore.c
+++ b/src/map/buyingstore.c
@@ -76,7 +76,7 @@ void buyingstore_create(struct map_session_data* sd, int zenylimit, unsigned cha
return;
}
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to buy (give zeny)
sd->buyingstore.slots = 0;
clif->message(sd->fd, msg_txt(246));
@@ -197,7 +197,7 @@ void buyingstore_open(struct map_session_data* sd, int account_id)
return;
}
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to sell
clif->message(sd->fd, msg_txt(246));
return;
@@ -235,7 +235,7 @@ void buyingstore_trade(struct map_session_data* sd, int account_id, unsigned int
return;
}
- if( !pc->can_give_items(sd) )
+ if( !pc_can_give_items(sd) )
{// custom: GM is not allowed to sell
clif->message(sd->fd, msg_txt(246));
clif->buyingstore_trade_failed_seller(sd, BUYINGSTORE_TRADE_SELLER_FAILED, 0);
@@ -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;