From 220eb19293c057036c162da9bd0b7a7cd4e0a986 Mon Sep 17 00:00:00 2001 From: ai4rei Date: Mon, 22 Nov 2010 09:09:01 +0000 Subject: * mail_deliveryfail no longer attempts to log (since r12910) and give items (since r11855), when there is no item attached to the mail (bugreport:3239). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14482 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mail.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/map') diff --git a/src/map/mail.c b/src/map/mail.c index c79381c66..f0869185a 100644 --- a/src/map/mail.c +++ b/src/map/mail.c @@ -175,12 +175,15 @@ void mail_deliveryfail(struct map_session_data *sd, struct mail_message *msg) nullpo_retv(sd); nullpo_retv(msg); - // Item recieve (due to failure) - if(log_config.enable_logs&0x2000) - log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item); + if( msg->item.amount > 0 ) + { + // Item recieve (due to failure) + if(log_config.enable_logs&0x2000) + log_pick_pc(sd, "E", msg->item.nameid, msg->item.amount, &msg->item); + + pc_additem(sd, &msg->item, msg->item.amount); + } - pc_additem(sd, &msg->item, msg->item.amount); - if( msg->zeny > 0 ) { //Zeny recieve (due to failure) -- cgit v1.2.3-60-g2f50