From f6daed397dee844234cacd90d395c0b74c404598 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 15 Dec 2013 19:28:03 -0200 Subject: 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 --- src/map/mail.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/map/mail.c') diff --git a/src/map/mail.c b/src/map/mail.c index 020d92383..371aa892f 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -64,7 +64,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { return 1; if( idx == 0 ) { // Zeny Transfer - if( amount < 0 || !pc->can_give_items(sd) ) + if( amount < 0 || !pc_can_give_items(sd) ) return 1; if( amount > sd->status.zeny ) @@ -81,9 +81,9 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) { return 1; if( amount < 0 || amount > sd->status.inventory[idx].amount ) return 1; - if( !pc->can_give_items(sd) || sd->status.inventory[idx].expire_time || + if( !pc_can_give_items(sd) || sd->status.inventory[idx].expire_time || !itemdb_canmail(&sd->status.inventory[idx],pc_get_group_level(sd)) || - (sd->status.inventory[idx].bound && !pc->can_give_bound_items(sd)) ) + (sd->status.inventory[idx].bound && !pc_can_give_bound_items(sd)) ) return 1; sd->mail.index = idx; -- cgit v1.2.3-60-g2f50