summaryrefslogtreecommitdiff
path: root/src/map/mail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mail.c')
-rw-r--r--src/map/mail.c13
1 files changed, 8 insertions, 5 deletions
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)