diff options
author | shennetsind <ind@henn.et> | 2013-12-15 19:28:03 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-12-15 19:28:03 -0200 |
commit | f6daed397dee844234cacd90d395c0b74c404598 (patch) | |
tree | 1d240f974dab6dc751cef88cca32aa8819bab99b /src/map/mail.c | |
parent | ee1290403076d39d25def09753cf20c1dd157d09 (diff) | |
download | hercules-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/mail.c')
-rw-r--r-- | src/map/mail.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |